Page MenuHome

Geometry Nodes: Handle multiple grids in the volume to mesh node
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Oct 26 2021, 12:09 AM.

Details

Summary

In future use cases, a volume can contain many grids that represent the
density information. In this case, it's better if the volume to mesh node
creates a mesh based on all of the grids in the volume.

This is also a benefit to share-ability, since one doesn't have to
specify the grid name in the node. Instead, in the future we can have
a way to split particular grids into separate volumes, if only one
grid should be considered.

The code changes are relatively simple:

  • Run the volume to mesh node on all instance geometry, like elsewhere
  • Make the blenkernel's volume to mesh API a bit more specific

This patch also includes a change to the join geometry node to include
all grids in the output. That won't be committed with this patch, but
it's essential for testing. I'll submit that change separately for 3.1.

Diff Detail

Repository
rB Blender
Branch
geometry-nodes-volume-to-mesh-multi-grid (branched from master)
Build Status
Buildable 18211
Build 18211: arc lint + arc unit

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Oct 26 2021, 12:09 AM
Hans Goudey (HooglyBoogly) created this revision.
  • Merge branch 'master' into geometry-nodes-volume-to-mesh-multi-grid
  • Keep the old node around as a legacy node

Can't test this right now, because I can't build with openvdb for some reason..

source/blender/nodes/geometry/nodes/node_geo_volume_to_mesh.cc
42–43

Guess we can also change the names to "Volume" and "Mesh` now?

185

Use the keep_only method.

This revision is now accepted and ready to land.Oct 26 2021, 3:28 PM
Hans Goudey (HooglyBoogly) marked an inline comment as done.Oct 26 2021, 6:10 PM
Hans Goudey (HooglyBoogly) added inline comments.
source/blender/nodes/geometry/nodes/node_geo_volume_to_mesh.cc
42–43

Yeah, good idea