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

The movie Cube.dir creates a cube model and places it at the center of the 3D world<br />

Open the Shockwave 3D window by double-clicking on the "3D World" member in the Cast window, and use the<br />

Rotate Camera tool to view the cube from all sides.<br />

The code in the "Create Cube" behavior does 4 key things:<br />

1 Creates a model resource using a box primitive (see “Regular primitives” on page 71).<br />

2 Creates a model using the new model resource.<br />

3 Makes both the inside and the outside faces of the model visible.<br />

4 Changes the shader used by the model so that the vertex points and faces are visible.<br />

Do not worry about how the code works yet. What you need to study is how the box shape is defined. When you finish<br />

reading this section, you will be able to understand the code.<br />

To create a realistic box, you only need 8 vertex points and 12 polygons.<br />

Note: To create a realistic human figure, you need several hundred vertex points and faces. The more polygons a model<br />

resource has, the more calculations <strong>Director</strong> needs to make in order to display it. If your 3D world needs to react quickly<br />

to user input, it is a good idea to use as few polygons as possible.<br />

Vertex points<br />

The model resource in the Cube.dir movie has 8 vertex points. The first one is at the position vector(25, -25, -<br />

25). To reach that point, you:<br />

Start at the center of the world at vector(0, 0, 0)<br />

Move 25 world units in the same direction as the red x-axis<br />

Move 25 units downward (in the opposite direction of the green y-axis)<br />

Move 25 units backwards (in the opposite direction of the blue z-axis)<br />

Last updated 8/26/2011<br />

24

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

Saved successfully!

Ooh no, something went wrong!