07.12.2012 Views

Adobe Director Basics

Adobe Director Basics

Adobe Director Basics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ADOBE DIRECTOR BASICS<br />

3D: Controlling appearance<br />

If only one or two vertex points are lit, then the other vertices appear dark; the lighting creates a gradient across the<br />

face. This is only an issue with spot lights. A spot light produces a cone of light. One vertex of a face may fall inside the<br />

cone while the other vertices fall outside it. If a face is particularly big and if it is directly in front of the spot light, the<br />

face can fail to light up at all. The cone of light can miss all three vertex points, even if the middle of the triangular face<br />

is directly in line with the beam. To see a demonstration of this effect, download the movie SpotTest.dir.<br />

A spot light lights up faces whose vertices are within the cone of light<br />

The SpotTest.dir movie shows a plane model that is perpendicular to the camera and to a spot light. Using the mouse<br />

you can change two parameters:<br />

The distance from the plane to the spot light by moving the mouse pointer horizontally.<br />

The spotAngle of the spot light by moving the mouse pointer vertically.<br />

The red line across the 3D sprite indicates the combination of distance and spotAngle at which the corners of the plane<br />

are just lit. If the mouse pointer is above or to the left of this line, the corners of the plane model are not lit, and the<br />

spot light fails to light the plane completely.<br />

When you launch the movie, the plane's modelResource has only two vertices horizontally and two vertices vertically.<br />

In other words, its only vertices are in the corners. If you move the mouse pointer below the red line, the plane model<br />

will be fully lit. If you move it above the red line, it will not be lit at all.<br />

You can create a more graduated response by dividing the plane into smaller triangles. The screenshots above shows<br />

which triangular faces will be lit by a particular cone of light from a spot light.<br />

SpotDecay<br />

Even with fairly small faces, the edges of the cone look very hard and rough. You can soften the edges by setting the<br />

spotDecay property of the spot light to TRUE. The following screenshots show the same distance and spotAngle<br />

settings as in the screenshots above, but with the spotDecay set to TRUE.<br />

Last updated 8/26/2011<br />

128

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

Saved successfully!

Ooh no, something went wrong!