Lattice SOP
Summary
The Lattice SOP allows you to create animated deformations of its input geometry by manipulating grids or a subdivided box that encloses the input source's geometry.
It is much easier to deform an object by moving a few grids than trying to animate every single point of an object.
This SOP has very few buttons and looks simple, but it is important to understand how it works. The first input, called Geometry to Deform, is for the geometry you wish to deform. The second input, called Rest Geometry, must be an evenly spaced grid which fully encloses the geometry to deform. The third input, called Deformed Geometry, is a copy of the initial grid that is altered in some way, either by moving parts of it with animation channels, dragging its points in the Model Editor, or by running it through a Spring SOP which distorts it with the forces which simulate the laws of physics. Lattice computes a deformation based on the difference between the Rest Geometry and the Deformed Geometry, and applies it to the input geometry. The output of the SOP is the deformation of the geometry in the input source. If the Deformed Geometry is being animated, the output will also bend, twist and stretch every frame.
Parameters  Lattice Page
group
 Subset of points in the first input to be deformed. Accepts patterns, as described in Pattern Matching.
deformtype
 ⊞  Choose if deformation should be done using a regularly spaced lattice or an arbitary point cloud.
 Lattice
lattice
 Deform with a regularly spaced lattice.
Both the Rest Geometry and the Deformed Geometry must be lattices with the point orders in a specified order. This is the order generated by the Box SOP when Use Divisions is turned on. The number of divisions must match that of the goemetry or an error is returned.
 Points
points
 Deform using an arbitrary point clouds.
Both the Rest Geometry and the Deformed Geometry must have the same point clouds. Note that any points not within the specified radius of a point in the Rest Geometry will not be deformed. The amount of deformation applied to a point is based upon the weighted average of the deltas of the Rest Geometry to the Deformed Geometry. The weighting function is taken from the specified metaball kernal, so behavior is similar to applying a magnet metaball to every point in the Rest Geometry.
divs
 ⊞  Must be set to match the number of divisions in the lattice grid object(s).
 X
divsx

 Y
divsy

 Z
divsz

kernel
 ⊞  Deformation by specifying a Kernal Function and Points makes it easier to deform arbitrary clouds of points, as this makes the topology of the lattice behave more like a metaball rather than as a fixed lattice. Kernel Function determines which meta kernel to use to determine the influence of a point. For more information on kernel types check here: Metaball Model Types
 Wyvill model
wyvill

 Elendt model
elendt

 Blinn model
blinn

 Links model
links

radius
 The size of the points capture regions.
Operator Inputs
 Input 0:  Geometry to deform.
 Input 1:  Rest Geometry.
 Input 2:  Deformed Geometry.
Info CHOP Channels
Extra Information for the Lattice SOP can be accessed via an Info CHOP.
Common SOP Info Channels
 num_points  Number of points in this SOP.
 num_prims  Number of primitives in this SOP.
 num_particles  Number of particles in this SOP.
 last_vbo_update_time  Time spent in another thread updating geometry data on the GPU from the SOP's CPU data. As it is part of another thread, this time is not part of the usual frame time.
 last_meta_vbo_update_time  Time spent in another thread updating meta surface geometry data (such as metaballs or nurbs) on the GPU from the SOP's CPU data. As it is part of another thread, this time is not part of the usual frame time.
Common Operator Info Channels
 total_cooks  Number of times the operator has cooked since the process started.
 cook_time  Duration of the last cook in milliseconds.
 cook_frame  Frame number when this operator was last cooked relative to the component timeline.
 cook_abs_frame  Frame number when this operator was last cooked relative to the absolute time.
 cook_start_time  Time in milliseconds at which the operator started cooking in the frame it was cooked.
 cook_end_time  Time in milliseconds at which the operator finished cooking in the frame it was cooked.
 cooked_this_frame  1 if operator was cooked this frame.
 warnings  Number of warnings in this operator if any.
 errors  Number of errors in this operator if any.
TouchDesigner Build: