Geometry Nodes: Use Mesh instead of BMesh in split edges node

Rewrite the edge split code to operate directly on Mesh instead
of BMesh. This allows for the use of multi-threading and makes
the node around 2 times faster. Around 15% of the time is spent
just on the creation of the topology maps, so these being cached
on the mesh could cause an even greater speedup. The new node
gave identical results compared to the BMesh version on all the
meshes I tested it on (up to permutation of the indices).

Here are some of the results on a few simple test cases:
(Intel i7-7700HQ (8 cores) @ 2.800GHz , with 50% of edges selected)
|       | 370x370 UV Sphere | 400x400 Grid | Suzanne 4 subdiv levels |
| ----- | ----------------- | -------------- | --------------------- |
| Mesh  | 89ms              | 111ms          | 76ms                  |
| BMesh | 200ms             | 276ms          | 208ms                 |

Differential Revision: https://developer.blender.org/D16399
This commit is contained in:
Wannes Malfait
2022-11-20 15:42:10 -06:00
committed by Hans Goudey
parent 97e0cc41ca
commit e83f46ea76
4 changed files with 437 additions and 23 deletions

View File

@@ -795,6 +795,7 @@ set(geo_node_tests
mesh_primitives
mesh
mesh/extrude
mesh/split_edges
points
utilities
vector