Rotate | Scale | Translate

Texture Transformations

Texture transformations apply only to primitives and are not inherited. There are three ways to transform a texture on a primitive:

  • Rotate - Spins a texture around the x, y and z axes.
  • Scale - Repeats a texture relative to the x, y and z axes.
  • Translate - Moves a texture relative to the x, y or z axis.

All transformations occur in the order in which they appear within a component.

Rotate

Use the TxRotate transformation to rotate a texture about the x, y, or z axis. The command is formatted as:

TxRotate <rx> <ry> <rz>

Rotations are applied in consecutive order, beginning with the X axis (i.e., X, and then Y, and then Z).

In general, rotating a texture about the x or y axis is visually meaningless.

In this sample file, the texture is rotated 20 degrees about the z axis:

Scale

Use the TxScale or TxUniformScale transformation to repeat a texture. The commands are formatted as:

TxScale <sx> <sy> <sz>

or

TxUniformScale <xyz>

TxScale allows specific repetitions along each axis, while TxUniformScale applies the same repetition along each axis.

It is best to set the z axis to 1 since any other value is visually meaningless.

In this sample file, the texture is repeated twice along the x axis and half along the y axis, but does not alter the z axis:

Translate

Use the TxTranslate transformation to translate a texture along the x, y, or z axis. The command is formatted as:

TxTranslate <tx> <ty> <tz>

A texture is mapped across a primitive such that the minimum texture coordinate is 0.0 and the maximum texture coordinate is 1.0 along any axis.

Translating a texture by 0.1 is the same as translating the texture by 1.1.

Translating a texture along the z axis is visually meaningless.

In this sample file, the texture is translated 0.5 along the x axis and 0.2 along the y axis: