| On this page |
|
Overview ¶
An implicit surface is a lightweight representation of a geometric shape defined by a mathematical function. The function can be evaluated at any point in space, returning a negative value inside the shape and a positive value outside. This is conceptually similar to an SDF VDB, but unlike a VDB, no voxel grid is stored—the shape is described analytically.
This has several practical advantages:
-
Lightweight: no grid memory overhead
-
Infinite resolution: the surface can be evaluated exactly at any scale, with no discretization error
-
Exact primitives: shapes such as spheres, boxes, and tori are represented exactly rather than approximated
-
Unbounded shapes: planes and half-spaces can be represented directly, unlike voxel-based volumes
These properties make implicit surfaces well suited for relatively simple geometry, such as simulation domains, collision objects, and source volumes.
For more information, see Implicit surfaces: workflow.
VEX usage ¶
Implicit surfaces can be evaluated in VEX using the implicitsurface function, which can also return the spatial gradient and time derivative of the field. Surface velocity can be queried with implicitsurfacevel, provided velocity attributes have first been generated on the geometry using the Implicit Surface Velocity SOP.
Signed Distance Function (SDF) ¶
Most basic implicit surface shapes, with the exception of ellipsoids, define an exact signed distance function (SDF). This means the value of the function at any point is the true distance to the nearest point on the surface, with the sign indicating whether the point lies inside or outside the shape.
This property is generally lost when shapes are combined. For example, the union of two shapes combines their mathematical formulas into a new implicit function. The resulting function remains an exact SDF outside the combined shape, but inside it the distance values become underestimates. The sign is still correct, so inside/outside tests continue to work, but the values no longer represent the true distance to the surface.
This distinction is important for operations that rely on distance values. For example, the offset operation in Implicit Surface Operation applies a constant offset to the underlying function rather than geometrically expanding the surface. For an exact SDF, this produces a true geometric offset. For a combined shape with approximate interior distances, the result may differ from the expected offset surface.
In general, if you require accurate offsets or other distance-based effects, be aware that combining shapes through union, intersection, or subtraction reduces the accuracy of the signed distance field.
Non-uniform scaling ¶
Non-uniform scaling is another operation that does not preserve the signed distance function. As a result, it is only partially supported.
When an implicit surface is scaled non-uniformly, for example using the Transform SOP, pass it through the Implicit Surface Doctor SOP. The doctor attempts to recover valid implicit surface parameters that best match the transformed shape. For example, scaling a torus in the XZ plane adjusts its major radius while leaving its minor radius unchanged.
Geometry encoding ¶
Implicit surfaces are represented as point geometry with a set of special point attributes. Each point defines either a shape or an operation in the implicit surface evaluation graph.
Attribute |
Type |
Description |
|---|---|---|
|
|
Center position of the shape in world space. |
|
|
Local-to-world orientation matrix for the shape. |
|
|
Operation to apply at this point. |
|
|
Operation-specific parameter values, stored as a |
|
|
Shape to evaluate for binary operations. |
|
|
Shape-specific parameter values, stored as a |
Together, these attributes fully describe the mathematical function represented by the implicit surface.
Note
Implicit surface nodes also generate packed primitives for viewport visualization. These primitives are not part of the functional representation, but some nodes use them to estimate an approximate bounding box for the implicit surface. This includes VDB Activate,
VDB Implicit Clip SDF, and any nodes that depend on those bounds.
Geometry encoding details ¶
Each point in the geometry represents a single operation in an evaluation sequence. The implicit surface is evaluated using a simple stack machine that maintains a current value and processes points one at a time, with each point modifying that value.
Evaluation begins with current value = +inf, representing empty space. Each point then applies its operation to produce a new current value.
Unary operations, such as invert, offset, and shell, modify the current value directly and do not evaluate a shape. Binary operations, such as union, intersect, and subtract, evaluate the point’s shape and combine the resulting shape value with the current value.
The groupbegin operation pushes the current value onto a stack and starts a new sub-expression with current value = +inf. A point whose shape is groupend ends the sub-expression by popping the saved value from the stack and combining it with the grouped result using that point’s implicitsurface operation.
Point attributes ¶
Attribute |
Type |
Meaning |
|---|---|---|
|
|
Center position of the shape in world space. |
|
|
Local-to-world orientation matrix for the shape. |
|
|
Operation name. Controls how the point modifies the current value. |
|
|
Operation parameters. The meaning of each component depends on the |
|
|
Primitive shape name. Binary operations evaluate this shape; unary operations ignore it. The special |
|
|
Shape parameters. The component meanings depend on the |
Optional attributes can also be present when evaluating animated surfaces or interpolated data:
Attribute |
Type |
Meaning |
|---|---|---|
|
|
Linear velocity of the shape center. |
|
|
Angular velocity of the shape orientation. |
|
|
Time derivatives of |
|
|
Time derivatives of |
|
|
Optional color to interpolate from the contributing shape. |
Operation values ¶
The implicitsurface attribute can have the following values. The meaning of implicitsurfacevals depends on this value:
Operation |
Meaning |
|
|---|---|---|
|
Ignored operation. The point does not modify the current value. |
Unused |
|
Pushes the current value onto a stack and starts a new sub-expression from empty space. |
Unused |
|
Negates the current value, swapping inside and outside. |
Unused |
|
Offsets the current value. Positive values expand the surface by subtracting from the current SDF. |
|
|
Converts the current value into a shell around an offset surface. |
|
|
Evaluates this point’s shape and takes the minimum of the current value and the shape value. |
Unused |
|
Evaluates this point’s shape and takes the maximum of the current value and the shape value. |
Unused |
|
Evaluates this point’s shape and subtracts it from the current value, equivalent to intersecting with the inverted shape. |
Unused |
|
Evaluates this point’s shape and keeps the region inside either input but not both. |
Unused |
|
Smooth union between the current value and this point’s shape. |
|
|
Smooth intersection between the current value and this point’s shape. |
|
|
Smooth subtraction of this point’s shape from the current value. |
|
|
Smooth difference between the current value and this point’s shape. |
|
|
Rounded union between the current value and this point’s shape. |
|
|
Rounded intersection between the current value and this point’s shape. |
|
|
Rounded subtraction of this point’s shape from the current value. |
|
|
Rounded difference between the current value and this point’s shape. |
|
|
Chamfered union between the current value and this point’s shape. |
|
|
Chamfered intersection between the current value and this point’s shape. |
|
|
Chamfered subtraction of this point’s shape from the current value. |
|
|
Chamfered difference between the current value and this point’s shape. |
|
|
Smooth union with an additional repulsion term. |
|
Shape values ¶
The shape attribute can have the following values. The meaning of shapevals depends on this value:
Shape |
Meaning |
|
|---|---|---|
|
No shape. Evaluates as empty space. |
Unused |
|
Ends a group started by a |
Unused |
|
Infinite local plane. The plane is |
Unused |
|
Axis-aligned box in local space. |
|
|
Axis-aligned box in local space with rounded edges. |
|
|
Sphere centered at |
|
|
Ellipsoid centered at |
|
|
Torus in local space. The ring lies around the local Y axis, with the tube cross-section in the radial/Y plane. |
|
|
Chain-link shape: a torus-like tube stretched along the local X axis. |
|
|
Constant-radius capsule along the local Y axis. |
|
|
Finite flat-capped cylinder along the local Y axis. |
|
|
Variable-radius capsule along the local Y axis. |
|
|
Finite flat-capped cone or truncated cone along the local Y axis. |
|
Examples ¶
The following tables show the point order and the attributes that define the operation sequence. Other point attributes, such as P and transform, are omitted because they only position and orient the shapes and are not needed to explain the expression structure.
A plain box ¶
Point |
|
|
|
|
|---|---|---|---|---|
0 |
|
|
|
|
Evaluation starts from empty space and unions in the box at point 0, so the result is just that box.
A box with an offset of 1 ¶
Point |
|
|
|
|
|---|---|---|---|---|
0 |
|
|
|
|
1 |
|
|
|
|
Point 0 creates the box. Point 1 is a unary offset, so it ignores shape and shapevals and subtracts implicitsurfacevals.x from the current value, expanding the box by 1.
Intersection of a box and a sphere ¶
Point |
|
|
|
|
|---|---|---|---|---|
0 |
|
|
|
|
1 |
|
|
|
|
Point 0 creates the box. Point 1 intersects the current value with a sphere, keeping only the region inside both shapes.
Union of a box and torus, then intersected with a sphere ¶
Point |
|
|
|
|
|---|---|---|---|---|
0 |
|
|
|
|
1 |
|
|
|
|
2 |
|
|
|
|
Operations are applied in point order: points 0 and 1 union the box and torus, then point 2 intersects the combined result with the sphere.
Grouping: intersect a box with (torus union sphere), then offset by 1 ¶
Point |
|
|
|
|
|---|---|---|---|---|
0 |
|
|
|
|
1 |
|
|
|
|
2 |
|
|
|
|
3 |
|
|
|
|
4 |
|
|
|
|
5 |
|
|
|
|
Point 0 creates the box. Point 1 saves that box and starts a grouped sub-expression from empty space. Points 2 and 3 union the torus and sphere inside the group. Point 4 has shape set to groupend, so it closes the group and uses its intersect operation to combine the saved box with the grouped torus/sphere result. Point 5 offsets the final result outward by 1.