These nodes allow working with the raw values that make up a matrix.
This can be used to construct a 4x4 matrix directly, without using the
`Combine Transform` node. This allows building transforms with arbitrary
skew, or projection matrices.
Pull Request: https://projects.blender.org/blender/blender/pulls/121283
For example, allow calling an operator when clicking on a
preview tile button. Useful for brush assets where clicking
on an asset shelf item activates the brush.
Useful when the button has no display text but has been set up
to have a quickly accessible tooltip in its place (for example
a brush asset item in the asset shelf).
Make the function naming more generic so extending it in the future
(with asset blend file information for example) won't have to adjust
the function names to correct the semantics itself.
This is used by the brush assets branch. Though it is unused currently, the
argument is added now to reduce the trivial boilerplate changes in the diff.
Allows adding an icon to some search items, similar to what is done
manually for property search. Used for asset catalog search in the
brush assets branch, but more widely useful too.
This avoids negative color darkening caused by strong
directionnal lighting.
However, this reduce the contrast a lot since the
deringing is done on the unclampped spherical harmonics
which is itself extracted from unclamped values from
the world.
The solution to this is to add the parameter for
clamping the world light. This setting will be
reused for #68478.
Fix#116036
Pull Request: https://projects.blender.org/blender/blender/pulls/121303
This caused a weird situation where after keys were inserted, the
animation of the affected object(s) wouldn't actually change in
the 3D viewport (even with scrubbing) until the keys were touched
in one of the animation editors.
Pull Request: https://projects.blender.org/blender/blender/pulls/121302
If both segment handles are `Vector`, changing their type only changes
handle behavior, but doesn't add curvature to the segment. For `Vector`
segments only one step is designated in the evaluated offsets cache,
so `all_bezier_offsets` has to be recalculated. As an optimization,
it would be possible to track if there was any `Vector` handle and
rebuild topology only when it is needed.
Pull Request: https://projects.blender.org/blender/blender/pulls/121292
Add a menu similar to the "Object > Constraints" menu that allows adding,
copying, and clearing modifiers. The "copy all modifiers to selected" and
"clear modifiers" operators are new, to mirror the functionality we already
have for constraints.
The "Add" menu is the same that's used in the property editor. In the 3D
view, modifiers are always added to all selected objects.
Part of #120230
Pull Request: https://projects.blender.org/blender/blender/pulls/121286
This PR adds the *Line Trim* tool to Sculpt mode. It is exposed via
the toolbar along with the other *Trim* tools and as an entry in the
*Sculpt* menu.
## Technical Approach
Line gestures are represented as two points in screen space: the `start`
and `end` of the gesture. Trim tools work by taking a set of screen
points as the top face of a volume, projecting a copy of the face into
the scene, then using that as the operand shape for boolean operations.
To behave as users would expect, the *Line Trim* tool does the following
steps to make the initial face:
1. Take the sculpted object's bounding box.
2. Project the bounding box into screen space
3. Take the magnitude of the diagonal line made from the bounding box
4. Use the magnitude multiplied by an arbitrary factor to ensure the
initial line is long enough to fully divide the object.
5. Create two points by moving in a perpendicular direction from start
and end points.
6. Use the resulting four points as vertices of the quad in screen space.
## Differences with Other Trim Tools
* Line Trim **only** supports the **Difference** mode. As such, the
corresponding tool options have been disabled in the header.
## Alternatives
* Instead of using a boolean operation, this could be achieved by using
a bisect operation when using the *Fixed* projection mode. While this
may result in a better performing tool, it is not guaranteed and
requires extra work to integrate this approach.
Pull Request: https://projects.blender.org/blender/blender/pulls/120845
The Switch View node cannot be automatically updated when new views are added.
This is because there is no tree update operation after adding new views. This
patch simply fix it by tag the node tree and update it.
Pull Request: https://projects.blender.org/blender/blender/pulls/120685
This patch implements the Fast Gaussian blur mode for the Realtime
Compositor. This is a faster but less accurate implementation of
Gaussian blur.
This is implemented as a recursive Gaussian blur algorithm based on the
general method outlined in the following paper:
Hale, Dave. "Recursive gaussian filters." CWP-546 (2006).
In particular, based on the table in Section 5 Conclusion, for very low
radius blur, we use a direct separable Gaussian convolution. For medium
blur radius, we use the fourth order IIR Deriche filter based on the
following paper:
Deriche, Rachid. Recursively implementating the Gaussian and its
derivatives. Diss. INRIA, 1993.
For high radius blur, we use the fourth order IIR Van Vliet filter based
on the following paper:
Van Vliet, Lucas J., Ian T. Young, and Piet W. Verbeek. "Recursive
Gaussian derivative filters." Proceedings. Fourteenth International
Conference on Pattern Recognition (Cat. No. 98EX170). Vol. 1. IEEE,
1998.
That's because direct convolution is faster and more accurate for very
low radius, while the Deriche filter is more accurate for medium blur
radius, while Van Vliet is more accurate for high blur radius. The
criteria suggested by the paper is a sigma value threshold of 3 and 32
for the Deriche and Van Vliet filters respectively, which we apply on
the larger of the two dimensions.
Both the Deriche and Van Vliet filters are numerically unstable for high
blur radius. So we decompose the Van Vliet filter into a parallel bank
of smaller second order filters based on the method of partial fractions
discussed in the book:
Oppenheim, Alan V. Discrete-time signal processing. Pearson Education
India, 1999.
We leave the Deriche filter as is since it is only used for low radii
anyways.
Compared to the CPU implementation, this implementation is more
accurate, but less numerically stable, since CPU uses doubles, which is
not feasible for the GPU.
The only change of behavior between CPU and this implementation is that
this implementation uses the same radius, so Fast Gaussian will match
normal Gaussian, while the CPU implementation has a radius that is 1.5x
the size of normal Gaussian. A patch to change the CPU behavior #121211.
Pull Request: https://projects.blender.org/blender/blender/pulls/120431
The `DrawingPlacement` utility struct is initialized based on various
tool settings, including the `gpencil_v3d_align` flag. This flag was
used in a switch statement, but didn't handle all the potential flag
combinations, leaving placement variables like the origin vector
uninitialized and causing nan values when projecting.
Pull Request: https://projects.blender.org/blender/blender/pulls/121246
This patch matches the size of the Fast Gaussian mode of blur with the
standard Gaussian mode. The sigma value was computed as half the radius,
while it should be third of the radius, since Blender's Gaussian
function is truncated at 3 of the standard deviation of the unit
Gaussian. The patch include versioning to adjust the size of existing
files.
Pull Request: https://projects.blender.org/blender/blender/pulls/121211
There were two functions copying modifiers. The modifier operator
exposed in the property editor reported for various failures. Outliner
drag and drop did not. This commit refactors code a bit to unify the
two. Outliner drag and drop should now report why it fails too.
Implement the design discussed in #120384.
This adds two parameters. One for changing the approximation
method, and another to use the thickness from shadow map.
We pack the former in the gbuffer by dividing the 16bits
used for thickness by two and use one bit to store the
method.
The thickness from shadow map is now decoupled from the
light evaluation shader. This makes it more performant and
compatible with ray-tracing. This commit also uses the
same biases as shadow mapping to avoid aliasing artifacts
(fix#119339).
This refactors the light evaluation quite a bit to
remove unused bits bits and make the whole transmission
light evaluation without too much complexity.
Pull Request: https://projects.blender.org/blender/blender/pulls/121171