Some nodes like the Math and Mix Color node are duplicated when looking
at the link add search menu. That's because all nodes are considered in
that operation, even ones that are not listed in the menu. To fix this,
just disable the functionality for those legacy nodes.
Pull Request: https://projects.blender.org/blender/blender/pulls/136979
The Denoise node crashes if used in the viewport compositor. That's
because OIDN uses the compositor context in a different thread, which
does not have access to the DRW context. To fix this, we assign relevant
context data to the compositor context from the DRW context before
running the evaluator, then make the compositor context return those
data instead of accessing the DRW context.
This patch supports GPU OIDN denoising in the compositor. A new
compositor performance option was added to allow choosing between CPU,
GPU, and Auto device selection. Auto will use whatever the compositor is
using for execution.
The code is two folds, first, denoising code was adapted to use buffers
as opposed to passing in pointers to filters directly, this is needed to
support GPU devices. Second, device creation is now a bit more involved,
it tries to choose the device is being used by the compositor for
execution.
Matching GPU devices is done by choosing the OIDN device that matches
the UUID or LUID of the active GPU platform. We need both UUID and LUID
because not all platforms support both. UUID is supported on all
platforms except MacOS Metal, while LUID is only supported on Window and
MacOS metal.
If there is no active GPU device or matching is unsuccessful, we let
OIDN choose the best device, which is typically the fastest.
To support this case, UUID and LUID identifiers were added to the
GPUPlatformGlobal and are initialized by the GPU backend if supported.
OpenGL now requires GL_EXT_memory_object and GL_EXT_memory_object_win32
to support this use case, but it should function without it.
Pull Request: https://projects.blender.org/blender/blender/pulls/136660
Currently, tools like the sculpt tools or vertex paint tools don't do
any viewport culling of points. Meaning that when the screen space
positions are calculated, points that are very far away off-screen,
don't get discarded.
This lead to an issue in `brush_point_influence` because the coordinates
and the distance function were using 32-bit integers. When a point
was far enough away from the mouse position, this caused an overflow
to happen and the distance as well as the influence returned was negative.
To fix the immediate issue, do the distance calculation using floating
point to avoid the calculation from overflowing.
Note that we should still perform viewport culling of points to avoid
this computation alltogether.
Pull Request: https://projects.blender.org/blender/blender/pulls/136976
The current naming of the Hide Collection operator is counterintuitive.
Hide collection implies that it hides the selected collection, but it hides
all the collections that are not selected.
Pull Request: https://projects.blender.org/blender/blender/pulls/129682
Replace use of the UvVertMap table with checks using the existing
connectivity data.
This has the advantage that it's simpler to extend to support
for other kinds of connectivity checks - such as flushing
the selection to edges.
Introduced in de1c911d49
As noted in the comments of this commit, early returning in the
calculation of the Clay Strips brush prior to the plane being calculated
causes the initial value to be unset, which causes the brush to have no
effect even in the initial radius.
Pull Request: https://projects.blender.org/blender/blender/pulls/136962
Resolve CMake warning, using an undefined variable.
Don't attempt to use OSL_SHADER_DIR in it's own hint,
introduced in fix for #73830.
This was also overwriting the previous assignment from "OSL_COMPILER".
Ref !136961
This commit extracts the statements that calculate a brush's relevant
paint BVH node `IndexMask` into a dedicated method. A helper return
`struct` is introduced for the `optional` `plane_center` and
`plane_normal` values that are only relevant for the Plane brush
currently.
Pull Request: https://projects.blender.org/blender/blender/pulls/136859
This was caused by the manager being in sync phase only
between `begin_sync` an `end_sync`. The drawcalls sync
inside `begin_sync` like the lookdev sphere were given
bogus handles.
This also remove some uneeded functions wrappers.
Fixes: #136842, #136645
Caused by 76d6d169ba
When multiple objects are selected to mark as assets, preview generation
job of previous ID in the for loop is cleared by `ED_preview_kill_jobs`
inside `generate_preview`. To fix this, check if `id->preview` exists then
clear the preview job if exists inside the new function
`ED_preview_kill_jobs_for_id`.
Solution proposed by @JulianEisel. I came up with idea to use `wm_job_find`
Pull Request: https://projects.blender.org/blender/blender/pulls/136918
Similar to eae60bc3e6.
The performance improvement depends on the attribute type, domain size,
and whether the cached vert to face map is used for something else like
vertex normal calculation during evaluation. In a simple test with a
large cube, I observed a 6.7x improvement in overall FPS for a 4x4
matrix attribute, a 1.12x improvement for a float attribute, and
roughly equivalent performance for booleans.
Pull Request: https://projects.blender.org/blender/blender/pulls/136941
This PR adds a simple patch to fix libffi compilation errors on Xcode
16.3 / Apple Clang 17. This patch has been ported from libffi Github
PR #857[1] and has now since been included in libffi 3.4.7
[1]: https://github.com/libffi/libffi/pull/857
The reason why we patch libffi v3.4.4 instead of just upgrading to 3.4.7
is that Python require specific versions of its dependencies. (See
comment in build_environment/cmake/versions.cmake about updating Python
version)
Once we upgrade Python and libffi is updated to 3.4.7 or beyond,
this patch can be safely removed.
Pull Request: https://projects.blender.org/blender/blender/pulls/136934
In several nodes such as the capture attribute, bake, simulation, repeat,
and For Each nodes, we already use alignment of input and output sockets
to show when they correspond, make better use of space, and simplify
the UI. This PR extends that change to many more nodes. Sockets are
aligned when they have the same name and data propagates between
them. For now the various "sampling" nodes like Raycast and Sample
Nearest Surface are left out since their interface is a bit more complex.
Backward and forward compatibility aren't affected by this change;
it's just visual.
Pull Request: https://projects.blender.org/blender/blender/pulls/135876
One of the push constant was not set and was thus
in the last state is was in. This is because
we are not using the Batch or IMM API to draw
the batch, and thus, this push constant has to be
set manually upfront.
This commit parallelizes attribute domain interpolation for meshes from
the face corner to vertex domain. Parallel iteration is implemented
using the vertex to face topology map. The same map is used for mesh
normal computations and benefits from potential cost amortization in
its shared cache. This approach then tries to maximize cache usage
while minimizing potential memory consumption by avoiding caching
multiple topology maps.
The performance gain is dependent on the attribute type and domain size.
For a mesh with 16M vertices and 4x4 matrix attribute interpolation,
a 4.5x performance improvement was observed (from 10.7s to 2.38s).
Pull Request: https://projects.blender.org/blender/blender/pulls/135372
This adds a new more accurate antialiasing to the Grease Pencil
render engine. This is only available for render.
This Accumulation AA doesn't replace the SMAA. SMAA is still
used by the viewport and for removing aliasing from the
depth buffer. However, using both at the same time can lead
to overblurred result.
Here are some measurements for how much the render time
increases compared to the baseline with different (SSAA) sample
counts (using an example production file, rendered at 1080p,
results might vary depending on the scene complexity):
* 8 samples: +0.14 s
* 16 samples +0.36 s
* 32 samples: +0.58 s
Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/136551
Currently MetalRT interpolates transformation matrix on per-element basis
which leads to issues like #135659.
This change adds implementation of for decomposed (Scale/Rotate/Translate)
motion interpolation, matching behavior of BVH2 and other HW-RT.
This requires macOS 15 and Xcode 16 in order to use this interpolation.
On older platforms and compilers old interpolation is used.
Currently there is no changes on the user (by default) and it is only
available via CYCLES_METALRT_PCMI environment variable. This is because
there are some issues with complex motion paths that need to be looked
into. Having code available makes it easier to do further debugging.
Ref #135659
Authored by Emma Liu
Pull Request: https://projects.blender.org/blender/blender/pulls/136253
This patch adds a new interpolation option to the Scale node to control
how pixels are sampled during scaling. For constant sizes, this stores
the interpolation for later realization, while for variable sizes, the
interpolation takes effect immediately.
Pull Request: https://projects.blender.org/blender/blender/pulls/135989
This implements bundles and closures which are described in more detail in this
blog post: https://code.blender.org/2024/11/geometry-nodes-workshop-october-2024/
tl;dr:
* Bundles are containers that allow storing multiple socket values in a single
value. Each value in the bundle is identified by a name. Bundles can be
nested.
* Closures are functions that are created with the Closure Zone and can be
evaluated with the Evaluate Closure node.
To use the patch, the `Bundle and Closure Nodes` experimental feature has to be
enabled. This is necessary, because these features are not fully done yet and
still need iterations to improve the workflow before they can be officially
released. These iterations are easier to do in `main` than in a separate branch
though. That's because this patch is quite large and somewhat prone to merge
conflicts. Also other work we want to do, depends on this.
This adds the following new nodes:
* Combine Bundle: can pack multiple values into one.
* Separate Bundle: extracts values from a bundle.
* Closure Zone: outputs a closure zone for use in the `Evaluate Closure` node.
* Evaluate Closure: evaluates the passed in closure.
Things that will be added soon after this lands:
* Fields in bundles and closures. The way this is done changes with #134811, so
I rather implement this once both are in `main`.
* UI features for keeping sockets in sync (right now there are warnings only).
One bigger issue is the limited support for lazyness. For example, all inputs of
a Combine Bundle node will be evaluated, even if they are not all needed. The
same is true for all captured values of a closure. This is a deeper limitation
that needs to be resolved at some point. This will likely be done after an
initial version of this patch is done.
Pull Request: https://projects.blender.org/blender/blender/pulls/128340
The current logic disables WITH_CYCLES_ONEAPI_BINARIES when ocloc is not
found, which is fine, but prevented building for other non-Intel SYCL
targets without (unnecessary) ocloc.
The fix here is to remove spir64_gen target when
WITH_CYCLES_ONEAPI_BINARIES is disabled, instead of forcing only spir64.
Found while investigating #136359.
Steps to reproduce:
- Switch 3D View in Layout workspace to Texture Nodes Editor
- Set the Texture Type selector to Line Style
- Press New
- Notice how no Texture tab appears in the Properties, even though there
is a texture user on the frestyle line set now.
Pull Request: https://projects.blender.org/blender/blender/pulls/136621
This allow to store the full object ID inside a `uint32`
buffer. This allows to get the per object data in deferred
passes and avoid to store object data inside the Gbuffer.
This data is only written if needed.
This had to modify the implementation of subpass input
for all backend to be able to bind layered texture.
This currently work because only the layer 0 is bound to the
framebuffer. This is fragile but I don't see a good builtin way
to fix it.
Rel #135935
#### Tasks
- [x] Replace light linking bits in Gbuffer
- [x] Replace Object ID in GBuffer for SSS
- [x] Conditional storage
- [x] Dummy storage if not needed
Pull Request: https://projects.blender.org/blender/blender/pulls/136428