User Guide

360 Chapter 16: Working with Models and Model Resources
Properties of the engraver shader
The
#engraver shader gives the effect of an engraved metal surface. You can control the size and
number of etched lines by adjusting the
brightness and density properties, respectively. Use
these properties to work with the engraver shader:
Textures
Each shader can have textures applied to it. Textures are 2D images drawn on the surface of a
model. The appearance of the model’s surface is the combined effect of the shader and textures
applied to it. If you do not specify a texture, a default red-and-white bitmap is used.
The pixel height and width of the 2D images you use as textures should be powers of 2 (that is, 2,
4, 8, 16, 32, and so on). This is because most video cards scale images to powers of 2. If the image
used does not have pixel dimensions that are a power of 2 (values including 2, 4, 8, 16, etc.), there
will be a decrease in both rendering performance and visual quality. In addition, all the textures
used in a 3D scene must be able to fit in the computer’s video RAM at the same time. If not,
Director switches to software rendering, which slows performance.
Be aware of the limitations of your video RAM and that of your intended audience. Some video
cards have as little as 4 megabytes of video RAM. Carefully budget your total texture size when
designing your 3D world.
Texture properties
Use these properties to work with textures:
Property Access Description Default
name
Get and set Name of shader None
brightness
Get and set Value controlling amount of white in
shader
0.0
density
Get and set Value controlling number of lines used
to shade an area
40.0
rotation
Get and set Angle describing 2D rotational offset for
engraving lines
0.0
Property Access Description Default
name
Get and set Name of texture. None
type
Get Possible values:
#fromfile: bitmap defined as part of 3D
import
#fromCastmember: bitmap derived from
Director cast member
#fromImageObject: the texture was
created from a Director image object
None
member
Get and set If the type is #castmember, this property
identifies the source of the bitmap.
If the type if
#fromfile, this property is
void.
None