Blender Git Commit Log

Git Commits -> Revision 602ecbd

Revision 602ecbd by Jacques Lucke (master)
November 26, 2021, 14:33 (GMT)
Geometry Nodes: optimize Set Position node

This implements four optimizations in the Set Position node:
* Check whether the position input is the current position and ignore
it if it is. This results in a speedup when only the Offset input is used.
* Use multi-threading when copying to computed values to the
position attribute. All geometry types benefit from this.
* Use devirtualization for the offset and position input. This optimizes
the common case that they are either single values or computed
in the fly in a span.
* Write to `Mesh->mvert` directly instead of creating a temporary span.
This makes setting mesh vertex positions even more efficient.

In my simple benchmark I'm using a White Noise node to offset the
position of 1,000,000 vertices. The speed is `20 ms -> 4.5 ms` in the
multi-threaded case and `32 ms -> 22 ms` in the single-threaded case.

Commit Details:

Full Hash: 602ecbdf9aef58a4e3c8d7ea5db22a913bf60525
Parent Commit: eb7827e
Lines Changed: +140, -12

2 Modified Paths:

/source/blender/blenlib/BLI_virtual_array.hh (+63, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_set_position.cc (+77, -12) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021