Age | Commit message (Collapse) | Author |
|
|
|
Now that the Blender sync mechanism deletes nodes from the scene, we need to
ensure scene update is stopped before we do this.
Also add some more early out in scene geometry update to ensure we do not
continue working on incomplete geometry data, though that was not the cause of
this crash.
|
|
|
|
|
|
Two issues:
* Automatic deduplication of OpenVDB grid data was failing when Cycles had
already cleared the OpenVDB grid, causing an empty grid. Instead rely on
Blender return the same OpenVDB grid pointer when deduplication is possible.
* The volume bounds mesh was not properly cleared when the OpenVDB grid was
empty, causing a mismatch between mesh and voxel data.
|
|
The old attributes were not cleared when synchronizing the geometries, this could also lead to crashes in other cases.
Ref T82608.
|
|
|
|
The names of the parameters are based on those of those of the sockets, so they also need to be updated. This was forgotten about in the previous commit (rBa284e559b90e).
Ref T82561.
|
|
There were some changes to the NanoVDB API that broke the way Cycles was previously using it.
With these changes it compiles successfully again and also still compiles with the NanoVDB revision
that is currently part of the Blender dependencies. Ref T81454.
|
|
The "type" sockets on shader nodes were renamed in rB31a620b9420cab to
avoid clashes with the `NodeType type` member from the Node base class,
but the OSL shader compilation was missing those changes.
|
|
Expand unit test for `BKE_fcurve_active_keyframe_index()` to test edge
cases better.
This also introduces a new test macro `EXPECT_BLI_ASSERT()`, which can be
used to test that an assertion fails successfully.
No functional changes to actual Blender code.
|
|
|
|
|
|
Byte colors must be encoded in sRGB and converted to linear on lookup,
to avoid precision loss.
|
|
Previous code was flipping the bits on a 32-bit number and doing a zero extension to cast to 64-bit, so mark the constant as long to begin with.
This would also erase previously set bits in this part the flag.
|
|
forceinline attribute is only applicable for function which are
marked inline. Interestingly, it can be used for class methods
without explicit inline statement. But for functions it is another
story.
|
|
And remove Blender preference, which was expected to be set to match the system
preference for correct behavior. Instead just handle this automatically.
Differential Revision: https://developer.blender.org/D9402
|
|
|
|
Removed 0.2f factor when setting forces. Why this factor has been used when forces should only be clamped, nobody knows ..
|
|
Volumes using tricubic sampling were producing different results with NanoVDB compared
to dense textures. This fixes that by using the same tricubic sampling algorithm in both
cases. It also fixes some remaining offset issues and some minor things that broke OpenCL
kernel compilation on NVIDIA.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D9491
|
|
Ceres is an external library, so consider it a system header which
makes it so all strict flags are properly ignored for them.
|
|
|
|
|
|
|
|
Nicer appearance for the progress bar that is drawn over the application icon during long processes on macOS.
Differential Revision: https://developer.blender.org/D9398
Reviewed by Brecht Van Lommel
|
|
Use bool return type where possible instead of int (the return values from fluid object are already boolean instead of int).
Also removed several if guards in API functions. If one of the arguments is in fact invalid / nullptr (should not happen though), it better to catch them directly where they failed and not silently escape them.
|
|
ELEM macro isn't available in GHOST library.
|
|
|
|
Use colon after parameters, use hash to reference symbols.
|
|
|
|
|
|
Replace 'set' with 'string(APPEND/PREPEND ...)'.
This avoids duplicating the variable name.
|
|
|
|
|
|
|
|
This commit corrects the maximum resolution field in Fluid objects. The field should be set to the maximum possible resolution, i.e. it should not adjust with adaptive domains and stay constant all the time.
The reason for this is that this resolution value will be used to scale gravity. And this gravity should be constant for adaptive domains too.
It remains to be shown if this issue was the only reason for line-artifacts as seen in T74559.
|
|
The Volume Node did not have all of the sockets from its Mesh base class
which are now required due to the recent socket API change.
|
|
This commit corrects the maximum resolution field in Fluid objects. The field should be set to the maximum possible resolution, i.e. it should not adjust with adaptive domains and stay constant all the time.
The reason for this is that this resolution value will be used to scale gravity. And this gravity should be constant for adaptive domains too.
It remains to be shown if this issue was the only reason for line-artifacts as seen in T74559.
|
|
This was forgotten in the previous fix, we should not modify sockets
updated in a separated thread.
|
|
|
|
Now that the minimum version is macOS 10.13, we can use the new API.
This reverts commit f97a64aa9b7b384f8221a1ef4f2eef9cde1238db.
|
|
|
|
The NanoVDB sampling implementation behaves different from dense texture sampling, so this
adds a small offset to the voxel indices to correct for that.
Also removes the need to modify the sampling coordinates by moving all the necessary
transformations into the image transform. See also T81454.
|
|
The issue is that the shaders are stolen from the original Geometry by
the temporary Geometry used to accumulate data, but the main thread
still needs them for syncing the attributes.
So make a copy of the shader array to preserve the data on the original
Geometry.
|
|
This encapsulates Node socket members behind a set of specific methods;
as such it is no longer possible to directly access Node class members
from exporters and parts of Cycles.
The methods are defined via the NODE_SOCKET_API macros in `graph/
node.h`, and are for getting or setting a specific socket's value, as
well as querying or modifying the state of its update flag.
The setters will check whether the value has changed and tag the socket
as modified appropriately. This will let us know how a Node has changed
and what to update, which is the first concrete step toward a more
granular scene update system.
Since the setters will tag the Node sockets as modified when passed
different data, this patch also removes the various modified methods
on Nodes in favor of Node::is_modified which checks the sockets'
update flags status.
Reviewed By: brecht
Maniphest Tasks: T79174
Differential Revision: https://developer.blender.org/D8544
|
|
This avoids recomputing the BVH for geometries that do not have changes in topology but whose vertices are modified (like a simple character animation), and gives up to 40% speedup for BVH building.
This is only available for viewport renders at the moment.
Reviewed By: pmoursnv, brecht
Differential Revision: https://developer.blender.org/D9353
|
|
This patch allows the user to type a property name into the
Attribute node, which will then output the value of the property
for each individual object, allowing to e.g. customize shaders
by object without duplicating the shader.
In order to make supporting this easier for Eevee, it is necessary
to explicitly choose whether the attribute is varying or uniform
via a dropdown option of the Attribute node. The dropdown also
allows choosing whether instancing should be taken into account.
The Cycles design treats all attributes as one common namespace,
so the Blender interface converts the enum to a name prefix that
can't be entered using keyboard.
In Eevee, the attributes are provided to the shader via a UBO indexed
with resource_id, similar to the existing Object Info data. Unlike it,
however, it is necessary to maintain a separate buffer for every
requested combination of attributes.
This is done using a hash table with the attribute set as the key,
as it is expected that technically different but similar materials
may use the same set of attributes. In addition, in order to minimize
wasted memory, a sparse UBO pool is implemented, so that chunks that
don't contain any data don't have to be allocated.
The back-end Cycles code is already refactored and committed by Brecht.
Differential Revision: https://developer.blender.org/D2057
|
|
Uniform attributes require immediate access to the shader list
in object update code, so setting the field can't be deferred
to a background task. This required adding a parameter to the
clear method of Geometry.
Ref D2057
|
|
WM_POINTERLEAVE occurs when the pen goes out of range or when a
hovering pen leaves the window's boundary. When leaving the window
boundary the xy position is invalid for some Wacom devices.
This change removes creation of GHOST_EventCursor during
WM_POINTERLEAVE events. This prevents unexpected jumping behavior
during continuous grab.
|
|
Cycles defines some basic integer types since it cannot use the standard headers when
compiling with NVRTC. NanoVDB however only does this when the "__CUDACC_RTC__" define
is set and otherwise includes the standard "stdint.h" header which clashes with those typedefs.
So for compatibility do the same thing in the Cycles kernel headers. See also T81454.
|