Tutorial: Animating a Tunnel Flythrough
using Strata 3D (StudioPro)

by Greg Glover

Here's how to animate a camera flying down the middle of a tunnel, following all the twists and turns.

Start with the path for your tunnel. Draw it with the Pen tool. Before doing anything else, get the shape of your path exactly how you'll want your tunnel to twist and turn. (You won't want to edit its shape after you have your camera path.) Each node in the curve will be an even increment in time; this interval is set by double-clicking the Convert To Path tool. (Fig. 1) ("Each knot equals __ seconds") Therefore you'll want the points along your path to be approximately equidistant from each other unless you want sudden accelerations and decelerations. Also, think of the intended duration of your animation and set the interval accordingly. (Length of animation divided by number of control points equals time interval.)

Once you have your tunnel path created, duplicate it by option-dragging along one of the axes, and then undo immediately. The Undo operation undoes only the move, not the duplication so you will end up with two paths in exactly the same position. You'll need that spare so Hide it by poking its eye in the Project window. Now, extrude a hollow circle (or whatever shape you want your tunnel cross-section to be) along that path with the Path Extrude tool. There's your tunnel. (Fig. 2) Make sure it does not unintentionally intersect with itself. Hide your path extruded tunnel and reveal the remaining Bezier curve.

Create a small sphere, smaller than your tunnel cross-section. Create a Shape to hold it, and name it something appropriate, like "Target." Don't just rename the sphere; you want a Shape so you can go back into it later and hide the sphere and add a light. In the main modeling window, attach your Target Shape instance to the duplicated curve with the Convert To Path tool. (Be sure that the "Remove Curve" checkbox is NOT checked in the Convert To Path tool settings! You still need that curve!) There's your target, animating exactly down the middle of your tunnel.

With the Target shape selected, look closely at the knot distribution in its motion path. (Fig. 3) Each knot represents a frame, and they should be evenly distributed. If knots are spaced widely apart in one section and then suddenly clump together on the other side of a control point, you'll have to adjust the position of the corresponding keyframe in the timeline. Move the keyframe and watch how the knots move from one side to the other. Play your animation and watch the movement of the sphere down the path. Adjust your keyframes until the movement is smooth. (Fig. 4) (Fig. 5) You may even have to adjust the velocity curves, but that opens up another whole can of worms.

Now, put a camera in the model, and attach it to the same curve that should still be there. There's your camera running inside the sphere. Move its keyframes so they line up exactly with the Target's keyframes in the Project window. (Fig. 6)

This way your camera movement will be smooth and in tandem with the Target. Next, select the camera so that its properties show up in the Object Properties palette. This is where you choose your Target Sphere from the Target pop-up menu. Also, you will want to widen the view angle at this point, to around 90 degrees. A wider angle makes it look more dramatic, and minimizes any jittery tracking if your path is not perfectly smooth. Finally, decide whether you want the camera to stay level or bank on turns and set the lock accordingly. (Fig. 7) Almost there.

Inside your Target Shape, Hide the sphere or make it a Construction Object so it won't render. Now the important part: go to your main modeling window, then the Project window. Shift-select all of the Camera's event markers, including the first one. When you shift-select the last event marker, keep the mouse button down and drag it FORWARD IN TIME (to the right) a couple of frames or more. Hopefully you have just moved all of the Camera's event markers. That puts the Camera just a little BEHIND the Target so it chases and aims consistently. (Fig. 8)

Play your animation and watch the camera chase the Target. Now reveal your path-extruded tunnel. It should perfectly enclose your animation paths. Now everything's flying down the middle of the tunnel.

If you hid the sphere in your Target Shape, you can preview your movie in Flat preview mode without a ball in the way. Use Flat preview so that the faceting gives you an idea of the motion, or if your machine's fast enough give your tunnel a texture and use OpenGL Shaded with Texture Previewing turned on. Also hide your leftover bezier curve so it doesn't render in the Scanline renderer. Finally, you'll want to move your cut-in point to where the camera starts moving (those couple of frames you dragged) and have it cut out before the target stops moving.

As for lighting, you can put stationary lights in strategic places along the tunnel interior, or put a light inside your Target Shape. I found my target was too close for good lighting and animated another light along the path, farther down the tunnel (by dragging the camera and Target keyframes a little further forward in time). (Fig. 9) (Fig. 10)

See Fig. 11 for a screen shot through the Camera window. (Fig. 11)

Click here for a QuickTime movie. (812 K. Requires QuickTime 3.)

Now please visit my home page!