Houdini 22.0 Nodes Geometry nodes

Lattice Deform geometry node

Deforms geometry based on how you reshape control geometry.

On this page

Lattice deformation takes the edits you apply to simple geometry and applies the equivalent deformations to source geometry, such as the arm of a character. For example, you can create a bulge in the lattice to create a bulge in the geometry.

The Lattice operator has two methods for specifying the control geometry:

Note

The value of Pw affects the outcome of the Lattice Deform SOP when doing point based deformations.

Using Lattice

  1. Click the Lattice Deform SOP tool on the Deform tab.

  2. Select the points to deform and press Enter to confirm your selection.

  3. Press Enter again to create a cage from the object’s bounding box or hold Alt to select a deforming point cloud from another object and press Enter to confirm your selection.

  4. Click the transform node in the network editor.

  5. Move the points of the cage in the scene view to deform the shape underneath.

Lattice deformer

To create a simple lattice from the bounding box of the source geometry, append a Bound SOP to the source geometry. Turn on Divisions and set the values to set the number of control points available. Create a Lattice node and connect the network as shown above. In the Lattice node, turn on Lattice and set the Divisions to the same values.

Tip

The Bound SOP recomputes the bounding box for the shape of the source geometry at each frame. If you use a Bound SOP to create the lattice and the source geometry is animated, you may want to lock the Bound node if you don’t want the lattice to animate along with it.

Note

The division values on the node generating the lattice and on the Lattice node must be identical, or the Lattice node will show an error.

Houdini only supports divisions up to 30 when the interpolation type is set to Bezier.

Alternatively, use the Box SOP to create an arbitrary lattice shape not linked to the bounding box of the source geometry. Set the Primitive type to Polygon, turn on Divisions and set the values to set the number of control points available.

You can also use a lattice shape with the Points method in Arbitrary control geometry, which will give different results and allow you to control the radius of influence of the points in the lattice.

Points deformer (arbitrary control geometry)

The points method lets you use arbitrary control geometry. It also lets you control the radius of influence of each point in the rest control geometry. Which lets the control shape capture geometry similarly to how bones capture skin surfaces in character modeling. You can use this method to deform a character or prop by manipulating a simplified low-poly version of it.

The points method works by creating a metaball at each point on the rest control geometry and assigning influence to each point on the source geometry based on the density of the control metaballs it intersects.

To visualize the capture regions, set the display flag on the Lattice node and turn on Visualize point-specific radii in the Lattice node’s parameters. The 3D view shows the radius of influence of each point.

Use the Radius parameter to control the distance of influence of each point in the rest control geometry.

Larger radius values lead to smoother deformations because the influence of each control point is averaged over more points in the source geometry. Small radius values lead to very sharp deformations because each control point will only influence a few points on the source geometry.

Lattice computes the influence falloff from the metaball kernel you choose in the Kernel function parameter. Lattice’s behavior is similar to applying a magnet metaball to every point in the source geometry.

Tip

The control geometry should enclose the geometry being deformed.

Warning

The rest and deformed versions of the control geometry must have the same number of points, and in the case of lattices they must be in certain order (the order automatically created by Box and Bound). Usually this is automatic using the network layout shown above because the deformed control shape comes from the same node as the rest control shape, but with edits applied. Make sure any nodes you use to edit the control shape do not change the control shape’s topology.

Parameters

Group

Points in the first input to be deformed.

Lattice

Overview

Deform with a regularly space lattice

Divisions

Must match the number of divisions in the lattice grid.

Order

The order controls how closely the geometry follows the deformed lattice. The minimum order of 2 represents a linear deformation, while higher orders produce smoother deformations. As the order increases, the deformed geometry generally tends to stray further away from the lattice’s deformed grid. Lower orders of 3 and 4 are good for generating smooth deformations which closely mimic the shape of the deformed lattice. The maximum order is 11 (if a higher order deformation is desired, consider switching the interpolation to use a Bezier lattice).

The order is related to the number of divisions. In particular, there is no additional smoothing when increasing the order beyond divisions + 1 in a given dimension.

Only available when the Interpolation parameter is set to Nurbs.

Falloff

Controls how far beyond the rest lattice geometry a point may sit before it is no longer deformed. Points on the boundary of the lattice use their deformed positions, points at the falloff distance use their source positions, and points at a distance between the two are linearly interpolated. A negative falloff value indicates that the points of the source geometry should always be deformed, regardless of their distance from the interior of the rest lattice.

The falloff is intended to give points a little bit of wiggle room to be deformed if they happen to fall outside the rest lattice as a result of small deformations or numerical imprecision.

Interpolation

Points in the deformed geometry are interpolated using this method.

Linear

The input points are deformed linearly by the lattice.

Bezier

The input points are deformed by a weighted combination of all the lattice points. The lattice points near the input point have more influence on the deformed shape.

Nurbs

The input points are deformed by a weighted combination of a subset of points in each lattice direction. The number of points that contribute to the lattice’s deformed shape is determined by the ordx, ordy, and ordz port values. For example, if ordx is 3, then 3 yz-planes of lattice points are used when deforming the input point.

When the order of the lattice is low, the input geometry deformation closely follows the lattice deformation. As the order increases, the resulting deformation is smoother but has a tendency to drift further away from the control lattice.

Points

Overview

Deform using arbitrary point clouds

Rest Group

Points in the rest geometry which are used. The corresponding points in the deformed geometry are used as the implicit deform group.

Kernel Function

Which meta kernel to use to determine the influence of a point.

Wyvill

The Wyvill and Elendt models are very similar. Only the weight distribution function is different.

Elendt

The fastest method, but the simplest approximation, so it may not be as smooth as other functions in terms of weight distribution.

Blinn

Always puts a sphere at the blob center, even if the weight is less than 1.0. The fastest and most stable of all the models.

RenderMan

Used by Pixar’s RenderMan (and possibly other RIB renderers). Defined as

Density = 1 - 3*R^2 + 3*R^4 - R^6

Hart

A kernel function suggested by mathematician John Hart.

1 - 6*t^5 + 15*t^4 - 10*t^3

Radius

The size of the points capture regions.

Normalize Threshold

Defines the transition sharpness of the deformed surface geometry across the capture region boundary. If the threshold is zero, the transition is steep. If the threshold is large, the deformed data source geometry is smooth. Technically, the threshold defines the value after which the weights are normalized. If a total weight of all capture regions for a given point is greater than the threshold, then the weights for this point are normalized; otherwise they are not.

Visualize Point-Specific Radii

Turns on the display of guide spheres that represent the radii of each point in the rest geometry.

Note

To override the radius in point mode on a point by point basis you need to use a point expression. For example, point("../attribcreate1",$PT,"rad",0).

Inputs

Data Source

The geometry to deform. Accepts all input types.

Initial Source

The rest version of the control shape.

Deformed Source

The deformed version of the control shape. Lattice uses the difference between this and the Initial input to calculate the deformation to apply to the data source input.

Locals

Note

Variable names ending with 2 refer to the geometry from the second input, if applicable. For example, PT2 is the current point number from the second input.

AGE

The seconds a particle in the template has been alive.

ARC

Arc length distance from root in the L-systems.

AREA

The surface area of the primitive (created by the Measure SOP).

BBX, BBY, BBZ

The point’s relative position in the bounding box.

CA

Point or vertex alpha value.

CEX, CEY, CEZ

The centroid of the geometry.

COMX, COMY, COMZ

Center of mass.

CR, CG, CB

Diffuse point or vertex color.

CREASE

Point or vertex crease weight value.

DIST

Distance from particle to last collision.

DIV

Number of divisions to build the circle swept with Polywire (created by L-systems).

DRAG

Point drag.

GEN

Generation in the L-systems.

ID

The ID of the particle in the input.

LAGE

The age of the point in the L-system computation.

LIFE

Percent of total life used (from 0 to 1).

LOD

Level of detail.

MAPU, MAPV, MAPW

Point or vertex texture coordinates.

MASS

Point mass.

MAT

The string name of the current material (the value of the shop_material attribute).

MAXLAYER

The number of layers that are considered active for display.

NPT

The total number of points in the template geometry.

NX, NY, NZ

Normal vector.

PERIMETER

The perimeter of the primitive (created by the Measure SOP).

PR, NPR

Primitive number & total number of primitives.

PSCALE

Particle Scale.

PT

The point number of the currently processed point.

RESTX, RESTY, RESTZ

The rest position.

SEGS

Number of segments to divide a curve up into in Polywire (created by L-systems).

SIZEX, SIZEY, SIZEZ

The size of the bounding box.

SPRINGK

Elasticity of a point.

TENSION

Spring tension of an edge.

TX, TY, TZ

Point position.

TW

See WEIGHT.

UPX, UPY, UPZ

The vector pointed in the up direction.

VTX, NVTX

Vertex number & total number of vertices.

VX, VY, VZ

Velocity direction.

WEIGHT

Point spline weight.

WIDTH

The width of the curve. Used by mantra for rendering curves & polywire for generating trees.

XMIN, XMAX

The X extents of the bounding box of the geometry.

YMIN, YMAX

The Y extents of the bounding box of the geometry.

ZMIN, ZMAX

The Z extents of the bounding box of the geometry.

Examples

BallBounce Example for Lattice Deform geometry node

This is an example of how a /nodes/sop/lattice.html SOP is used to create a bouncing ball.

DeformLattice Example for Lattice Deform geometry node

The /nodes/sop/lattice.html SOP creates animated deformations by manipulating simpler geometry that encloses the source geometry.

This example shows how the /nodes/sop/lattice.html SOP can use an animated Box SOP to deform the source geometry. In this case, the source geometry is a sphere.

LatticePerChunk Example for Lattice Deform geometry node

This example shows how you can use the foreach sop to apply a lattice to each fragment of a sphere.

See also

Geometry nodes