Lattice
surface node
Deforms geometry based on how you reshape control geometry.
See also: Bound, Box, Bulge, Magnet
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: lattice, which requires a control geometry with a specific ordering of points, as created by a Bound SOP or Box SOP; and points, which allows any shape to be control geometry.
Using Lattice
-
Click the
Lattice tool on the Deform tab. -
Select the points to deform and press Enter to confirm your selection.
-
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.
-
Click the transform node in the network editor.
-
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.
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.
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 shown below under “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, letting 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 the character or prop.
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.
The control geometry should enclose the geometry being deformed.
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. Just 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. |
|
Interpolation |
Points in the deformed geometry are interpolated using this method. |
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 |
Which meta kernel to use to determine the influence of a point. |
|
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. |
Inputs
|
Data Source |
The geometry you wish 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. |
Local variables
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.
|
TX, TY, TZ |
Point position. |
|
TW |
See WEIGHT. |
|
CEX, CEY, CEZ |
The centroid of the geometry. |
|
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 |
|
SIZEX, SIZEY, SIZEZ |
The size of the bounding box. |
|
BBX, BBY, BBZ |
The point’s relative position in the bounding box. |
|
WEIGHT |
Point spline weight. |
|
PT |
The point number of the currently processed point. |
|
PR, NPR |
Primitive number & total number of primitives. |
|
VTX, NVTX |
Vertex number & total number of vertices. |
|
NPT |
The total number of points in the template geometry. |
|
LIFE |
Percent of total life used (from 0 to 1). |
|
NX, NY, NZ |
Normal vector. |
|
MAPU, MAPV, MAPW |
Point or vertex texture coordinates. |
|
VX, VY, VZ |
Velocity direction. |
|
MAT |
Material name specification. |
|
CR, CG, CB |
Diffuse point or vertex color. |
|
CA |
Point or vertex alpha value. |
|
COMX, COMY, COMZ |
Center of mass. |
|
LOD |
Level of detail. |
|
RESTX, RESTY, RESTZ |
The rest position. |
|
DIST |
Distance from particle to last collision. |
|
MASS |
Point mass. |
|
DRAG |
Point drag. |
|
TENSION |
Spring tension of an edge. |
|
SPRINGK |
Elasticity of a point. |
|
PSCALE |
Particle Scale. |
|
AGE |
The seconds a particle in the template has been alive. |
|
CREASE |
Point or vertex crease weight value. |
|
AREA |
The surface area of the primitive (created by the Measure SOP). |
|
PERIMETER |
The perimeter of the primitive (created by the Measure SOP). |
|
ID |
The ID of the particle in the input. |
|
UPX, UPY, UPZ |
The vector pointed in the up direction. |
|
WIDTH |
The width of the curve. Used by mantra for rendering curves & polywire for generating trees. |
|
SEGS |
Number of segments to divide a curve up into in Polywire (created by L-systems). |
|
DIV |
Number of divisions to build the circle swept with Polywire (created by L-systems). |
|
LAGE |
The age of the point in the L-system computation. |
|
ARC |
Arc length distance from root in the L-systems. |
|
GEN |
Generation in the L-systems. |
|
CURLAYER |
Stores the currently processed layer for texture/materials (set by the Layer SOP). |
|
MAXLAYER |
The number of layers that are considered active for display. |
Example files
BallBounce
DeformLattice
$HFS/houdini/help/examples/nodes/sop/lattice/DeformLattice.cmd
The Lattice SOP creates animated deformations by manipulating simpler geometry that encloses the source geometry.
This example shows how the Lattice SOP can use an animated Box SOP to deform the source geometry. In this case, the source geometry is a sphere.