diff options
author | Iyad Ahmed <iyadahmed2001> | 2022-09-19 18:13:55 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-19 18:14:08 +0300 |
commit | b6e26a410cd29f32da1e8112607a61f29c2863c4 (patch) | |
tree | 84e442d59e6e367e02961b17b79ab1d77ce7a509 /source/blender/makesdna | |
parent | 0e6a8df6df28fc785ad25aef91a4599865d156f0 (diff) |
Geometry Nodes: Distribute Points in Volume
This commit adds a node to distribute points inside of volume grids.
The "Random" mode usese OpenVDB's "point scatter" implementation, and
there is also a "Grid" mode for uniform distributions. Both methods
operate on all of the float grids in the volume, using every voxel with
a value higher than the threshold. The random method is not stable as
the input volume deforms.
Based on a patch by Angus Stanton (@abstanton), which was based on a
patch by Kenzie (@kenziemac130).
Differential Revision: https://developer.blender.org/D15375
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index a416e184d2b..7832541e360 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -1595,6 +1595,11 @@ typedef struct NodeGeometryUVUnwrap { uint8_t method; } NodeGeometryUVUnwrap; +typedef struct NodeGeometryDistributePointsInVolume { + /* GeometryNodePointDistributeVolumeMode. */ + uint8_t mode; +} NodeGeometryDistributePointsInVolume; + typedef struct NodeFunctionCompare { /* NodeCompareOperation */ int8_t operation; @@ -2176,6 +2181,11 @@ typedef enum GeometryNodeTriangulateQuads { GEO_NODE_TRIANGULATE_QUAD_LONGEDGE = 4, } GeometryNodeTriangulateQuads; +typedef enum GeometryNodeDistributePointsInVolumeMode { + GEO_NODE_DISTRIBUTE_POINTS_IN_VOLUME_DENSITY_RANDOM = 0, + GEO_NODE_DISTRIBUTE_POINTS_IN_VOLUME_DENSITY_GRID = 1, +} GeometryNodeDistributePointsInVolumeMode; + typedef enum GeometryNodeDistributePointsOnFacesMode { GEO_NODE_POINT_DISTRIBUTE_POINTS_ON_FACES_RANDOM = 0, GEO_NODE_POINT_DISTRIBUTE_POINTS_ON_FACES_POISSON = 1, |