d3d776fd3cac8ded81927bd62277f0dec3db4827
When using a small brush size, if enough latency is encountered, sculpting can become unresponsive. See #131334 for more in-depth information on this issue. In general, this is most apparent to users with the Smooth brush and any brushes with auto-smoothing enabled. Much of the work for this brush action is in retrieving and averaging the neighboring vertex positions. This is wasted work for vertices outside of the brush radius, as ultimately they will have no displacement applied to them. To help mitigate this performance regression, this PR adds a variant of functions that calculate neighboring vertices that takes in the precalculated `factor` to skip further processing. Additionally, some methods are restructured to take advantage of this. This change represents a speedup of 4x, from `0.40ms` without this patch to `0.10ms` with it on a cube with 400k vertices and a brush radius of 10px. For most brush size to BVH Node / Mesh ratios, we see improvements, as we can avoid processing most nodes that a brush only affects a small number of vertices of. For cases where the entire mesh is affected by a brush, this patch does introduce a small but measurable slowdown of 0.31ms to 0.33ms. Ref: #136006 Pull Request: https://projects.blender.org/blender/blender/pulls/136274
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
