Commit Graph

120649 Commits

Author SHA1 Message Date
Arnd Marijnissen
5c4d11d709 Bump buildbot gcc version to 11 2023-01-06 11:00:12 +01:00
Jesse Yurkovich
b6c74b4c6f Fix T82081: Remove workaround for OCIO Unicode issue on Windows
This workaround is no longer needed and prevents our OCIO configuration
from being loaded if Blender is unpacked under a Unicode path.

Differential Revision: https://developer.blender.org/D16818
2023-01-05 20:44:52 -08:00
Chris Blackbourn
280502e630 Fix T103469: improve uv cylinder projection and uv sphere projection
Multiple improvements to UV Cylinder and UV Sphere projection including:

 * New option "Pinch" or "Fan" to improve unwrap of faces at the poles.
 * Support for "Polar ZY" option on "View On Equator" and "Align To Object"
 * Better handling of inputs with round-off error.
 * Improved handling of faces touching the unit square border.
 * Improved handling of very wide quads spanning the right hand border.
 * Improved accuracy near to (0, 0).
 * Code cleanup and simplification.

Differential Revision: https://developer.blender.org/D16869
2023-01-06 17:12:41 +13:00
Campbell Barton
8d0c98740a Cleanup: remove unused OffsetGpencilModifierData.object
Added as part of D15106 but was not used anywhere.
2023-01-06 14:06:37 +11:00
Campbell Barton
14fc02f91d Cleanup: spelling in comments 2023-01-06 14:00:36 +11:00
Campbell Barton
706b13959e Cleanup: use double-quotes for non-enum strings 2023-01-06 14:00:36 +11:00
Campbell Barton
cb7f97891d Cleanup: quiet shadow variable warning, unused variable 2023-01-06 14:00:36 +11:00
Lukas Stockner
00a20aec07 Fix T103403: Lightgroup passes can contain lighting on shadow catchers 2023-01-06 02:33:22 +01:00
Lukas Stockner
bc5337a05a Fix T103507: Distant lights partially contribute to wrong lightgroup
The the BSDF-sampling half of MIS next-event estimation for distant lights was
using the background lightgroup instead of the lamp's lightgroup.
2023-01-06 01:40:44 +01:00
Alexander Gavrilov
4fb0eb3a6e Minor fixes after introducing special BVH traversal for self-collision.
- Add parentheses to suppress an assertion on some compilers.

- It turns out cloth self-collision math is not precisely symmetric,
  so sort the triangle index pair to restore behavior exactly identical
  to the version before the new traversal.

Follow up to rB0796210c8df32
2023-01-06 02:35:23 +02:00
Alexander Gavrilov
0796210c8d BVH: implement an optimized self-overlap traversal.
Previously cloth self-collision and other code that wants self-overlap
data was using an ordinary BVH overlap utility function. This works,
but is suboptimal because it fails to take advantage of the fact that
it is comparing two identical trees.

The standard traversal for self-collision essentially devolves into
enumerating all elements of the tree, and then matching them to the
tree starting at the root. However, the tree itself naturally partitions
the space, so overlapping elements are likely to be mostly placed nearby
in the tree structure as well.

Instead, self-overlap can be computed by recursively computing ordinary
overlap between siblings within each subtree. This only considers each
pair of leaves once, and provides significantly better locality.
It also avoids outputting every overlap pair twice in different order.

Differential Revision: https://developer.blender.org/D16915
2023-01-05 21:46:42 +02:00
Brecht Van Lommel
87f7b630b5 Cleanup: make format 2023-01-05 19:43:19 +01:00
Brecht Van Lommel
084b52bcd8 Cycles: take into account IES texture node strength input for light tree
To better estimate light contribution. Note that estimating the texture
from the IES file is still missing.

Contributed by Alaska.

Differential Revision: https://developer.blender.org/D16901
2023-01-05 19:43:19 +01:00
frogstomp
7d712dcd0b Gpencil: Add offset(Location, Rotation, Scale) by Layer, Stroke and Material to Offset modifier
This patch adds two new panels in which users can control
offset (position, rotation, scale) by layer and by stroke number.

Use cases:
- if you want to create array of Suzannes and place them one behind 
another, in 2d mode, Z depth will be wrong. 
In 3d mode there will be Z fighting. With combination of stroke 
and layer offset we can fight this issue without touching original drawing.
- even easier way to create 2.5d environments.. 
simply draw on layers and then displace them in one panel 
instead fiddling with every layer individually

Possible improvements:
- add offset by material slot
- add step parameter, to allow displacing groups of N strokes.

{F13129598}

Reviewed By: mendio, antoniov

Differential Revision: https://developer.blender.org/D15106
2023-01-05 19:21:51 +01:00
Antonio Vazquez
0fb12a9c2e GPencil: Fix size difference between radial control and Brush size
Due an internal scale of the brush size done by grease pencil
draw tool (this scale factor cannot be removed), the size of the
radial control is not equal to the actual stroke thickness and
this makes the radial size displayed useless.

This patch adds a new property that allows to pass the
path of the tool path and this value is used to apply
the correct scale to the radial size.

Reviewed By: mendio, frogstomp, pepeland, brecht

Differential Revision: https://developer.blender.org/D16866
2023-01-05 19:06:22 +01:00
David Ballesteros
59ce7bf5a9 Nodes: better default name for custom node tree datablocks
Use NodeTree.bl_label instead of "NodeTree" for more descriptive name.

Implemented by Iliya Katueshenock.

Differential Revision: https://developer.blender.org/D16856
2023-01-05 18:37:58 +01:00
8a65e33d41 Pose Library: properly set hard min/max for blend factor
Since rBcommit 74c4977a the pose library blending operator can extrapolate.
This is now also reflected in the hard min/max value of the blend factor
RNA property. The soft min/max are still -1/1 to indicate normal use.
2023-01-05 17:13:01 +01:00
Bastien Montagne
b099e9924e install_deps: Add building of MaterialX.
Ref. T99618
2023-01-05 17:08:45 +01:00
74c4977aea Pose Library: allow extrapolating the pose
While blending, press E to enable extrapolation / overshoot of the pose.
It will make it possible to blend in more than 100% of the pose asset.
This has the potential to completely break the rig, but it can be useful
to exaggerate poses when used with caution.
2023-01-05 16:19:45 +01:00
Philipp Oeser
d1810d11f4 Fix T103303: Dbl-click in the Graph Editor wont select all keyframes
This was the case when an Annotation is also present as in the report.

Since {rB92d7f9ac56e0}, Dopesheet is aware of greaspencil/annotations
(displays its channels/keyframes, can rename their data, layers, fcurve
groupings etc.). However, the Graph Editor does not display these /
should not be aware of them.

Above commit already had issues that were addressed in the following
commits (mostly adding the new `ANIMFILTER_FCURVESONLY` to places that
dont handle greasepencil/annotations)
- {rBfdf34666f00f}
- {rB45f483681fef}
- {rBa26038ff3851}

Now in T103303 it was reported that doublicking a channel would not
select all fcurve`s keyframes anymore and this wasnt actually an issue
with that particular operator, but instead with another operator that is
also mapped to doubleclicking: the channel renaming (I assume the
keyconflict here is actually wanted behavior).
Channel renaming would not return `OPERATOR_PASS_THROUGH` here anymore
in the case nothing cannot be renamed, so we would not actually reach
the 2nd operator at all (the one selecting all keyframes).
Deeper reason for this is that the renaming operator would actually
"see" a channel that could be renamed (in the case of the report: an
annotation layer), but then cannot proceed, because the "real"
underlying data where the doubleclick happens is an fcurve...

So now exclude non-greasepencil channels in filtering as well where
appropriate by also adding `ANIMFILTER_FCURVESONLY` to the filter there.

Fixes T103303.

Maniphest Tasks: T103303

Differential Revision: https://developer.blender.org/D16871
2023-01-05 16:12:25 +01:00
Antonio Vazquez
2a5104e368 Cleanup: Remove compiler warnings 2023-01-05 15:59:51 +01:00
Aleš Jelovčan
a5d4c63e86 GPencil: remove multiframe copy/paste restriction
Multiframe copy paste operations were prohibited by a block of code.
While this is understandable as it prevents confusing actions, there is a good use case to allow multiframe copy pasting.

This patch does:
- remove restricting block of code
- adds outer loops for frames both in copy and paste actions.

In copy action it will create an array of selected strokes from all selected frames
In paste action it will create new from previous copy action merged to a single frame. It will paste to all selected frames and create new frame if autokey is on and time cursor is not on any of the keyframes.

The main usecase is for creating motion smears as in examples attached. The user still need to do some actions in order to achieve desired look, such as stroke ordering and deleting excessive strokes.

{F14069747}

{F14069743}

Reviewed By: antoniov, mendio

Differential Revision: https://developer.blender.org/D16805
2023-01-05 15:49:39 +01:00
Jacques Lucke
3819a9b15a Fix T103614: crash during geometry nodes evaluation with tbb disabled 2023-01-05 15:36:39 +01:00
Bastien Montagne
25e28f518c install_deps: Add package handling for fribidi, harfbuzz, shaderc and vulkan ICD loader.
All these are available on recent distros, don't think it's worth adding
support to build them for the time being.

Ref. T99618.
2023-01-05 14:56:24 +01:00
Jacques Lucke
862d08bb97 Fix: use-after-free when threadlocal is destructed after static variable
This issue was introduced in rB78f28b55d39288926634d0cc.

The fix is to use a `std::shared_ptr` to ensure that the `Global` will live
long enough until all `Local` objects are destructed.
2023-01-05 14:38:34 +01:00
Bastien Montagne
a318f3b8d6 install_deps: Add py binding for OCIO, OIIO, OpenVDB and USD.
This was quite a fight, some resulting notes:
* We cannot use anymore Boost packages because of a weird bug breaking
  Blender debug builds and ivolving Boost, TBB and USD (see also
  rB019b930d6b9c).
* OCIO, OIIO, OpenVDB and USD build options where updated to match these
  from cmake libs building.
** Most notably, USD now has imaging, OIIO, OpenVDB and GL support.

Ref. T99618.
2023-01-05 14:14:01 +01:00
Jacques Lucke
2ffd08e952 Geometry Nodes: deterministic anonymous attribute lifetimes
Previously, the lifetimes of anonymous attributes were determined by
reference counts which were non-deterministic when multiple threads
are used. Now the lifetimes of anonymous attributes are handled
more explicitly and deterministically. This is a prerequisite for any kind
of caching, because caching the output of nodes that do things
non-deterministically and have "invisible inputs" (reference counts)
doesn't really work.

For more details for how deterministic lifetimes are achieved, see D16858.

No functional changes are expected. Small performance changes are expected
as well (within few percent, anything larger regressions should be reported as
bugs).

Differential Revision: https://developer.blender.org/D16858
2023-01-05 14:05:30 +01:00
Sergey Sharybin
4813c37ae2 Cleanup: Better const-correctness in the space clip 2023-01-05 12:40:34 +01:00
Sergey Sharybin
fdc918c32c Cleanup: Better const-correctness in MovieClip
Mainly make MovieClipUser constant.
2023-01-05 12:40:34 +01:00
Sergey Sharybin
58b6c91d36 Cleanup: Remove unused runtime field from the MovieClip
It is a part of old-standing TODO, and code which accesses
the value was commented out for many years.

Remove the field to help with an upcoming const-correctness
improvements.
2023-01-05 12:40:34 +01:00
963600ddc0 CMake: when compiler is too old, report found version
To aid in debugging the case where your compiler is too old for Blender,
actually log which version CMake found.

Before, CMake would output:
```
CMake Error at CMakeLists.txt:121 (message):
  The minimum supported version of GCC is 11.0.0
```

With the patch, it logs:
```
CMake Error at CMakeLists.txt:121 (message):
  The minimum supported version of GCC is 11.0.0, found 10.4.0
```

This has been implemented for GCC and Clang. MSVC has been explicitly
excluded, as the version numbers used for this comparison are internal
versions and not directly usable/recognisable.

Reviewed By: LazyDodo, brecht

Differential Revision: https://developer.blender.org/D16849
2023-01-05 11:34:11 +01:00
Christoph Lendenfeld
200a114e15 Fix T87548: Propagate Pose, Next Keyframe
Change the logic for propagating poses such that it checks keyframes
on all selected bones to determine the frame on which a pose
should be propagated to.
It then adds keyframes if they don't exist on whatever
frame the pose should be propagated to.

Reviewd by: Sybren A. Stüvel
Differential Revision: https://developer.blender.org/D16654
Ref: D16654
2023-01-05 10:39:39 +01:00
Christoph Lendenfeld
76a68649c1 Animation: Graph Editor Ease operator
Added a new operator that aligns selected keys on an exponential curve

Revied by Reviewed by: Sybren A. Stüvel
Differential Revision: https://developer.blender.org/D9479
Ref: D9479
2023-01-05 10:11:24 +01:00
Damien Dh
34fa369b48 Eevee: Mark Properties on Samples Panel Animatable.
Eevee:
Mark `Scene->Sampling->Render/Viewport` samples animatable.
Mark Viewport Denoising also animatable

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D16827
2023-01-05 09:21:23 +01:00
Jeroen Bakker
d7598c8081 Metal: Fix crash when compiling compositor shaders.
Although viewport compositor isn't supported yet on Apple deviced the
shaderlibs are compiled. The compositor shaders uses mat3 constructor
with a single vec3 and 6 floats. This constructor wasn't defined in
metal so it failed the compilation.

This patch adds the override to mat3.
2023-01-05 08:30:41 +01:00
Campbell Barton
bfb0b1decc Cleanup: pass matrix & vector by const reference instead of value 2023-01-05 18:11:16 +11:00
Campbell Barton
77c3e0895d Cleanup: quiet -Wcomma warnings with clang 2023-01-05 17:02:43 +11:00
Campbell Barton
7690872ce4 Cleanup: quiet missing-declaration warnings 2023-01-05 16:44:33 +11:00
YimingWu
93fc352cfa Fix T102612: Line art crash on loading due to references to other scenes. 2023-01-05 12:43:05 +08:00
YimingWu
168091a1d6 Cleanup: Missing debug #ifdef for GPU_vertbuf_raw_step 2023-01-05 11:01:32 +08:00
Michael Jones
a7cc6e015c Cycles: Additional Metal kernel specialisation exposed through UI
This patch adds a new "Kernel Optimization Level" dropdown menu to control Metal kernel specialisation. Currently this defaults to "full" optimisation, on the assumption that the changes proposed in D16371 will address usability concerns around app responsiveness and shader cache housekeeping.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D16514
2023-01-04 23:36:52 +00:00
Chris Blackbourn
496d736adc Cleanup: format 2023-01-05 11:21:51 +13:00
Iliya Katueshenock
433d436b84 Fix: sort link indices in multi input sockets incorrect
For some reason I don't understand, the dragged link is sorted across
all the node's multi-input sockets. This leads to problems when there
are multiple sockets to sort. With this patch, I'm making the feature
work more directional.

Differential Revision: https://developer.blender.org/D16892
2023-01-04 16:37:32 -05:00
Hans Goudey
224d26fd33 Geometry Nodes: Parallelize reading and writing vertex groups
Reading or writing a vertex group is expensive enough that it's worth
parallelizing. On a Ryzen 3700x, in a grid of 250k vertices with
30 randomly assigned vertex groups (each to 10-50% of vertices),
I observed a 4x improvement for writing to a group and a 3x
improvement when reading their data. This significantly speeds
up nodes that create a new mesh from a mesh that had vertex groups.
2023-01-04 16:27:54 -05:00
Jacques Lucke
83f519b7c1 Functions: initialize node storage and default values on first execution
Previously, this happened when the "node task" first runs, which might
not actually execute the node if there are missing inputs. Deferring the
allocation of storage and default inputs allows for better memory reuse
later (currently the memory is not reused).
2023-01-04 18:46:50 +01:00
Hans Goudey
58f1e62871 Geometry Nodes: Parallelize deleting vertex group
Since 78f28b55d39288926634, allocating on multiple threads is much
faster, making it a nice improvement to parallelize vertex group
operations. This patch adds multi-threading when removing a
vertex group from the "Remove Named Attribute" node.

On a Ryzen 3700x:
Before: `(Average: 15.6 ms, Min: 15.0 ms)`
After: `(Average: 8.1 ms, Min: 7.6 ms)`

Differential Revision: https://developer.blender.org/D16916
2023-01-04 12:20:32 -05:00
Jacques Lucke
2540a52f91 Cleanup: quiet unused parameter warning 2023-01-04 17:30:55 +01:00
Michael Jones
77c3e67d3d Cycles: Improved render start/stop responsiveness on Metal
All kernel specialisation is now performed in the background regardless of kernel type, meaning that the first render will be visible a few seconds sooner. The only exception is during benchmark warm up, in which case we wait for all kernels to be cached. When stopping a render, we call a new `cancel()` method on the device which causes any outstanding compilation work to be cancelled, and we destroy the device in a detached thread so that any stale queued compilations can be safely purged without blocking the UI for longer than necessary.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D16371
2023-01-04 16:00:53 +00:00
Germano Cavalcante
fbc2c4c331 Fix T102853: radius of spot and point lamps shares same value with area lamp size
If we change the radius of a point or spot lamp, we also change the area lamp size.

As shown in T102853, this is bad for animating the lamp type.

The solution is to make the property point to another member of the DNA
struct `Light`.

Differential Revision: https://developer.blender.org/D16669
2023-01-04 12:57:33 -03:00
Hans Goudey
20b2d6fc71 Fix T103624: Last node is skipped for cursor and link picking
I wrote the reverse iteration incorrectly in e091291b5b5f525cd8d38898c.
2023-01-04 10:06:17 -05:00