start   previous   next

Shout3D™ 2.5 - Workflow Tutorial


Adding keyframed animation

Let's add some animation to make the box rotate.

Normally, you'll create keyframed animation in your 3D modeling and animation package and it will simply export as part of the scene file. But we'll do it a bit differently here. We'll add this very simple animation by editing the scene file in a text editor. This will help you to understand the power of being able to edit scene files without having to re-export, and to grasp the basics of VRML-style keyframed animation.

Keyframe animation in VRML involves three steps.

We must assign a name (called a DEF name) to each node in this chain, and then use ROUTE statements to connect the nodes up to receive information from each other. Most export tools will automatically create DEF names, but these were deleted earlier in this tutorial for simplicity.

Our TimeSensor node will provide for a 10-second looping animation. The animation will begin running as soon as the scene is loaded into the player.

The Interpolator will rotate the box and therefore must be an OrientationInterpolator. It provides for only two keys, at the very start and very end of the 10-second animation. Rotation will be around the y (vertical) axis. The first key is for 0 degrees and the last key is set to 180 degrees. Since the animation will loop continuously (and the box looks the same from all sides), the box will appear to rotate around 360 degrees.

Next>


Copyright© 1999-2001, Shout3D LLC.