force_table_of_contents #
Hair Attach computes a per-curve rigid transform that moves curves from their rest position to the animated skin position. It works by comparing a rest mesh to an animated mesh and interpolating the resulting rotation and translation at each curve’s skin attachment point.
The optional output is a 4x4 matrix stored as a primitive attribute that downstream nodes can use to deform curves.
How It Works #
The rest mesh is initialized with axis-aligned basis vectors at each point. When the animated mesh deforms, the basis vectors rotate with it. By comparing the deformed basis to the rest basis, a per-point rotation, pivot, and translation are computed.
Each curve’s root is bound to a mesh face via skinprim / skinprimuv. The deformation is interpolated at that UV position using either standard primuv or OSD limit surface evaluation, then assembled into a single rest-to-anim matrix per curve.
The OSD limit surface option produces smoother interpolation on subdivision surfaces by evaluating at the limit rather than on the control hull.
Collisions are not resolved during attachment. This node simply applies the local transform at the root to the curves and it is likely that a collision with the skin will occur.