Deform VDB along "normal" (volume gradient)
14059 6 7- MagnusL3D
- Member
- 1104 posts
- Joined: Aug. 2008
- Offline
- bonsak
- Member
- 459 posts
- Joined: Oct. 2011
- Offline
- MagnusL3D
- Member
- 1104 posts
- Joined: Aug. 2008
- Offline
- jbudsberg
- Member
- 92 posts
- Joined: Aug. 2010
- Offline
advecting to displace a level set along the gradient isn't necessary. take your level set and add a noise that samples the closest point transform (don't sample the noise via position).
level set -> vdb analysis (CPT) -> merge (level set & CPT)
then, something like this in a volume wrangle (or volume vop):
@surface += noise( @cpt )
note you need a wide-enough narrow band to account for how far you displace the level set, so you may need to increase the narrow band (vdb activate sdf) prior to the vdb analysis.
level set -> vdb analysis (CPT) -> merge (level set & CPT)
then, something like this in a volume wrangle (or volume vop):
@surface += noise( @cpt )
note you need a wide-enough narrow band to account for how far you displace the level set, so you may need to increase the narrow band (vdb activate sdf) prior to the vdb analysis.
- PascalBkm
- Member
- 17 posts
- Joined: May 2016
- Offline
- TheCrisis
- Member
- 36 posts
- Joined: May 2016
- Offline
- jbudsberg
- Member
- 92 posts
- Joined: Aug. 2010
- Offline
Hi TheCrisis!
I suspect what you know as a VDB is a “fog volume”, where inside values are positive scalar values and 0 outside (for example density). VDB is not limited to only fog volumes, you can store all sorts of data in the VDB structure.
A level set is a different and very efficient way of describing a surface–it is a signed-distance field that extends from the surface. Voxels inside the surface are negative scalar values describing the distance to the closest point on the surface, while outside voxels are positive (0 at the boundary). Typically, you are only interested in the area near the surface, hence we often only store the first few voxel bands around the surface (the “narrow band”).
You should spend some time looking through my OpenVDB example HIP file; it walks you through many VDB concepts, as well as the tools available in Houdini. I have an entire section devoted to building and manipulating level sets.
http://www.openvdb.org/download [www.openvdb.org] look for “Houdini Examples zip”
-Jeff
I suspect what you know as a VDB is a “fog volume”, where inside values are positive scalar values and 0 outside (for example density). VDB is not limited to only fog volumes, you can store all sorts of data in the VDB structure.
A level set is a different and very efficient way of describing a surface–it is a signed-distance field that extends from the surface. Voxels inside the surface are negative scalar values describing the distance to the closest point on the surface, while outside voxels are positive (0 at the boundary). Typically, you are only interested in the area near the surface, hence we often only store the first few voxel bands around the surface (the “narrow band”).
You should spend some time looking through my OpenVDB example HIP file; it walks you through many VDB concepts, as well as the tools available in Houdini. I have an entire section devoted to building and manipulating level sets.
http://www.openvdb.org/download [www.openvdb.org] look for “Houdini Examples zip”
-Jeff
-
- Quick Links