If you want to use full-featured 3D cast members in your Director movies, you have to create them in a 3D modeling program and import them into Director. Director can import 3D files in only one format: the Web 3D format, whose file extension is W3D. Many popular 3D modeling programs, such as 3ds max and Maya, can export W3D files.
There are two notable differences between imported 3D files and the 3D text cast members you worked with earlier in this chapter. First, an imported file may contain any number of separate 3D models, lights, and cameras , each of which can be manipulated individually within the 3D world. In this regard, a 3D cast member is fundamentally different from an ordinary Director cast member, which is a single entity that can only be manipulated as a whole.
Second, a 3D file may have movement or animation built into it by the 3D program in which it was created. A 3D cast member containing animation may be handled like a digital video or Flash cast member, which has its own time-based content. (See "Working with Video Sprites " in Chapter 10.)
Keep in mind that 3D is a high-bandwidth format. Most 3D modeling programs tend to create large, processor- intensive files, which may be fine for disk-based applications but are often not suitable for streaming over the Web. For this reason, be careful to keep your 3D cast members as simple as possible. Otherwise, the users who download your Shockwave movies will need a fast computer and either a broadband Internet connection or a good amount of patience.
You can view and change the properties of imported 3D files in the 3D Model tab of the Property Inspector ( Figure 18.32 ). This tab has many of the same controls as the 3D Extruder tab described earlier in the chapter, but not all of them are useful. The shader and texture controls (Shader Texture, Diffuse, Specular, and Reflectivity) work only if the imported file contains a single 3D object that doesn't already have a shader applied. Otherwise, the controls do nothing. The directional lighting controls (the Light pop-up menu and the Directional color menu) can be used to add a directional light to the 3D world, but they have no effect on any existing directional light. In general, if you want to change internal characteristics of the 3D world, the best place to do it is in the 3D program that produced the file.
Figure 18.32. The 3D Model tab in the Property Inspector.
To import a W3D file:
To preview an imported 3D cast member:
Double-click the 3D cast member in the Cast window.
The Shockwave 3D window opens, displaying the 3D world contained in the file ( Figure 18.33 ). If the file contains more than one camera, Director uses the first camera it finds.
Figure 18.33. An imported 3D file displayed in the Shockwave 3D window.
If you want to view the 3D objects from different angles, use the mouse and the camera-movement buttons (described in "To change the position of the camera relative to 3D text," earlier in this chapter) to move the camera around the 3D world.
If the 3D file contains animation, use the playback controls at the top of the Shockwave 3D window to preview the animation.
To change the position of the camera within an imported 3D cast member:
To restore the original position of the camera:
In Cast window, select the 3D cast member whose camera position you want to restore.
Click the 3D Model tab in the Property Inspector.
Click the Default button in the Property Inspector ( Figure 18.34 ).
Figure 18.34. Click the Default button to revert a camera to its original settings.
The camera reverts to its original position and rotation.
To change the properties of an imported 3D cast member:
Select a 3D text sprite in the Score or on the Stage.
Click the 3D Model tab in the Property Inspector.
Change properties as desired.
DTS: This option is selected by default. DTS stands for Direct to Stage. When this option is selected, the 3D sprite is placed in front of the Stage instead of interacting with other sprites on the Stage, thus improving the playback performance of your Director movie.
Animation: If the 3D cast member contains animation, this option allows the animation to be played . Otherwise, only the first frame of the 3D cast member will be seen.
Loop: This option is available only if the Animation option is selected. It causes the animation to play repeatedly for as long as the 3D sprite is on the Stage.
If you want to change the color of the background or ambient light, use the Background and Ambient color menus ( Figure 18.35 ). They work the same way as the ones described in "To change the way 3D text is lit," earlier in this chapter.
Figure 18.35. Of the lighting and shader controls on the 3D Model tab, only the Background and Ambient color menus are generally useful.
The remaining controls on the 3D Model tabthe directional lighting, shader, and texture controlsdon't work as you'd expect. See the introduction to this section, "Using Imported 3D Files."
To see the internal structure of an imported 3D cast member:
Choose Window > Object Inspector.
The Object Inspector opens ( Figure 18.36 ).
Figure 18.36. The Object Inspector always opens empty, regardless of what may be selected in the Score or Cast windows .
Drag a 3D cast member from the Cast window to the Object Inspector.
The name of the 3D cast member appears in the left column of the Object Inspector ( Figure 18.37 ).
Figure 18.37. Click the plus sign or expander arrow to see the components of the 3D file.
Click the plus sign (Windows) or expander arrow (Mac) to the left of the cast member's name.
A list appears, showing 3D models, lights, shaders, textures, and all other components of the 3D file.
Click other plus signs or expander arrows as necessary to find the specific elements or values that you want to look at ( Figure 18.38 ).
Figure 18.38. Every element and every setting in the 3D file is nested somewhere in the Object Inspector.
Like the Property Inspector, the Object Inspector is interactive: You can edit values in the Object Inspector and see the changes reflected on the Stage. However, changes made in the Object Inspector are not saved with the movie file. Therefore, editing values in the Object Inspector is useful only for testing. If you want to make permanent changes in a 3D cast member, you'll need to edit the original file in a 3D modeling program.