diff options
author | Hans Goudey <h.goudey@me.com> | 2021-10-26 19:25:44 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-10-26 19:25:44 +0300 |
commit | 8ddfdfd2b2a52f746312246aa3099ab0df8544a0 (patch) | |
tree | 5b228cb84c3587661a9c5b59878ebc6f99f07dd5 /source/blender/blenkernel/BKE_volume.h | |
parent | 7979dff9dc7985cebb530c7490dc730d9c1acf1d (diff) |
Geometry Nodes: Handle multiple grids in the volume to mesh node
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:
- Move the old volume to mesh node to the legacy folder.
- Run the volume to mesh node on all instance geometry, like elsewhere.
- Make the blenkernel's volume to mesh API a bit more specific.
Differential Revision: https://developer.blender.org/D12997
Diffstat (limited to 'source/blender/blenkernel/BKE_volume.h')
-rw-r--r-- | source/blender/blenkernel/BKE_volume.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_volume.h b/source/blender/blenkernel/BKE_volume.h index 5fe0d54c2cf..601e0cf26a9 100644 --- a/source/blender/blenkernel/BKE_volume.h +++ b/source/blender/blenkernel/BKE_volume.h @@ -160,6 +160,7 @@ bool BKE_volume_save(const struct Volume *volume, #ifdef __cplusplus # include "BLI_float3.hh" # include "BLI_float4x4.hh" +# include "BLI_string_ref.hh" bool BKE_volume_min_max(const Volume *volume, blender::float3 &r_min, blender::float3 &r_max); @@ -167,6 +168,10 @@ bool BKE_volume_min_max(const Volume *volume, blender::float3 &r_min, blender::f # include <openvdb/openvdb.h> # include <openvdb/points/PointDataGrid.h> +VolumeGrid *BKE_volume_grid_add_vdb(Volume &volume, + blender::StringRef name, + openvdb::GridBase::Ptr vdb_grid); + bool BKE_volume_grid_bounds(openvdb::GridBase::ConstPtr grid, blender::float3 &r_min, blender::float3 &r_max); |