Transform SOP

From TouchDesigner 088 Wiki

08 TransformSOP.jpg


The Transform SOP translates, rotates and scales the input geometry in "object space" or local to the SOP. The Model Editor and the Transform SOP both work in "object space", and change the X Y Z positions of the points. In contrast, animating the transformation channels of an object in the Geometry Viewer Pane moves/scales the entire object in "world space" and does not affect the XYZ point positions of the geometry.

PythonIcon.png transformSOP_Class

Parameters - Transform Page

Group /group - If there are input groups, specifying a group name in this field will cause this SOP to act only upon the group specified. Accepts patterns, as described in Pattern Matching.

Transform Order /xOrd - Sets the overall transform order for the transformations. The transform order determines the order in which transformations take place. Depending on the order, you can achieve different results using the exact same values. Choose the appropriate order from the menu.

Rotate Order /rOrd - Sets the order of the rotations within the overall transform order.

Translate /tx /ty /tz - These three fields move the Source geometry in the three axes.

Rotate /rx /ry /rz - These three fields rotate the Source geometry in the three axes.

Scale /sx /sy /sz - These three fields scale the Source geometry in the three axes.

Pivot /px /py /pz - The pivot point for the transformations (not the same as the pivot point in the pivot channels). The pivot point parameters allow you to define the point about which geometry scales and rotates. Altering the pivot point produces different results depending on the transformation performed on the object.

For example, during a scaling operation, if the pivot point of an object is located at: -1, -1, 0 and you wanted to scale the object by 0.5 (reduce its size by 50%) the object would scale toward the pivot point and appear to slide down and to the left.


In the example above, rotations performed on an object with different pivot points produce very different results.

Tip: In order to transform from the Bounding Box centre, simply enter the variables $CEX $CEY $CEZ into the Pivot parameter.

Uniform Scale /scale - Uniform Scale allows you to shrink or enlarge geometry along all three axes simultaneously.

Normals Maintain Length /vlength - When selected, vector type attributes (i.e. normals, velocity) maintain the same length under transforms. i.e. When geometry is scaled, the normals remain constant in length.

Look At /lookat - Allows you to orient your object by naming the object you would like it to Look At, or point to. Once you have designated this object to look at, it will continue to face that object, even if you move it. This is useful if, for instance, you want a camera to follow another object's movements. The Look At parameter points the object in question at the other object's origin.

Tip: To designate a centre of interest for the camera that doesn't appear in your scene, create a Null object and disable its display flag. Then Parent the Camera to the newly created Null object, and tell the camera to look at this object using the Look At parameter. You can direct the attention of the camera by moving the Null object with the Select state. If you want to see both the camera and the Null object, enable the Null object's display flag, and use the Select state in an additional Viewport by clicking one of the icons in the top-right corner of the TouchDesigner window.

Up Vector /upvector - When orienting an object, the Up Vector is used to determine where the positive Y axis points.

Parameters - Post Page

Post Center X / Y / Z /postcenter[xyz] - Sets the center of the geometry after the Transform page has been applied to position.

Post Scale X / Y / Z /postscale[xyz] - Sets the scale of the geometry after the Transform page has been applied to scale.

Local Variables

$CEX, $CEY, $CEZ - Centroid of the bounding box.
$XMIN, $YMIN, $ZMIN - The Minimum extents of the bounding box.
$XMAX, $YMAX, $ZMAX - Maximum extents of the bounding box.
$SIZEX, $SIZEY, $SIZEZ - Size of the bounding box in each dimension.