6.8.3 Flying Viewpoint
In this example, we will show you how to define motions for objects
without stretching them. For example, when creating motions for view-
points, aeroplanes etc., the possibility to fully control banking is a
valuable feature. This example also demonstrates how to use viewpoint
and aimpoint primitives to define the orientation for the camera.
1. Create one cube in the middle of the View window so that we have
something to watch in the animation.
2. Select the perspective projection (View/Type/Perspective) and find a
good viewing angle by using the cursor keys.
3. Create aimpoint and viewpoint primitives by selecting the menu View/
Create Camera. REAL 3D creates the camera representing the current
orientation of the View window. The camera object consist of two sub-
objects: an aimpoint and a viewpoint. We are going to animate only the
viewpoint, so delete the aimpoint primitive. This makes the camera
always point to the origin point of the space.
4. Create a CONTROL CURVES method at the same level with the viewpoint
(Under the "camera" object).
5. Create two control curves under the method so that they show the route
for both "eyes" of the viewpoint.
6. Select the method object and add the following tag to it:
FOR I=1
which tells to the method not to use stretching (for full description
of "I" variable, see the reference section).
7. Activate the View/Observer/Camera View function. You may also use
Modify/Properties/Attributes/WF-Invisible to make the camera wireframe
invisible during the animation play.
Play the animation and the eyes of the viewpoint will follow the
control curves. However, because the aimpoint does not exist, the
camera is aiming at the origin (at the cube) all the time.
|