# Align SOP

Jump to navigation Jump to search

## Summary

The Align SOP aligns a group of primitives to each other or to an auxiliary input, by translating or rotating each primitive along any pivot point.

Left and Right Primitives - The notions of "left" and "right" which follow depend on context. If an auxiliary input is used, it is always the right primitive and the primary input geometry are all left primitives. If only one input is used, then for each pair being aligned, there is a left and a right primitive. This means that relative to neighbouring primitives, one primitive can be both left and right.

## Parameters - Page

Group `group` - A subset of primitives to align (accepts patterns, as described in Pattern Matching in the Scripting Guide). If blank, it aligns the entire input.

Align `align` - - Can optionally align subgroups of n primitives or every nth primitive in a cyclical manner.

• All Primitives `all` -
• Groups of N Primitives `group` -
• Skip Every Nth Primitive `skip` -

N `inc` - Determines the number of primitives to be either grouped or skipped.

Example: Assume there are six primitives numbered for 0 - 5, and N = 2. Then:

a)
b)

## Parameters - Align Page

Bias `bias` - Determines which primitive remains unaffected: 0 Left, 1 Right.

Left UV `leftuv` - - Pivot Location for each "left" primitive.

• U `leftuv1` -
• V `leftuv2` -

Right UV `rightuv` - - Pivot location for each "right" primitive.

• U `rightuv1` -
• V `rightuv2` -

Right UV End `rightuvend` - - If an auxiliary input is used, this location specifies an end point for the alignment. Left primitives are then distributed uniformly between the `Right UV` and the `Right UV End`.

• U `rightuvend1` -
• V `rightuvend2` -

Individual Alignment `individual` - Causes each primitive of the input to be aligned. If unchecked, only the first primitive is aligned and all others are placed relative to it, preserving the spatial layout of the left primitives.

Translate `dotrans` - When enabled, translates primitives during alignment by translating the left UV position to the right UV position.

Rotate `dorotate` - When enabled, rotates primitives during alignment by aligning the left UV tangents (at the left UV position) to the right UV tangents (at the right UV position).

## Parameters - Transform Page

Transform Order `xord` - - Sets the overall transform and rotation order for the transformations. The transform and rotation order determines the order in which transformations take place. Depending on the order, you can achieve different results using the exact same values.

• Scale Rotate Translate `srt` -
• Scale Translate Rotate `str` -
• Rotate Scale Translate `rst` -
• Rotate Translate Scale `rts` -
• Translate Scale Rotate `tsr` -
• Translate Rotate Scale `trs` -

Rotate Order `rord` - - Sets the overall transform and rotation order for the transformations. The transform and rotation order determines the order in which transformations take place. Depending on the order, you can achieve different results using the exact same values.

• Rx Ry Rz `xyz` -
• Rx Rz Ry `xzy` -
• Ry Rx Rz `yxz` -
• Ry Rz Rx `yzx` -
• Rz Rx Ry `zxy` -
• Rz Ry Rx `zyx` -

Translate `t` - - Allows you to perform a post-alignment transformation. Specify the amount of translation about the local `xyz` axes.

• X `tx` -
• Y `ty` -
• Z `tz` -

Rotate `r` - - Allows you to perform a post-alignment transformation. Specify the amount of rotation about the local `xyz` axes.

• X `rx` -
• Y `ry` -
• Z `rz` -

Scale `s` - - Allows you to perform a post-alignment transformation. Specify the amount of scaling about the local `xyz` axes.

• X `sx` -
• Y `sy` -
• Z `sz` -

Pivot `p` - - Allows you to perform a post-alignment transformation. Specify the amount of translation / rotation / scaling about the local `xyz` axes

• X `px` -
• Y `py` -
• Z `pz` -

## Operator Inputs

• Input 0 -
• Input 1 -

TouchDesigner Build:

Add • Alembic • Align • Arm • Attribute Create • Attribute • Basis • Blend • Bone Group • Boolean • Box • Bridge • Cache • Cap • Capture Region • Capture • Carve • CHOP to • Circle • Clay • Clip • Convert • Copy • CPlusPlus • Creep • Curveclay • Curvesect • DAT to • Deform • Delete • Divide • Extrude • Face Track • Facet • File In • Fillet • Fit • Font • Force • Fractal • Grid • Group • Hole • Import Select • In • Introduction To SOPs id • Inverse Curve • Iso Surface • Join • Joint • Kinect • Lattice • Limit • Line • Line Thick • LOD • LSystem • Magnet • Material • Merge • Metaball • Model • Noise • Null • Object Merge • Oculus Rift • OpenVR • Out • Particle • Point • Polyloft • Polypatch • Polyreduce • Polyspline • Polystitch • Primitive • Profile • Project • Rails • Raster • Ray • Rectangle • Refine • Resample • Revolve • Script • Select • Sequence Blend • Skin • Sort • Sphere • Spring • Sprinkle • Sprite • Stitch • Subdivide • Superquad • Surfsect • Sweep • Switch • Text • Texture • Torus • Trace • Trail • Transform • Trim • Tristrip • Tube • Twist • Vertex • Wireframe • ZED