|On this page|
This SOP computes the transform (translation, rotation, and optionally scale) that best aligns the reference geometry’s points with the target geometry. If Use Piece Attribute is enabled, a transform will be computed for each piece in the geometry, instead of for the geometry as a whole. Additionally, if a piece contains a single packed primitive, the SOP will compare the primitive transforms between the inputs to allow transforms to be extracted from animated packed primitives without unpacking.
The output geometry of this SOP contains one point for each piece in the reference geometry, with point attributes describing the transform. These points can be used with the Transform Pieces SOP to apply the transform to geometry.
This extraction can be useful for setting up rigid body colliders (for which an animated rigid transform is ideal) from baked geometry files that represent rigid motion.
Use Piece Attribute
Compute a transform for the points associated with each unique value of the Piece Attribute.
The name of a string or integer attribute.
Specifies whether the Piece Attribute is a primitive or point attribute.
Specifies how to compute the best-fit transform between the reference and target geometry.
Translation and Rotation
Finds the rigid transform that best aligns the points with the target geometry.
Translation, Rotation, and Uniform Scale
Allows the points to be uniformly scaled, in addition to being translated and rotated.
For each piece, records an attribute containing a measurement of the difference between the transformed points in the reference geometry and the target geometry’s points. A value of 0 indicates that the extracted transform is a perfect fit.
Specifies the name of the point attribute created when Compute Distortion is enabled.
The rest geometry to transform.
The geometry for which to compute a transform from the Reference Geometry.
This example shows how to create packed primitives with animated transforms from deforming geometry that represents rigid motion. The result is ideal for colliders in a rigid body simulation.
The following examples include this node.