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

As you rotate the camera in the Shockwave 3D window, you can see two other sets of axes. The behavior on the 3D<br />

sprite executes a statement similar to the following:<br />

member("3D World").debugFlags = 2<br />

This statement shows the position and orientation of all the invisible objects (cameras, lights and groups) in the scene<br />

by showing the axes of each object. What you see in the initial view is the position and orientation of the<br />

group("World").<br />

As you rotate the camera in the Shockwave 3D window, you can also see the axes for a directional light and for the<br />

camera that is used to create the view in the 3D sprite. (You can see the axes for the camera at the top right in the image<br />

above). An ambient light is also present. However, its axes coincide exactly with those of group ("World"), so you will<br />

not see a separate set of axes for the ambient light.<br />

A handy mnemonic device<br />

You can reproduce the directions of these three axes with your right hand.<br />

Hold your right hand up in front of you at the same level as your eyes, with the palm towards you. Point your thumb<br />

out to the right. Point your index finger upwards. Point your middle finger towards your eyes.<br />

Note: Use your right hand even if you are left-handed.<br />

The three fingers indicate the directions of the 3D world's three axes:<br />

x-axis - thumb to the right<br />

y-axis - index finger upwards<br />

z-axis - middle finger towards you<br />

The right-hand rule<br />

The origin of the world<br />

Every 3D cast member contains a group called "World". This group cannot be deleted. By definition, this group is<br />

placed at the center of the 3D space. Its position is defined as vector(0, 0, 0).<br />

By default, all the models, lights, and objects in a 3D cast member are children of group("World"). (You will discover<br />

an interesting technique with nodes that are not children of the World in “Sky box” on page 108). The position of all<br />

these child nodes can be measured from the origin point at vector(0, 0, 0).<br />

Defining a shape in 3D space<br />

A model resource defines a 3D shape in space. In the real world, a three-dimensional object is solid. On a computer, a<br />

simulated 3D object is made of vertex points that are joined together by lines to create triangular faces. These triangular<br />

faces are often called polygons. (Some 3D design applications allow you to create faces with more than 3 sides, but<br />

<strong>Director</strong> only allows you to use triangles.)<br />

It is not possible to see a model resource. As far as your computer is concerned, a model resource is just a set of<br />

numbers. To see what those numbers represent, you need to create a model from the model resource.<br />

To see an example, download the movie Cube.dir and launch it.<br />

Last updated 8/26/2011<br />

23

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

Saved successfully!

Ooh no, something went wrong!