Convert VDB

The Ultimate Houdini node reference

Visit the Node Bible

To learn more, please log in or sign up for free to explore the Node Bible.
Write your awesome label here.

Convert VDB

The Convert VDB Sop allows to convert an existing VDB field into a standard/traditional volume, polygons, a different kind of vdb, or a polygon soup. This also allows the conversion from standard volumes into VDBs.
Drag to resize

Summary:

    The Convert VDB is great for times when you need to convert into any of the above primitive types or change the vdb class/type/precision that you're working with. This node also has many options which aim to control how polygons are generated based on an existing mesh or field. The first input expects the volumes to be converted. The second input expects geometry which may be used to provide a polygonal reference for shaping newly generated polygons. The third input expects fields which can be used for masking certain operations (such as which voxels to convert into polygons and/or specifying an adaptivity multiplier).  In other words, the second and third inputs are used for controlling how this node generates polygons or polysoups.

Drag to resize

Main Parameters:


Group:

-- The Group field allows you to choose which field you'd like to convert. If, let's say, you have multiple vdb fields plugging into the first input, then this allows you to select which one will get converted. You need to use the syntax: "@name=foo" to select which field you'd like to use. Alternatively, you can use the dropdown arrow to select which one and it will write out the expression for you.

Convert To:

-- Volume = This converts to a standard/traditional volume. For more information about standard volumes vs. VDBs, please visit the Intro to Volumes lesson at Houdini For the New Artist II.

-- VDB = If you have an existing VDB field, and you'd like to change its class/type/or precision, then this is the setting you'll want to use. Also, if you're trying to convert a standard volume to VDB, this is what you'll want to use.

-- Polygons =  This will create polygons and utilized the second and third input.

--  Polysoup =   A polygon soup is a special type of primitive that gets used to save memory and time for large amounts of geometry. In practice, polygon soups are often used when meshing fluids because it requires less memory to represent the object. It does this various ways, but the main way is by removing redundant data that may get stored within vertices. Keep in mind that turning things into polysoups has downsides, however. For one, certain nodes will not work on polysoups. Also, other render engines may not be able to render out polysoups. For more information, visit the SideFX documentation.

Split Disjoint Volumes:


--  This parameter seems to be bugged at the moment because it will not do as the documentation says.  In theory, this ought to take dis-connected geometry and separate them out into their own fields.  According to the docs, "When converting VDB to dense volumes, create multiple volume primitives per VDB for unconnected regions where possible. This allows very large and sparse VDBs to be converted with less memory usage."  In the past, this option has been useful for creating compatible volumes for Octaine/Redshift.  However, these days it appears unnecessary, and if you're trying to separate out vdbs based on connectivity, then it's better to use the VDB Segment By Connectivity SOP.

VDB Class:

--  For more information out various VDB Classes, please refer to the VDB SOP Node Bible entry.  In this case, an SDF/Distance volume is = A "Level Set" VDB class.

VDB Type:

-- This specifies the data type of the values stored within the voxels.  For more information about Data Types, visit the tutorial on Houdini For the New Artist II where I talk about that.

VDB Precision:

--  This relates to the amount of data that the VDB Type can store.  Higher bit rate = more memory = more accuracy when solving = slower.  Slower bit rate = less memory = less precise = faster to calculate.  In general, 32 bit ought to work well for most situations.

Fog Isovalue:

--  If you're converting a Fog to an SDF, the Isovalue is asking you, 'What does the density value need to be to determine where the surface of the new SDF goes?"  In other words, if I said, "Ok, the isovalue is 0.1," then that means any density values of .1 are considered to be the surface of the new SDF value.  

Prune Tolerance:

--  According to the docs, "After building the VDB grid there may be undetected constant tiles. This tolerance is used to detect constant regions and collapse them. Such areas that are within the background value will also be marked inactive." It's unclear what "constant tiles" are based off of this description, but the defaults ought to work fine in most situations.  Basically put, if you have some strange vdb values just hanging out in places they shouldn't be, then the prune tolerance might clean them up.

Signed-Flood-Fill Output SDFs:

--  According to the docs, "Tests areas of inactive background values to determine if they are inside or outside of an SDF, and hence whether they should have negative or positive sign." In practice, I suppose this means that if you're combining SDFs and the background values are strange, then it might be worth seeing if this parameter improves the result.

Activate Interior Voxels:

--  According to the docs, "Mark all voxels active inside an SDF, even if they match the negative background value. This option is useful if processing the resulting VDB with VEX, which only runs over active voxels of a VDB. However, disabling this option will retain only the narrow active internal band of an incoming SDF if it has one, saving memory and downstream processing. This toggle has no effect for non-SDF volumes, or if Signed-Flood Fill Output is disabled."  This makes more sense if you've already read about the Convert VDB From Polygons SOP.  In that SOP, we talk about how SDFs basically measure out a certain number of voxels away from the surface based on the exterior/interior band parameters.  When you check on "Activate Interior Voxels," you're basically saying that you'd like to measure the distance from the surface for all interior voxels.


Drag to resize

Polygons/Polysoup Options:


IsoValue:

-- This determines where polygons ought to be drawn out.  For fog volumes, you'll want to turn this up so that it equals a value within the fog.  For SDF volumes, you'll want to probably set this 0 because that's where the surface is.

Adaptivity:

--  This provides an adaptivity algorithm which reduces the number of generated polygons.  In practice, I tend to rely on the Polyreduce SOP instead, but the option is here if you'd like to use it, and this will probably be more ideal to use with polysoups because you can't use the polyreduce on that.

-----------------------------------------------------
The next few settings are only available if you've connected guide geometry to the second input or a vdb mask into the third input.  Remember that masking with vdb values is just like making with anything else... a voxel value of 1 is "yes" and a value of 0 is "no."  Keep in mind that reference geometry only applies when the incoming VDB is a SDF/Distance/Level-Set Grid (which are all saying about the same thing by the way). 
----------------------------------------------------

Compute Vertex Normals:

--  If checked on, then the vertex normals are calculated and stored as the "N" vertex attribute.  Alternatively, you can also use the normal sop, and that's what I usually do instead of this checkbox.

Internal Adaptivity:

--  According to the docs, "When converting to polygons with a second input, this is the adaptivity threshold for regions that are inside the reference surface."  In other words, this will reduce polygons that are inside the mesh.

Transfer Surface Attributes:

--  This will try to transfer attributes from the base mesh on to the new vdb-generated mesh.  Keep in mind that this method is not perfect, and you'll want to double-check the attributes to make sure they applied properly enough.

Sharpen Features:

--  This tries to make the mesh match the geometry more strictly.  Watch out for bad geo though because this can cause strange polygons to occur.

Edge Tolerance:

--  When Sharpening features, it will try to sharpen edges that change quickly.  This controls what is considered to be a "sharp" edge.  As you turn up this parameter, it will create more sharp edges.  If you turn this down, it will cause more smoother edges to occur.

Surface/Interior/Seam Line/Seam Points Groups:

--  This sets the name for various polygonal groups. 

--  Surface Group =  A group for all polygons that are coincident with the reference surface. This group is useful for transferring attributes such as uv coordinates, normals, etc. from the reference surface.  

--  Interior Group =   This specifies a group for all polygons that are inside the reference surface. These groups are useful for creating projected UV coordinates, or for assigning a different material when working with rbd debris.

--  Seam Line Group =  When converting to polygons with a second input, this parameter specifies a group for all polygons that are near the seam lines. This can be used to drive secondary elements such as debris and dust when making RBD simulations.

--  Seam Points =  "When converting to polygons with a second input, this parameter specifies a group of the fracture seam points. This can be used to drive local pre-fracture dynamics, such as local surface buckling."


-------------------------------------------------
The next few parameters become active if you've set a volume to the third input.  The volume is expected to be an SDF/Distance Volume. 
-------------------------------------------------

Surface Mask:

--  "If enabled, specifies the name of the VDB field from the third input to be used for masking. The field’s interior defines the region for converting to polygons."  Any negative values will allow the poly-conversion to happen.  Positive voxel values will not.

Mask Offset:

--  This shrinks or expands the surface of the vdb.

Invert Surface Mask:

--  This does just as it says.

Adaptivity Field:

--  If you'd like to use volume to specify where the adaptivity parameter happens, then you can specify that here.  Negative values mean, "Don't use Adaptivity here" while positive values say, "You can do the adaptivity here."