|
When an object is transformed all textures attached to the object at
that time are transformed as well. This means that if you have a
translate
, rotate
, scale
, or
matrix
modifier in an object before a texture, then the
texture will not be transformed. If the transformation is after the
texture then the texture will be transformed with the object. If the
transformation is inside the texture
statement then
only the texture is affected. The shape remains the same. For
example:
sphere { 0, 1 texture { Jade } // texture identifier from TEXTURES.INC scale 3 // this scale affects both the // shape and texture } sphere { 0, 1 scale 3 // this scale affects the shape only texture { Jade } } sphere { 0, 1 texture { Jade scale 3 // this scale affects the texture only } }
Transformations may also be independently applied to pigment patterns and surface normal patterns.
Note: scaling a normal pattern not only affects the width and spacing. It does also affect the apparent height or depth of the bumps, for how to avoid this see Scaling normals.
For example:
box { <0, 0, 0>, <1, 1, 1> texture { pigment { checker Red, White scale 0.25 // This affects only the color pattern } normal { bumps 0.3 // This specifies apparent height of bumps scale 0.2 // Scales diameter and space between bumps // and also the height. Has no effect on // color pattern. } rotate y*45 // This affects the entire texture but } // not the object. }
|