Like all Director cast members, a Shockwave 3D cast member is for all intents and purposes invisible until a sprite of it is created on Director's Stage. When you create a sprite from a Shockwave 3D cast member, the image on the Stage is a View Port into the 3D world inside that cast member, as seen through one of its cameras. A Shockwave 3D cast member can have any number of cameras in it, but each sprite of that cast member can only use one of them at a time to depict that world on the Stage. Luckily, you can change the specific camera that a Shockwave 3D sprite uses because it is a property of that sprite. So, while a Shockwave 3D sprite can only look into its cast member's 3D world through one camera, you can easily change that camera.
The basic format for setting the camera that a Shockwave 3D sprite uses is as follows:
sprite(whichSprite).camera = member(whichMember).camera(whichCamera)
Now, let's put this information to work!
This article assumes you are already familiar with the basics of Shockwave 3D, 3D Lingo, and the 3DPI property inspector.
Before you begin, download the sample files at the beginning of the article. These consists of two sample movies (sample1.dir and sample2.dir) and a single W3D file. The W3D file has been imported into both sample movies. I created this file in Alias|Wavefront Maya to depict a simple, animated, cut-away 3D jet engine. In creating it, I set up four cameras, each using a different view (see figure 1). As you may have already surmised, positioning and orienting cameras in a 3D scene is much easier in the visual environment of a 3D authoring program than in Director.
Figure 1. Setting up multiple cameras in the 3D modeling application
Load the sample1.dir file in Director. In this movie, four sprites of the Shockwave 3D cast member have been arranged on the stage, each viewing the 3D world through its default camera (see Figure 2).
Figure 2. The initial state of the sample1.dir movie
If you don't already have the “3DPI” Xtra installed, go to www.3dpi-director.com to download a free trial version of this indispensable Shockwave 3D cast member inspector before continuing. In 3DPI, view the Camera panel for the Shockwave 3D cast member, noting the names of each of the four custom cameras in the scene: cam_Shape1, cam_Shape2, cam_Shape3 and cam_Shape4 (see Figure 3).
Figure 3. Using 3DPI to get 3D world camera information