Blender Git Loki

Git Commits -> Revision e8573a5

Revision e8573a5 by Hans Goudey (master)
April 1, 2021, 20:00 (GMT)
Geometry Nodes: Improve speed of boolean node, use multi-input socket

This commit improves the performance of the node by up to 40% in some
cases when there are only two input meshes, mainly by skipping the
conversion to and from BMesh.

When there are more than two input meshes (note the distinction from
"Geometries", a geometry set can have many mesh instances), the
performance is actually worse, since boolean currently always does
self intersection in that case. Theoretically this could be improved
in the boolean code, or another option is automatically realizing
instances for each input geometry set.

Another improvement is using multi-input sockets for the inputs, which
removes the need to have a separate boolean node for every operation,
which can hopefully simplify some node trees.

The changes necessary for transforms in `mesh_boolean_convert.cc` are
somewhat subtle; they come from the fact that the collecting the
geometry set instances already gives transforms in the local space
of the modifier object. There is also a very small amount of cleanup
to those lines, using `float4x4::identity()`.

This commit also fixes T87078, where overlapping difference meshes
makes the operation not work, though I haven't investigated why.

Differential Revision: https://developer.blender.org/D10599

Commit Details:

Full Hash: e8573a59f66281f1d590e3c8b1888cfc7935b1cf
Parent Commit: 76cdcc2
Lines Changed: +165, -153

5 Modified Paths:

/source/blender/blenkernel/BKE_mesh_boolean_convert.h (+21, -0) (Diff)
/source/blender/blenkernel/intern/mesh_boolean_convert.cc (+69, -61) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+1, -1) (Diff)
/source/blender/modifiers/intern/MOD_boolean.c (+1, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_boolean.cc (+73, -91) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021