Animating the Spacefighter with Constraints and Controllers
Flying a Spacefighter
Animating a Pen
Taking Control of Mars, Its Moons, and the Space Station
So
far, you've used dummy objects to help animate the spacefighters. Another
handy use of dummy objects is as an alternate pivot point. Any object
can be used as a pivot, but dummies are great because they don't
render.
Set
up the lesson:
Take a few moments to familiarize yourself with
the names of the objects in the scene. This will make it easier
for you to select objects during this lesson.
Rotate
Mars and its moons:
The first part of this lesson focuses on the
three heavenly bodies you see in the scene. You will set up a dummy
object to control the rotation of Mars and its moons, Deimos and
Phobos.
- In
the Left viewport, create a Dummy object around Mars. Name the dummy
object MarsControl.
Make the
dummy a little larger than the planet so it's easier to pick.
- With
the dummy object still selected, choose Tools menu > Align, and click Mars.
- In
the Align Selection (Mars) dialog, do the following:
- Turn
on X, Y and Z Position in the Align Position (Screen) group.
- Turn
on X, Y and Z Axis in the Align Orientation (Local) group.
- Click
OK to accept the settings.
- Select MarsControl.
- Go
to the Motion panel, and expand the Assign Controller rollout. Select Rotation:
Euler XYZ.
-
Click
the Assign Controller button and choose TCB Rotation then click
OK.
TCB Rotation will allow you to rotate objects
on their Local axes as opposed to the World axes. This is beneficial
when you have an object that is rotating on an axis that is tilted,
such as the rotational axis of a planet.
-
Select Mars,
then click Select and Link. Drag the rubber band to MarsControl.
Release the mouse button when the cursor changes.
-
Link
each of the moons, Deimos and Phobos, to MarsControl.
Mars and
its two moons are now linked to MarsControl.
Any movement or rotation you make to MarsControl will
affect all the planetary bodies.
-
Click
Select And Rotate, and select MarsControl.
-
Change
the Reference Coordinate System from View to Local.
-
Turn
on the Auto Key button and move the time slider to frame 100.
- In
the Z axis field, below the time slider, enter 60.
This rotates MarsControl by
60 degrees around its local Z axis. Because the planet and moons
are linked to MarsControl, they also rotate.
- Turn
off the Auto Key and save your work as MySpaceStation.
- Activate
the SpaceCam viewport and play the animation.
You will
see Mars rotating on its axis, then at frame 60, Deimos swings into
view and passes by and Phobos remains off-camera. If you like, you can
zoom out to see both moons during playback.
- Return
the time slider to frame 0 before continuing.
Set
the space station into orbit:
Now that Mars is spinning on its own axis and
Deimos and Phobos are orbiting Mars, you can set the space station
into a geosynchronous orbit around Mars (an orbit that matches the
planet's rotation). You'll use the same technique for controlling
the space station.
- Add
a new dummy object to the Top viewport, and name it StationControl.
It doesn't
matter where you place the dummy object, because you'll align it
to Mars in a few steps.
- Open
the Assign Controller rollout on the Motion panel, and select Rotation
: Euler XYZ.
-
Click
the Assign Controller button, and choose TCB Rotation. Click OK.
- While StationControl is
still selected, choose Tools menu > Align, and click Mars.
- In
the Align Selection (Mars) dialog, do the following:
- Turn
on X, Y and Z Position in the Align Position (Screen) group.
- Turn
on X, Y and Z Axis in the Align Orientation (Local) group.
- Click
OK to accept the settings.
These are
the same settings you made when aligning MarsControl to
Mars in the previous section.
-
In the
Left viewport, link SpaceStation to StationControl.
-
Turn
on Select And Rotate and select StationControl.
Change the Reference Coordinate System from View to Local, if it's
not already changed.
TipYou
must always choose the transform (in this case, Select and Rotate) before
choosing the Reference Coordinate System. Different transforms can have
different Reference Coordinate Systems. If you choose the coordinate system
first, it might change when you choose a different transform.
-
Turn
on the Auto Key button and move the time slider to frame 100.
- In
the Z axis field, below the time slider, enter 40.
- Turn
off the Auto Key and save your work as MySpaceStation01.
To create
an incrementally saved file, use the Save As command click the button.
- Play
the animation.
Now the Space Station is orbiting around Mars
but it's orbiting at a slower rate.
Add
artificial gravity to the space station:
The space station needs to rotate around its
own axis in order to generate some level of artificial gravity for
its personnel. This last section will solve that problem.
- In
the SpaceCam viewport, select SpaceStation and
open the Motion panel.
- Open
the Assign Controller rollout and select Rotation : Euler XYZ.
-
Click
the Assign Controller button and choose TCB Rotation then click
OK.
-
Turn
on Select And Rotate if it's not already active. Set the Reference Coordinate
System from View to Local.
-
Turn
on the Auto Key button and move the time slider to frame 100.
- In
the Z axis field, below the time slider, enter 90.
- Turn
off Auto Key.
- Play
the animation.
Now the Space Station rotates about its own
axis while it's in geosynchronous orbit around Mars. Maximize the
SpaceCam viewport for a better view.
- Save
your work as MySpaceStation02.