Houdini 20.5 Nodes Geometry nodes

Extract Transform geometry node

Computes the best-fit transform between two pieces of geometry.

On this page
Since 17.0

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.

Parameters

Use Piece Attribute

Compute a transform for the points associated with each unique value of the Piece Attribute.

Piece Attribute

The name of a string or integer attribute.

Attribute Class

Specifies whether the Piece Attribute is a primitive or point attribute.

Extraction Method

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.

Translation, Rotation, and Non-Uniform Scale

Allows the points to be non-uniformly scaled, in addition to being translated and rotated.

Full Transform

Finds the transform that best aligns the points with the target geometry. This may include shears or non-uniform scales.

Output Attributes

Specifies the point attributes used to record the transform.

Standard Instance Attributes

Decomposes the transform into the standard instance attributes P, pivot, and orient. If the Extraction Method allows scaling, pscale and scale are used to record the uniform and non-uniform scale, respectively. These attributes can be used with many other nodes, such as Transform Pieces. If the Extraction Method is Full Transform, shear is used to record the shear component.

Transform Matrix (3×3) and Translation

Splits the transform into a 3×3 matrix (stored in the transform point attribute) and a translation (stored in P).

Transform Matrix (4×4)

Outputs the full 4×4 matrix to the transform point attribute.

Compute Distortion

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.

Distortion Attribute

Specifies the name of the point attribute created when Compute Distortion is enabled.

Inputs

Reference Geometry

The rest geometry to transform.

Target Geometry

The geometry for which to compute a transform from the Reference Geometry.

Examples

ExtractAnimatedTransform Example for Extract Transform geometry node

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.

See also

Geometry nodes