When should use "Distance VDB" or "Fog VDB"?

   4440   5   2
User Avatar
Member
12 posts
Joined: April 2019
Offline
I often use VDB to make details.There are two options in VDBFromPolygon node,one is Distance VDB,the other is Fog VDB.I can't tell the difference between them exactly.Are they both belong to some kind of SDF(Signed-distance-field)?I want to know when should use Distance VDB and when should use Fog VDB.It's hard for me to find the rule of using them.
User Avatar
Member
17 posts
Joined: July 2015
Offline
Hi,

“Distance VDB
Creates a signed distance field (SDF). An SDF stores the distance to the surface in each voxel. (If the voxel is inside, the distance is negative.)”


“Fog VDB
Creates a density field. Voxels in the band on the surface store 1 and voxels outside store 0.”

You can find more information in the doc on what they do and when to use them:
https://www.sidefx.com/docs/houdini/nodes/sop/vdbfrompolygons.html [www.sidefx.com]

So you can use one or the other method depending on what you want to do after. You can then manipulate the VDB SDF or VDB fog with various nodes.
User Avatar
Member
12 posts
Joined: April 2019
Offline
Can you give me an example like when using SDF is better than fog VDB?I feel fog VDB is easier.
User Avatar
Member
7802 posts
Joined: Sept. 2011
Offline
I don't understand the question. The are not comparable qualitatively.

An SDF is more specific than a fog volume, since it represents actual distances. It can be used to render a surface. Its derivative can describe the direction perpendicular to the surface.

A fog volume represents density, values are typically greater than 0. They are used for representing smoke or fog or alpha mask fields.
User Avatar
Member
92 posts
Joined: Aug. 2010
Offline
I suggest you spend some time digging into my OpenVDB example HIP file:
https://www.openvdb.org/download/ [www.openvdb.org]

It walks you through many of these concepts in detail, which should give you more information on the different VDB grid types and respective tools.

Jeff
User Avatar
Member
2 posts
Joined: Jan. 2022
Offline
Could this be updated for Houdini 19 please? I get a wall of errors when I try to open it in 19, but it seems some of the examples work.
  • Quick Links