Age | Commit message (Collapse) | Author |
|
This fixes two issues:
* There was a crash when the new attribute name was empty.
* The attribute name was incremented (e.g. "Attribute.001") when
the old and new name were the same.
|
|
Cyclic curves don't need the tangent correction based on the first
and last handle position.
|
|
|
|
|
|
|
|
Proposed solution by @scurest The color attribute in the RNA was tagged as
COLOR_GAMMA. This change will change it to a regular COLOR.
{F13217692}
Reviewed By: joeedh, jbakker
Maniphest Tasks: T99036
Differential Revision: https://developer.blender.org/D15272
|
|
It looked up the vertex group index based on the object instead of the
actual mesh that is currently used. Since geometry nodes, the number
and order of attributes can change in arbitrary ways during evaluation.
Therefore, this index has to be looked up on the mesh which contains
the most up-to-date information.
There are probably similar issues in other modifiers. That has to be
fixed step by step. Ideally by using the attribute api directly eventually.
|
|
When dragging assets into the 3D View while in any other mode than
object mode, dropping would be disabled and the cursor would indicate
that. However there was supposed to be an "Only supported in object
mode" message, that similar operators showed, but got forgotten when
this one was introduced.
|
|
UV maps that are used for surface attachment must not have overlapping
uv islands, because then the same uv coordinate would correspond to
multiple surface positions.
Ref T99936.
|
|
|
|
|
|
|
|
|
|
Calling two non-const methods on a `MutableAttributeAccessor`
at the same time in multiple threads is not safe.
While I don't know what caused the crash here exactly, I do know
that it happens while looking up the attribute for writing, which
may modify the unterlying geometry. I couldn't reproduce the
bug with a debug build or without threading.
|
|
When texture painting a lot of time is spent in ED_image_paint_tile_find.
This fixes stores the PaintTiles in a blender::Map making ED_image_paint_tile_find an O(1) rather than O(n) operation.
When using threading the locking should happen during read as well,
still this gives a boost in performance as the read is now much faster.
Reviewed By: jbakker
Maniphest Tasks: T99546
Differential Revision: https://developer.blender.org/D15415
|
|
In a test producing 10 million vertices I observed a 3.6x improvement,
from 470ms to 130ms. The largest improvement comes from calculating
each mesh array on a separate thread. Besides that, the larger changes
come from splitting the filling of corner and face arrays, and
precalculating sines and cosines for each ring.
Using `parallel_invoke` does gives some overhead. On a small 32x16
input, the time went up from 51us to 74us. It could be disabled
for small outputs in the future. The reasoning for this parallelization
method instead of more standard data-size-based parallelism is that the
latter wouldn't be helpful except for very high resolution.
|
|
renamed
As discussed, this only updates objects in and the world of the scene to which the view layer belongs, which also avoids the problem of not having a BMain available.
Differential Revision: https://developer.blender.org/D14740
|
|
The Alembic importer uses a linear search over the mesh edges to find
the right edge when setting edge creases. Although the complexity is
`O(m * n)`, with `m` being the number of creased edges, and `n` being
the number of edges, this can lead to a quadratic complexity as `m`
approches `n`.
This patch uses `EdgeHash` to store and retrieve the edges, which
should bring complexity closer to `O(n)`, provided that lookup is
`O(1)`.
See differential for some timings. In most files, this is expected
to give at least a 2-3x speedup for this operation, but can lead
orders of magnitude speed increase for dense meshes with a significant
number of edge creases.
Differential Revision: https://developer.blender.org/D15521
|
|
Use the C++ API to implement more of the existing C functions.
This corrects the cases where one tries to add a builtin attribute
with the wrong domain or type on curves, though a better warning
message would be helpful in the future, and also reduces duplication
of the internal logic. Not much more is possible without changing
the interface.
|
|
This avoids correlation artifacts with the jitter pattern itself.
Also try to reduce the visible spiral pattern.
|
|
The display depth is used to composite Gpencil and Overlays. For it to
be stable we bias it using the dFdx gradient functions. This makes
overlays like edit mode not flicker.
The previous approach to save the 1st center sample does not work anymore
since we jitter the projection matrix in a looping pattern when scene
is updated. So the center depth is only (almost) valid 1/8th of the times.
The biasing technique, even if not perfect, does the job of being stable.
This has a few cons:
- it makes the geometry below the ground plane unlike workbench engine.
- it makes overlays render over geometry at larger depth discontinuities.
|
|
|
|
|
|
This might make the image a bit blurier but it reduces the flickering of
shiny surfaces during animation.
This uses the technique described in "High Quality Temporal Supersampling"
by Brian Karis at Siggraph 2014 (Slide 45): Reduce the exponential factor
when the history is close the bounding box border.
|
|
A few offsets were missing.
Reminder that this does not change the actual render resolution but it
reduces the VRAM consumption of accumulation buffers.
|
|
|
|
|
|
No functional changes.
|
|
Use the new attribute API to implement the attribute remove function
used by RNA, except for BMesh attributes. Currently, removing curve
attributes from the panel in the property editor does not mark the
relevant caches dirty (for example, the cache of curve type counts),
because that behavior is implemented with the new attribute API.
Also, eventually we want to merge the two APIs, and removing an
attribute is the first function that can be partially implemented
with the new API.
Differential Revision: https://developer.blender.org/D15495
|
|
... as a debug option.
|
|
There was a confusion about what space the offset was in.
|
|
The face merging code in exact boolean made an assumption that
the tesselated original face was manifold except at the boundaries.
This should be true but sometimes (e.g., if the input faces have
self-intersection, as happens in the example), it is not.
This commit makes face merging tolerant of such a situation.
It might leave some stray edges from triangulation, but it should
only happen if the input is malformed.
Note: the input may be malformed if there were previous booleans
in the stack, since snapping the exact result to float coordinates
is not guaranteed to leave the mesh without defects.
This is the second try at this commit. The previous one had a typo
in it -- luckily, the tests caught the problem.
|
|
|
|
objects by name
Previously, when creating "very large" (tens-hundreds of thousands)
amounts of objects, the Blender code that was ensuring name
uniqueness was the bottleneck. That got recently addressed (D14162),
however now sorting of IDs by their names is the remaining bottleneck.
Name sorting code in Blender is optimized for the pattern where names
are inserted in already sorted order (i.e. objects expect to get added
near the end of the list). By doing this pre-sorting of objects
intended to get created by an importer (USD and OBJ, in this patch),
this sorting bottleneck can be largely removed, especially with very
high object counts.
Windows, Ryzen 5950X, import times:
- OBJ, splash screen scene (26k objects): 22.0s -> 20.7s
- USD, Disney Moana scene (250k objects): 585s -> 82.2s (10 minutes -> 1.5 minutes)
Reviewed By: Michael Kowalski, Howard Trickey
Differential Revision: https://developer.blender.org/D15506
|
|
|
|
|
|
Regression from 087f27a52f78
|
|
Geometry nodes has added the ability to modify mesh vertex groups
during evaluation (see 3b6ee8cee7080af2). However, the armature
modifier always uses the vertex groups from the original object.
This is wrong for the modifier stack, where each modifier is meant
to use the output of the previous.
This commit makes the armature modifier use the evaluated vertex groups
if they are available. Otherwise it uses the originals like before.
Differential Revision: https://developer.blender.org/D15515
|
|
This uses the exposure to get a better approximation of the perceptual
brighness of a sample before accumulating it.
Note that we do not modify exposure of the image. Only the samples weights
are computed differently.
|
|
The swaps during accumulation were ignored because of the way the
`SwapChain<>` implementation works.
Using external references and updating them fixes the issue.
|
|
|
|
Also rearrange some lines to simplify logic.
|
|
Since fd5e5dac8946b13599, the node would remove the attribute before
adding it again, which lost the vertex group status of an attribute,
meaning they were written as arbitrary attributes.
Now, the node first tries to write to attributes with the same domain
and data-type, which covers the vertex group case. Then it falls back
to removing the attribute and adding it again. Even that can fail
though, so I added an error message to make that a bit clearer.
Differential Revision: https://developer.blender.org/D15514
|
|
Error in {rB98bf714b37c1}
|
|
Use the newer more generic sampling and interpolation functions
developed recently (ab444a80a280) instead of the `CurveEval` type.
Functions are split up a bit more internally, to allow a separate mode
for supplying the curve index directly in the future (T92474).
In one basic test, the performance seems mostly unchanged from 3.1.
Differential Revision: https://developer.blender.org/D14621
|
|
Previously, curves sculpt tools only worked on original data. This was
very limiting, because one could effectively only sculpt the curves when
all procedural effects were turned off. This patch adds support for curves
sculpting while looking the result of procedural effects (like deformation
based on the surface mesh). This functionality is also known as "crazy space"
support in Blender.
For more details see D15407.
Differential Revision: https://developer.blender.org/D15407
|
|
Simplify the transform code by bundling the TransData creation, Data
recalculation, and special updates into a single struct.
So similar functions and parameters can be accessed without special
type checks.
Differential Revision: https://developer.blender.org/D15494
|
|
This allows parts of the code to be threaded more easily.
|
|
Doing this in preparation for D15407.
|
|
Add sin_cos_from_fraction which ensures each quadrant has matching
values when their sign is flipped.
|