
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
Summary of Contents for DIRECTOR MX 2004-USING DIRECTOR
Page 1: ...DIRECTOR MX 2004 Using Director...
Page 16: ...16 Chapter 1 Introduction...
Page 82: ...82 Chapter 3 Sprites...
Page 98: ...98 Chapter 4 Animation...
Page 134: ...134 Chapter 5 Bitmaps...
Page 242: ...242 Chapter 10 Sound and Synchronization...
Page 274: ...274 Chapter 11 Using Digital Video...
Page 290: ...290 Chapter 12 Behaviors...
Page 302: ...302 Chapter 13 Navigation and User Interaction...
Page 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Page 392: ...392 Chapter 16 Working with Models and Model Resources...
Page 418: ...418 Chapter 18 Movies in a Window...
Page 446: ...446 Chapter 22 Managing and Testing Director Projects...