Deform VDB along "normal" (volume gradient)

   14048   6   7
User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
Is it possible to deform a VDB surface with a volume gradient much like when deforming regular geo with a displace along normal in VOPs? Attached image showing the displace along normal on regular geo, would like a similar result for VDB.

Attachments:
VDB_deform.PNG (719.9 KB)

/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Hi
You could do like this:
- Use VDB analisys to convert your existing volume gradient to a vector with custom name vel (Gradient Scalar -> Vector)
- Mess with these new vectors in a Volume vop
- Then use these vectors as velocity in a VDB Advect SDF to modify the original volume.

Cheers
Bonsak

Attachments:
vdbadvectsdf.hipnc (87.1 KB)

http://www.racecar.no [www.racecar.no]
User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
Thats a realy cool approach would never have thought it! thanks alot
/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
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.

Attachments:
noise.jpg (37.5 KB)

User Avatar
Member
17 posts
Joined: May 2016
Offline
Hi jbudsberg,

Thanks a lot for sharing this method.
Any idea how I could trick this setup to push voxels only laterally ?

I usually just zeroing N.y before displacement when dealing with geometry, but I can't get anything working that way with SDF.

Attachments:
latdisplace.jpg (251.9 KB)

User Avatar
Member
36 posts
Joined: May 2016
Offline
jbudsberg can you explain what you mean by level_set is this is a VDB? I tried this metod.
I merged analisis where I created custom name cpt then merged vdb and analisis together. But I have empty space. I expanded vdb by activate but still the same effect.
User Avatar
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
  • Quick Links