Page MenuHome

Geometry Nodes: Support volumes in the bounding box node
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Apr 7 2021, 5:47 AM.

Details

Summary

We should strive to support all data types for nodes in the "Geometry"
category. To support volumes I did two small refactors:

First, I moved BKE_volume_grid_bounds to require WITH_OPEN_VDB like
other utlities and simplified it slightly.

Second, I added a BKE_volume_grid_shallow_transform helper function.
This is useful to obtain a shallow copy of a grid with a different
transform. It can also be used in D10506 (any place that uses
instanced volumes).

Diff Detail

Repository
rB Blender
Branch
bounding-box-volume-support (branched from master)
Build Status
Buildable 13924
Build 13924: arc lint + arc unit

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Apr 7 2021, 5:47 AM
Hans Goudey (HooglyBoogly) created this revision.
Hans Goudey (HooglyBoogly) added inline comments.
source/blender/blenkernel/intern/volume.cc
926–927

This check is a little suspect given the one a few lines above, but it is the existing behavior, I think it should just be removed though.

I wonder, how did you test this? It seems like it does not work on the output of the Points to Volume node.

The other refactors seem fine and can be committed separately.

source/blender/blenkernel/intern/volume.cc
926–927

It seems like in this case the bounding box exists, but it has been tagged dirty. So I think it should be freed and recomputed.

1486

unnecessary empty line

source/blender/nodes/geometry/nodes/node_geo_bounding_box.cc
17

remove commented code

Hans Goudey (HooglyBoogly) marked 2 inline comments as done.
  • Make volume bound box work with non-instances

There is some extra cleanup that can be split out from this patch currently,
and a const cast before BKE_volume_load that I will try a refactor to remove.

This revision was not accepted when it landed; it landed in state Changes Planned.Apr 8 2021, 9:33 PM
This revision was automatically updated to reflect the committed changes.