Iso Offset

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.

Iso Offset

Write your awesome label here.
Write your awesome label here.

The Iso Offset is used to create a standard volume, iso surface, or tetra mesh based on the shape of incoming geometry.

Drag to resize

Summary:

    In practice, the Iso Offset is the main node used to generate a standard volume, iso surface, or tetra mesh based on the shape of incoming geometry.  For more information about standard volumes vs. VDB volumes, please visit Houdini For the New Artist II for a detailed comparison.  This article will assume that you are already familiar with the basics of volumes and VDBs.

    An Iso Surface (aka an "isometric" surface) gets used for a variety of applications - including fluid meshing and building polygon soups.  Tetra meshes are more commonly used with soft-body solvers and deformers.  As mentioned before in Houdini For The New Artist II, it is generally advised that you avoid any standard volume operations and use VDBs instead if possible.  Even though vdbs are advised, it's still useful to understand how this node works as it helps you better understand how volumes work in general.

    Also, just as a reminder - the term "sign" often refers to where the surface of the object is.  As an example, a "Sign Distance Field" (also called a SDF) populates a field (in other words, the volume) with the distance away from the sign (surface).  So, from now on, understand that when the iso surface goes to generate something, it needs to find the surface of the object, and that surface is often referred to as the "sign" of the object.  "Sign" = surface "Distance" = distance from the surface "Field" = volume... SDF...

Drag to resize

Main Parameters:


Output Type:

--  This determines what the Iso Offset will output.  In addition to what was said above in the "summary" section, you have the option of creating a fog volume or sdf volume.  The main difference between these two types of volumes is the values which populate the voxels.  For more information about the difference between sdf and fog volumes, please visit Houdini For The New Artist II.

Mode:


-------------------------------------------------
This determines how the output is made.
-------------------------------------------------

--  Ray Intersect =  "Rays will be fired at the geometry from various directions to determine where the surface is. The resulting field will be signed, so an offset of 0 will generate an iso surface separating the inside from the outside."  The confusing part of that is when it says, "the resulting field will be signed" but don't let that confuse you.  In practice, if you adjust the offset, then it will simply move the border zone of the mesh outwards.  Keep in mind that you'll want to make sure that your mesh doesn't have any holes in it.

--  Metaballs = "The Ray Intersect method determines if voxels are inside or outside the object by sending rays. This can result in leaks and other problems. If you are building an SDF from a collection of metaballs, you can instead determine inside/outside by looking at the metaball field. That is what this method uses. Note that Laser Scanning is likely unwanted when this method is used."  In spite of what the documentation may suggest, it's still a bad idea to allow holes in your geometry.  The, "metaball field" is also poorly explained, so I'm sure that most people don't know what that actually means.  In practice though, this will give you very similar results to the Ray Intersect method, and if you're having problems with Ray Intersect, then maybe you can get better results by switching to Metaballs instead.

--  Minimum = "Exact minimum point to surface will be found. This is slow, but accurate. The resulting field is not signed, so you can only generate a shell around the geometry. An offset greater than 0 must be specified."  In practice, this will generate voxel values only in areas that are near the surface of the object.  This is useful for when you'd like a shell of voxel values.  To preview this, use the volume slice sop.

--  Point Cloud =  "Only the points of the incoming geometry are used in constructing the field. If the points have normals, the normals are used to determine sign. Otherwise, the field is unsigned like in the case of Minimum. The Scatter SOP is a good way to create a good collection of points from geometry."  In practice, this method can be expensive to calculate, and might only be really practical for certain effects that generate volumes based on particle movement.  Even then - I wouldn't recommend using setting in general.

--  Implicit Box =  This creates a box full of voxel values based off of the bounding box of the object.

--  Implicit Sphere =  Same as box, except this time it's a sphere

--  Implicit Plane =  This creates a plane of voxels which is placed in the middle of the bbox.  Anything under the plane gets a positive voxel value while anything above does not.

--  Volume Sample =  This will take the bounding box of your object, fill it will positive voxel values, then it will read any incoming volumes and subtract that from the original box.  It's easier to see this in the gallery below.  According to the docs:  "The volumes in the incoming gdp are all sampled and the sum of their values used to initialize the signed distance field. No correction is done after the fact, so the result may not actually be a signed distance field if the input isn’t."  Again, in practice, if you feed the iso offset some volumes, it will basically subtract that from a cube of positive voxel values.

--  Rebuild Volume Sample =  The use of this parameter is vague and unclear.  However, in order to use it, you'll need to be sure that you're sourcing in SDF volumes.  According to the docs, "The same behavior as Volume Sample, but a correction pass is done afterward to make the result a signed distance field using the provided zero crossing."  In practice, I'm not sure what this may be used for.  My guess is that you're trying to re-sample an sdf volume with this parameter.  However, if that's what you're trying to do, then it's better to use a volume resample sop instead.

-----------------------------------------
-----------------------------------------

Name:

--  Volumes are identified by creating a primitive attribute called "name".  This tells the iso offset what the string value should be for "name" and it gets used to identify the volume within shaders and other future volume operations.

Build Polygon Soup:

--  This option is only available when switching the Output Type to Iso Surface.  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.

Tetra Type:

--  A tetrahedra mesh gets useful for soft-body dynamics and deformers because it basically builds out equidistant support beams throughout your mesh.  This also gets commonly used with the add sop when you'd like points that are approximately equal in distance from each other in the shape of the mesh.  Here is what the docs say about all this...

--  Tetra Skeleton = "A mesh of tetrahedrons is built within the "inside" of the field. This regular mesh is ideal for use in softbody dynamics.  The tetrahedrons share faces, so do not have well defined normals."

--  Tetra Solid = "A mesh of individual tetrahedrons is built within the "inside" of the field. These tetrahedrons do not share points or faces, so can be split up for various fracturing operations."

--  Cubes = "Builds a mesh of individual cubes inside the field. These cubes do not share faces or points, so can be split up for fracturing operations."

Drag to resize

Dimensions:


--------------------------------
The sampling settings determines how many voxels will be made.
--------------------------------

Uniform Sampling:

-- This determines the method for generating voxels.

-- Max Axis = The volume slice looks at the longest axis of the bounding box. It then slices the bonding box along that axis a certain number of times. For the other axis, it will slice it however many times it needs to in order to make a perfect cube. As an example, if you set the divs to a value of 40, then it will slice the largest axis along the bounding box 40 times. In practice, max axis is great for situations where you want better control over how many voxels are being generated.

-- X,Y,Z Axis = This behaves just like the Max Axis above. This time, however, you can specify which axis you'd like to slice instead of relying on whichever axis is the largest. If your bounding box is changing over time, then it might be worth doing this parameter because you don't want the Max Axis to switch to something else as the bbox moves around.

-- Non Square = I would avoid this parameter in most situations. It allows you to create voxels which are not perfectly square by specifying how many times to slice x,y,z along the bounding box.

-- By Size = Instead of looking at how many times you want to slice an axis of the bounding box, "By Size" lets you define how large (in meters) you want each voxel to be. Based on that, it will automatically figure out how many times to slice x,y and z. By size can be nice when you want to be more specific about the resolution that you want. You'll need to keep track of your scene units and bbox size, however. Otherwise, "By Size" can easily generate lots of voxels. If you're sourcing pyro and using "By Size," I would recommend fitting your source volumes to around 1x1 meters to keep control over the quality of your simulations.

Override Output Divs:


--  This parameter is only available when the mode is set to Iso Surface or Tetra Mesh.  This is a useful parameter because it gives you more control over the resulting quality of the Iso/Tetra mesh.  Rather than relying on uniform sampling for determining how much detail is generated in the mesh, this will allow the iso offset to first sample at the uniform sampling divs rate, and then draw out the tetra/iso mesh according to the resolution you specify here.  If you are generating an Iso/Tetra mesh, then I would recommend using this parameter for better control.

Override Bounds:

--  This allows you to go larger or smaller than the bounding box of the incoming geometry.  This might be useful if something is moving around quickly.  Do keep in mind though, that you'll want to plug the second input of the node into whatever you want the bounding box to fit around.  In practice, I'll do this with the pad bounds checked on.  If you don't plug in the second input, then you'll need to manually define where the bounding box goes with the min/max bounds.

Pad Bounds:

--  This adds a bit of extra padding to the bounds.  According to the docs, "Slightly increase the specified bounds to ensure there is a layer of voxels outside of the specified boundary. This can ensure that there are proper outside voxels." 

Min/Max Bounds:

--  This allows you to directly specify where the bounding box goes.  Be sure that you check on "Override Bounds" and that nothing is plugged into the second input to adjust these parameters.

Drag to resize

Construction:


--------------------------------
The Construction tab allows you to modify the way that things get calculated by the Mode.  Many of these settings are here to fix bad results from the volume.  However, if a volume is not being generated correctly, then you need to make sure that your geo is clean.  It's always better to fix bad geometry than try to cover it up with these settings.  Clean geometry needs to have normals which face in the correct direction, no holes, no extra floating points, and no overlapping faces.
--------------------------------

Tolerance:

--  According to the docs, "The tolerance to use for building the SDF. This affects the ray intersection code. This tolerance is multiplied by the maximum bounding box size of the original geometry, so normally is independent of geometry scale."  In short, it's unclear what this does because it's something that "affects the ray intersection code."  In nearly all situations, I leave this at defaults.

Laser Scan:


--  The Laser Scan may be useful for getting around bad artifacts created by the iso offset.  Sometimes you can turn this off and see improved results.  Sometimes it works better when turned on.  Either way though, if you're having problems generating a good volume, then you should always make sure that your geo is water-tight and that your normals are looking good.  In other words, make sure there are no holes or overlapping faces in your mesh because it'll freak the algorithm out in most cases.  A bad mesh = a bad volume.  To do this, I would recommend reading up on the clean sop.

--  The docs are difficult to follow, but might contain insight about what this settings does more specifically... especially if you're already familiar with how SDF calculations work.  It says...

--  "The Laser Scan mode only applies to the Ray Intersect mode.
In laser scan mode the SDF is build by sending rays along the primary axes. Only the closest and farthest intersection is used. The space between these two points is classified as inside, and the rest outside.
The laser scan mode will work even with geometry which has poorly defined normals, self intersects, or isn’t fully watertight. The disadvantage is that interior features can’t be represented as they aren’t detected.
When laser scanning is turned off, the SDF is still built by sending rays along the primary axes. However, all intersections are found. Each pair of intersections is tested to see if the segment is inside or outside. This relies on the normal of the geometry being well defined (ie: manifold, no self intersections), and the geometry being watertight. However, complicated shapes with holes can be accurately represented."

--  In addition to what is said here, you may get better results by keeping this on when there are multiple pieces of geometry overlapping each other.

Fix Signs:

--  I would generally recommend keeping this on to improve the quality of volume sampling.  It adds more time to calculate it... but not much. 

--  According to the docs, "Even with the best made geometry, numerical imprecision can result in incorrect sign choices. This option will cause the SDF to be post-processed to look for inconsistent signs. These are then made consistent, usually plugging leaks and filling holes.
This takes time, however, so can be turned off in cases where the SDF is known to generate without problems.
Due to the nature of Fix Signs it also rounds sharp... (the docs cut off here)"

Force Bounds:


--  This parameter is basically there to improve the mysterious "Fix Signs" parameter mentioned above.  According to the docs, "The Fix Signs method alone will smooth out, and usually eliminate, sign inversions. However, it is possible for regions of wrong-sign to become stabilized at the boundary of the SDF. This option will force all voxels on the boundary to be marked as exterior. The Fix Signs will be much less likely to stabilize incorrectly then."  I would advise leaving this on by default as well.

Invert Sign:

--  Normally when the sign is calculated, the numbers on the inside of the mesh are negative and outside the surface they are positive.  Invert Sign will invert the calculation.  This can also improve the quality of Laser scanning because it is less reliant on the insides of the mesh when doing its calculations. 

--  The glorious docs describe this process when it states, "If one wants a hollow box, one method is to build one box inside the other and not use Laser Scanning. A more robust method is to just specify the inner box and use sign inversion. This treats everything outside of the box as inside, allowing the more robust Laser Scanning method to be used."  

Num Neighbor:

--  This setting is only relevant when using the "Point Cloud" mode.  In general, this ought to smoothen out the result based on nearby points.  If you're using the point cloud mode, (which, again, is something I would advice against for most situations), then you can turn up the num neighbor to average out the effect based on nearby "surface properties."

--  According to the docs, "The Point Cloud mode finds this number of nearest points and uses them to determine the local surface properties. A higher number of neighbor will smooth out local variations and create a smoother field."  Note - it is not clear what surface properties mean in this situation, and it will not listen to point attributes like pscale.

Sign Sweep Threshold:

--  This is designed for de-bugging bad volume calculations.  In general, I would advise keeping this setting at its defaults unless you have streaks due to a bad mesh.  My first advice is to always fix a bad mesh.  But, if that doesn't work, you might be able to turn this up and fix some problems in a SDF volume.

--  According to the docs, "After the fix signs process is complete there can still be inconsistent areas in the SDF. Large blocks can become stabilized and stick out of the SDF. A second sign sweep pass can be performed to try to eliminate these blocks.
The sign sweep threshold governs how big of a jump has to occur for a sign transition to be considered inconsistent. If the values of the sdf change by more than this threshold times the width of the cell, it is considered an invalid sign transition. The original geometry is then ray intersected to determine inside/outside and the result used to determine which sign is correct. The correct sign is then propagated forward through the model."

Max Sign Sweep Count:

--  In general, if you're trying to de-bug a bad SDF, then you'll have to just play with a combination of the Sign Sweep Threshold and the Max Sign Sweep Count until you find a good combination.

--  As the docs say-ith... "The sign sweeps are repeated until no signs are flipped (ie, all transitions are within the threshold) or this maximum is reached. Too low of a sign sweep threshold may prevent the process from converging. Otherwise, it tends to converge very quickly."

Drag to resize

File:


--------------------------------
Do not use this tab for caching out your files.  You, and/or your co-workers won't appreciate the hidden cache file that's being generated by the iso-offset.  Use a file cache.
--------------------------------