Graphics Programs Reference
In-Depth Information
rounds off the number. The farther back in space, the larger the blur value. The next
line shows the syntax for the blur filter. We are creating a new array, putting a blur
filter into it, and then applying it to the filters property of the object. Not bad, eh?
Save your movie as 7_1_puppyCam_DONE.fla and test it. You should see puppies that
are in sharp focus in the foreground and that get fuzzier as they go back in space.
When you zoom in, they should come more into focus. If you keep zooming, puppies
should disappear as expected and reappear when you zoom back out.
Viewer Objects and Scenes
Now that you're familiar with moving the camera, let's make the viewer into a little
more integrated part of the 3D environment. We are going to create a viewer object
and then provide that viewer with a location in 3D space just as we have been doing for
the objects we are viewing. We use the term viewer rather than camera just to person-
alize the process, but we are functionally talking about the same thing as the camera.
Open dolphinCam.fla to view the script we will be discussing. In this example, we are
placing the viewer at the origin of the 3D world coordinates.
We will still define the distance d from the viewer to the picture plane as before. It may
be helpful to think of the picture plane as a frame through which we are viewing the
3D world as shown in Figure 7.3. The picture plane will move with the viewer, but this
distance will remain constant as the viewer moves. We will set the viewer speed (line 6)
just as we did the camera speed in the previous example. The variable tooClose will be
used to determine when an object is too close to the viewer to be seen (line 7).
Figure 7.3 The viewer and the picture plane
Search WWH ::




Custom Search