This patch exposes the Cycles Alembic Procedural through the MeshSequenceCache
modifier in order to use and test it from Blender.
To enable it, one has to switch the render feature set to experimental and
activate the Procedural in the modifier. An Alembic Procedural is then
created for each CacheFile from Blender set to use the Procedural, and each
Blender object having a MeshSequenceCache modifier is added to list of objects
of the right procedural.
The procedural's parameters derive from the CacheFile's properties which are
already exposed in the UI through the modifier, although more Cycles specific
options might be added in the future.
As there is currently no cache controls and since we load all the data at the
beginning of the render session, the procedural is only available during
viewport renders at the moment. When an Alembic procedural is rendered, data
from the archive are not read on the Blender side.
If a Cycles render is not active and the CacheFile is set to use the Cycles Procedural,
bounding boxes are used to display the objects in the scene as a signal that the
objects are not processed by Blender anymore. This is standard in other DCCs.
However this does not reduce the memory usage from Blender as the Alembic data
was already loaded either during an import or during a .blend file read.
This is mostly a hack to test the Cycles Alembic procedural until we have a
better Blender side mechanism for letting renderers load their own geometry,
which will be based on import and export settings on Collections (T68933).
Ref T79174, D3089
Reviewed By: brecht, sybren
Maniphest Tasks: T79174
Differential Revision: https://developer.blender.org/D10197
The main reason for this is to speed up updates by avoid unnecessary
copies as the Generated coordinates are a copy of the vertices.
Creating this attribute may become optional in the future, with UI
parameters to select which attribute to use from the Alembic archive as
reference.
This modifies the attribute lookup to use object coordinates if no
generated coordinates are found on the geometry.
This is useful to avoid creating and copying this attribute, thus saving
a bit of time and memory.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D12238
Vertex normals are needed for normals maps and therefore are packed and send
to the device alongside the other float3 attributes. However, we already pack
and send vertex normals through `DeviceScene.tri_vnormal`.
This removes the packing of vertex normals from the attributes buffer, and
reuses `tri_vnormal` in the kernel for normals lookup for normal maps, which
reduces memory usage a bit, and speeds up device updates.
This also fixes potential missing normals updates following rB12a06292af86,
since the need for vertex normals for normals maps was overlooked.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D12237
Removes the artificial requirement that UDIM tile sets start at 1001.
Blender was already capable of handling sparse tile sets (non-contiguous
tiles) so the restriction around starting at 1001 was unnecessary in
general.
This required fixing a few UDIM-related python bugs around manually
updating the `tile_number` field on images as well. See the differential
for details. No script changes are necessary but they will now work,
correctly, in many more cases.
Differential Revision: https://developer.blender.org/D11859
`frame_current_final()` should be used to access the Scene time after
remapping, which also matches how the particles system handles time.
Reviewed By: brecht
Maniphest Tasks: T77307
Differential Revision: https://developer.blender.org/D12239
Standard attributes are not added to the attributes requests when
shaders only have displacement. This is because nodes are only
considering the case when the surface socket is connected.
To support this, added `Shader.has_surface_link()` which checks for both
cases (`has_surface` and `has_displacement`) and replaces all checks on
`Shader.has_surface`.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D12240
To improve the presentation of nodes in the node editor. Recognize the
following metadata from the OSL specification:
* [[ string label = "UI Label" ]]
* [[ string widget = "checkBox" ]]
* [[ string widget = "boolean" ]]
Ref T89741
Differential Revision: https://developer.blender.org/D12074
Caused by 4f64fa4f8628.
Was a bad backport from the Cycles X branch: the fact that CPU and GPU
has different reset code paths was not taken into account.
This is a backport of recent development in the Cycles X branch.
Fixes possible dead-lock in viewport rendering when exiting at an
exact bad moment (couldn't reproduce in master branch, but in the
cycles-x branch it was happening every now and then).
Differential Revision: https://developer.blender.org/D12154
Makes it consistent with the guidelines and the Cycles X branch, and
allows to backport fix for the viewport update from the branch. Will
cause a merge conflict, which should be simple accept-ours in the
branch.
The Xcode IDE can also benefit from the options:
- WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS
- WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS
So add suport to these options and also renames them as they are no
longer limited to just Windows and Visual Studio.
Reviewed By: brecht, ankitm
Differential Revision: https://developer.blender.org/D12132
The immediate reason for this is that we want to be able to initialize them
to different defaults for light objects, which is hard with Python properties.
But in general it is useful to be able to share these with other renderers.
As a side effect, Eevee now supports a per-object holdout instead of only
per-collection.
Differential Revision: https://developer.blender.org/D12133
The goal: allow to easily use AO approximation in scenes which combines
both small and large scale objects.
The idea: use per-object AO distance which will allow to override world
settings. Instancer object will "propagate" its AO distance to all its
instances unless the instance defines own distance (this allows to
modify AO distance in the shot files, without requiring to modify props
used in the shots.
Available from the new Fats GI Approximation panel in object properties.
Differential Revision: https://developer.blender.org/D12112
Motion attributes expects mesh to have non-zero number of motion steps,
which was violated in the case when fluid mesh had motion blur disabled.
This is a bit of annoying fix, because of the order of updates. More
ideal solution would be to handle cached and fluid velocities in the
sync_mesh_motion() which ensures all the dependencies between settings.
WITH_CYCLES_DEBUG was used for rendering BVH debugging passes. But since we
mainly use Embree an OptiX now, this information is no longer important.
WITH_CYCLES_DEBUG_NAN will enable additional checks for NaNs and invalid values
in the kernel, for Cycles developers. Previously these asserts where enabled in
all debug builds, but this is too likely to crash Blender in scenes that render
fine regardless of the NaNs. So this is behind a CMake option now.
Fixes T90240
Makes it so Render Layers node in the compositor is updated as soon
as Use Denoising is changed for the final render.
Differential Revision: https://developer.blender.org/D12010
This fixes a performance regression on Ampere cards, on specific scenes like
classroom. For cycles-x there is little difference, but this is still helpful
for LTS releases, and we need to upgrade at some point anyway.
Cached OCIO processors were not freed, instead the color spaces were freed twice.
Reviewed By: brecht, sergey
Differential Revision: https://developer.blender.org/D12011
Fix an incoherence between the Eevee Materials menu and the Cycles Materials menu :
Eevee :
{F10230448}
Cycles :
{F10230449}
Simply Fixed by replacing the Cycles UI code by the Eevee UI code.
Thanks to @Brainzman for helping me create this diff and translate
Reviewed By: Blendify
Differential Revision: https://developer.blender.org/D11979
It was possible that render buffers and scene kernel data will be out
of sync because reset and scene update happens in different locks.
This is similar issue we've fixed in the Cycles X branch, so backported
relevant changes from there.
This change removes what seems to be unused feature kernel.
Differential Revision: https://developer.blender.org/D11828