07.12.2012 Views

Adobe Director Basics

Adobe Director Basics

Adobe Director Basics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ADOBE DIRECTOR BASICS<br />

3D basics<br />

Using a texture to place an image on the surface of a<br />

model<br />

Each shader can have textures applied to it. Textures are 2D images drawn on the surface of a model. The appearance<br />

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<br />

default red-and-white bitmap is used.<br />

To see how to create a new texture object and apply it to a shader, download the movie Texture.dir and launch it.<br />

You can create a texture from an image object or a member with a .image property<br />

This example creates a new texture in the cast member “3D World” to display the image of the bitmap member “Felt<br />

256x256”:<br />

v3Dworld = member("3D World")<br />

vName = "Felt Texture"<br />

vBitmap = member("Felt 256x256")<br />

vTexture = v3Dworld.newTexture(vName, #fromCastMember, vBitmap)<br />

Alternatively, you can create a texture without associating an image to it. You can set the image or member of a texture<br />

at any time:<br />

vTexture = v3Dworld.newTexture(vName)<br />

vTexture.member = vBitmap<br />

Displaying a texture<br />

Textures can be displayed in three different ways:<br />

As a 2D image projected by the camera, as an overlay or a backdrop<br />

One each of the particles emitted by a particle system<br />

As part of a shader object that is attached to a model<br />

For more information on overlays and backdrops, see “Overlays and backdrops” on page 47.<br />

For more information on particle systems, see “Particle emitters” on page 74.<br />

A shader contains 8 layers; a texture can be applied to each of the layers. You can adjust the settings of the different<br />

layers to create different effects, such as surface texture, reaction to diffuse light, reflections that appear to come from<br />

the environment, variations in the shininess of the surface and highlights. For details on how textures interact with the<br />

various shader layers, see “Standard shaders” on page 131.<br />

Last updated 8/26/2011<br />

37

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!