< Previous | Contents | Manuals Home | Boris FX | Next >

Transforms

The transform matrices are 4 rows by 3 columns, so that new vectors are multiplied in from the left, as in OpenGL. Transforms are offered as attributes of various SynthEyes objects or may be manipulated directly.

IMPORTANT : Although you can get the rotation angles corresponding to a transform matrix, they will always be principal values, ie that go 0..90..180..270..0..90... as something rotates. To access animation-style unlimited angles for cameras or moving objects, ie that go 0..90..180..270..360..450..540..., you MUST use .orient, .pan, .tilt, or

.roll, or their seed or solve variants. That's just math. If you want unlimited values from a sequence of transforms, you must use the Conform functions. That's crucial for exporting to software that does motion blur based on interpolating angles.

Transform(row1, row2, row3, row4) creates a transform object.

Transform(diag_vector) creates a transform with the specified vector constituting the diagonal. Transform(value) creates a transform with the value repeated three times along the diagonal (good for zero and identity transforms). RotX(angle), RotY(angle), and RotZ(angle) create transforms that rotate about the specified axis by the given angle. Offset(vector) creates a transform with an identity rotation and the given position offset. Mangle(axisMode) is a transform that mangles transforms from the internal Zup to the given axis mode.

Demangle(axisMode) is the inverse of Mangle.

A variety of different attributes may be accessed from a transform:

.x, .y, and .z are the positions.

.rx, .ry, and .rz are three rotation angles (degrees). The rotations are read- only. The rotation angles are controlled by a rotation angle ordering value, the global rotOrder value, and a global axisMode value. These are initialized to the SynthEyes Maya axis ordering and scene’s coordinate axis mode settings: Z Up(0), Y Up(1), and Y Up Left(2).

.rowA, .ax, .ay, .az are the first row, and the three components of it.

.rowB, .bx, .by .bz are the second row, and the three components of it.

.rowC, .cx, .cy, .cz are the third row, and the three components of it.

.rowP, .px, .py, .pz are the fourth (position) row, and the three components of it (same as .x, .y, and .z).

.ang is a vector of the rotation angles, in the current rotOrder, read-only.

.orient is a vector of x=pan, y=tilt, z=roll rotation angles, assuming the transform is in a Z-up coordinate system. Use with ".zup" variants, eg Obj.zuptrans, Mesh.zuptrans, etc to obtain Z-up transforms regardless of the scene's axis setting. Using Obj.zuptrans.orient will produce human-usable values, for example. Read/write.

.angXYZ is a vector of the rotation angles, interpreted in the XYZ order, read-only.*

.angZXY is the vector of rotation angles, interpreted in ZXY order, read-

only,* only.* only.*


.angZYX is the vector of rotation angles, interpreted in ZYX order, read-


.angYXZ is the vector of rotation angles, interpreted in YXZ order, read-


.inv is the inverse transform. (read-only).

.flip is the simpler transposed transform for rotations only (read only).

.det is the determinant of the rotation portion (read-only). Should always be 1.0 exactly!

.rot is a transform consisting only of the rotation portion. (read-only)

.trans returns an object that is the entire transform, when it is offered as an attribute. You can pass it to a function, say, and then extract any of the attributes from it at that time.

WARNING: .trans is NOT .transpose! Use .flip

If an object offers multiple transforms, each transform’s attribute names will have an additional prefix, such as .wx or .wrz.

* Note about attributes such as angZXY. The letters show the equivalent ordering to recombine the values. The values are always presented in XYZ order, though. For example:

ang = xf.angZXY

xf ~ = RotZ(ang.z) * RotX(ang.x) * RotY(ang.y)

Operators: you can multiply transforms together, for example, posnew = oldpos * wldtoobj * objtoref.


©2023 Boris FX, Inc. — UNOFFICIAL — Converted from original PDF.