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

Displaying changes on the screen is very time consuming, and it can be distracting. When initializing your world,<br />

you may want to prevent any changes from being made visible. See “suspendUpdates” on page 394 for more details.<br />

Collision detection requires intensive use of the computer processor, especially when there are many moving<br />

objects that are close together. Limiting the use of Physics simulations, and deactivating any low-priority Physics<br />

elements can improve performance. See “Physics simulations” on page 395 for more details.<br />

Both JavaScript and Lingo provide multiple ways for achieving the same ends.<br />

If you have a lengthy operation that needs to be repeated on every frame, it helps to that uses few lines of code is<br />

not necessarily faster than one that uses more precise commands. This is especially true when using repeat loops.<br />

See “CPU-friendly code” on page 396. It also helps to execute as much of your code as possible while the <strong>Director</strong><br />

playback engine is not busy doing something else. See “Using frame events wisely” on page 397.<br />

Low-polygon modelling<br />

Each face that appears in a scene requires its own personal treatment. The fewer faces you use, the faster the scene will<br />

display.<br />

Creating realistic low-polygon models is a specialized skill. Careful use of textures and normal mapping can lead to<br />

very impressive effects. Click here for more information.<br />

Reducing the number of faces at runtime<br />

If you prefer to work with models that have a higher polygon count, you can use two techniques to reduce the<br />

number of polygons that are displayed at run-time. You can use the LOD (Level of Detail) modifier to simplify the<br />

geometry of models when they appear small in the distance. See “Level of Detail (LOD)” on page 51. This gives you<br />

model-by-model control over appearance.<br />

You can set a targetFrameRate and set useTargetFrameRate to TRUE. The 3D playback will use these settings to<br />

reduce the number of faces used to display all models in an attempt to achieve the specified target frame rate.<br />

Depending on the scene that you wish to display, you may find that you can increase the frame rate by 5 - 20% using<br />

this technique.<br />

useTargetFrameRate merges adjacent faces which have very similar orientations<br />

In certain situations, such as when you use a narrow beam spot light, you may want to increase the polygon count on<br />

a low-polygon model. You can use the SDS (SubDivision Surfaces) modifier to do this. See “Subdivision Surfaces<br />

(SDS)” on page 51.<br />

Last updated 8/26/2011<br />

388

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

Saved successfully!

Ooh no, something went wrong!