Houdini 22.0 Geometry

Implicit surfaces: technical

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

P

vector

Center position of the shape in world space.

transform

matrix3

Local-to-world orientation matrix for the shape.

implicitsurface

string

Operation to apply at this point.

implicitsurfacevals

vector4

Operation-specific parameter values, stored as a vector4.

shape

string

Shape to evaluate for binary operations.

shapevals

vector4

Shape-specific parameter values, stored as a vector4.

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

P

vector

Center position of the shape in world space.

transform

matrix3

Local-to-world orientation matrix for the shape.

implicitsurface

string

Operation name. Controls how the point modifies the current value.

implicitsurfacevals

vector4

Operation parameters. The meaning of each component depends on the implicitsurface value.

shape

string

Primitive shape name. Binary operations evaluate this shape; unary operations ignore it. The special groupend shape closes a grouped sub-expression.

shapevals

vector4

Shape parameters. The component meanings depend on the shape value.

Optional attributes can also be present when evaluating animated surfaces or interpolated data:

Attribute

Type

Meaning

v

vector

Linear velocity of the shape center.

w

vector

Angular velocity of the shape orientation.

shapedvals

vector4

Time derivatives of shapevals.

implicitsurfacedvals

vector4

Time derivatives of implicitsurfacevals.

Cd

vector

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

implicitsurfacevals components

invalid

Ignored operation. The point does not modify the current value.

Unused

groupbegin

Pushes the current value onto a stack and starts a new sub-expression from empty space.

Unused

invert

Negates the current value, swapping inside and outside.

Unused

offset

Offsets the current value. Positive values expand the surface by subtracting from the current SDF.

x: offset distance

shell

Converts the current value into a shell around an offset surface.

x: offset distance; y: shell thickness

union

Evaluates this point’s shape and takes the minimum of the current value and the shape value.

Unused

intersect

Evaluates this point’s shape and takes the maximum of the current value and the shape value.

Unused

subtract

Evaluates this point’s shape and subtracts it from the current value, equivalent to intersecting with the inverted shape.

Unused

difference

Evaluates this point’s shape and keeps the region inside either input but not both.

Unused

smoothunion

Smooth union between the current value and this point’s shape.

x: smoothness

smoothintersect

Smooth intersection between the current value and this point’s shape.

x: smoothness

smoothsubtract

Smooth subtraction of this point’s shape from the current value.

x: smoothness

smoothdifference

Smooth difference between the current value and this point’s shape.

x: smoothness

roundunion

Rounded union between the current value and this point’s shape.

x: round radius

roundintersect

Rounded intersection between the current value and this point’s shape.

x: round radius

roundsubtract

Rounded subtraction of this point’s shape from the current value.

x: round radius

rounddifference

Rounded difference between the current value and this point’s shape.

x: round radius

chamferunion

Chamfered union between the current value and this point’s shape.

x: chamfer amount

chamferintersect

Chamfered intersection between the current value and this point’s shape.

x: chamfer amount

chamfersubtract

Chamfered subtraction of this point’s shape from the current value.

x: chamfer amount

chamferdifference

Chamfered difference between the current value and this point’s shape.

x: chamfer amount

smoothrepulsiveunion

Smooth union with an additional repulsion term.

x: smoothness; y: repulsion

Shape values

The shape attribute can have the following values. The meaning of shapevals depends on this value:

Shape

Meaning

shapevals components

empty

No shape. Evaluates as empty space.

Unused

groupend

Ends a group started by a groupbegin operation. The current grouped result is combined with the saved value using this point’s implicitsurface operation.

Unused

plane

Infinite local plane. The plane is y = 0; negative values are below the local Y axis and positive values are above it.

Unused

box

Axis-aligned box in local space.

x, y, z: box size along each local axis

roundedbox

Axis-aligned box in local space with rounded edges.

x, y, z: box size along each local axis; w: round radius

sphere

Sphere centered at P.

x: radius

ellipsoid

Ellipsoid centered at P. This is an approximate SDF.

x, y, z: radii along each local axis

torus

Torus in local space. The ring lies around the local Y axis, with the tube cross-section in the radial/Y plane.

x: major radius; y: tube radius

link

Chain-link shape: a torus-like tube stretched along the local X axis.

x: major radius; y: tube radius; z: half length of the straight section

segment

Constant-radius capsule along the local Y axis.

x: height; y: radius

cylinder

Finite flat-capped cylinder along the local Y axis.

x: height; y: radius

capsule

Variable-radius capsule along the local Y axis.

x: height; y: radius at the positive local Y end; z: radius at the negative local Y end

cappedcone

Finite flat-capped cone or truncated cone along the local Y axis.

x: height; y: radius at the positive local Y end; z: radius at the negative local Y end

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

implicitsurface

implicitsurfacevals

shape

shapevals

0

union

[0,0,0,0]

box

[1,1,1,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

implicitsurface

implicitsurfacevals

shape

shapevals

0

union

[0,0,0,0]

box

[1,1,1,0]

1

offset

[1,0,0,0]

empty

[0,0,0,0]

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

implicitsurface

implicitsurfacevals

shape

shapevals

0

union

[0,0,0,0]

box

[1,1,1,0]

1

intersect

[0,0,0,0]

sphere

[1,0,0,0]

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

implicitsurface

implicitsurfacevals

shape

shapevals

0

union

[0,0,0,0]

box

[1,1,1,0]

1

union

[0,0,0,0]

torus

[1,1,1,0]

2

intersect

[0,0,0,0]

sphere

[1,0,0,0]

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

implicitsurface

implicitsurfacevals

shape

shapevals

0

union

[0,0,0,0]

box

[1,1,1,0]

1

groupbegin

[0,0,0,0]

empty

[0,0,0,0]

2

union

[0,0,0,0]

torus

[1,1,1,0]

3

union

[0,0,0,0]

sphere

[1,0,0,0]

4

intersect

[0,0,0,0]

groupend

[0,0,0,0]

5

offset

[1,0,0,0]

empty

[0,0,0,0]

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.

Geometry

Understanding

Modeling

Implicit Surfaces

Next steps

Fracturing

  • Destruction

    How to break different types of materials.

Clouds

Guru level