CMP 80c Assignment 4

Due by Tuesday 3/5, 2002 by midnight
Submit using CATS submit program as usual


Objectives:

To learn how to use Lightwave 3D for animation, including keyframing, simple hierarchies, morphing objects into each other, and camera animation.

Assignment Requirements

For full credit on this assignment, fulfill all the conditions listed below. (While it's not a requirement of this assignment, it will be more fun for you and the readers if the animation has some meaning, i.e., cars racing, planets going around the sun, leaves falling, etc.)

Object Animation

Morphing

Hierarchies

Camera Animation

Rendering

What to submit

Like the previous assignments, you'll need to submit your scene file, and all the custom objects you used in your scene. You also should submit the movie you rendered, along with a ReadMe giving an overview of how you created your animation.

Animation using Keyframes and Motion Paths

Keyframes (keys) are the important intermediate models in the animation you will create. Many features can be animated, including geometrical transforms, vertex positions, and surfaces. You can set keys when desired using the Create Key button at the bottom of the screen, or have it occur automatically for the active object whenever you change it. For automatic keying, go to the Display tab, open the "General Options" panel and make sure "Auto Key Create" is set to "All Channels". In addition, you should make sure the "Auto Key" button at the bottom center of the screen is selected (is. a dark background, with light text). Keeping "Auto Key" on will make LightWave automatically edit existing keyframes when you change the settings for an object at a frame where a keyframe has already been created.

General Options panel AutoKey button (set to on)

Note: You can also change the frame rate of your final animation (as it is saved in the movie file) in the "General Options" panel. See the smaller arrow above.

A key at frame 0 is automatically created when an object is loaded. This key is shown at the bottom left corner. Assuming you have set automatic keying (see above), whenever you make geometrical transformations to the object, the key is reset to the new values. For example, you can use the rotate, size and stretch commands on the menu on the left side of the screen.

To add more keyframes, pick a new keyframe number with the slider at the bottom. Assuming the standard 30 frames per second, a frame at 30 will be at one second. (In fact, because you can control how fast the frames are played back, or because the computer might be too slow for desired animation, actual speed may vary.) Now you can click on the move and drag your object to a new position where you want your object to be in about one second. You can again experiment with the rotate and size commands to change the orientation and size of your object. You can repeat this process to add more keyframes.

Observe that as you add more keyframes, a smooth curve (rather than linear segments) is being designed by Lightwave automatically for you. This is the spline motion path along which your object will travel.

Stepping Through, Adding, and Deleting Keyframes

The VCR-like controls at the bottom right of the window let you play your animation, or step forward back through keyframes (<<+ and >>+) or step forward and back through all frames. If you are on a keyframe (as opposed to any old frame), you can delete it with the "Delete Key" button. You can create a keyframe using the "Create Key" button. The "Create Key" dialog will be brought up. It lets you pick which values are keyframed at the frame and you can change which frame the key will be placed at (it defaults to the current frame). If "Auto Key" is set, and you change the position of a keyframed object, the key is automatically modified. If you use "Create Key" and select "All Items" from the "For" menu, you can create (or update) a keyframe for every object in your scene. As with the "Create Key" dialog, you can use the "Delete Key" button to delete a Key Frame other than the one you are on just by changing the frame number in the "Delete Key" dialog box.

Create Keyframe Dialog

 

Delete Keyframe Dialog

 
Object with 2 keyframes (frame 0 and frame 10)

 
Object with 7 keyframes (frames 0, 10, 20, 30, 40, 50, and 60)

The Graph Editor

The Graph Editor is a powerful tool for adding keyframes, deleting keyframes, and modifying the properties of keyframes and motion paths that you just designed. It gives you precise control over the keyframes and also allows you to fine-tune the motions of your objects. This window always refers to the currently selected object. The "Graph Editor" button is in the top-left corner of the screen.

Channels

In the Graph Editor Window, you will see a list of "Channels" on the left. This is the list of properties that you can edit in this editor. By default, you can edit the Position and Scale for the X, Y, and Z axes, and you can edit the Heading, Pitch, and Bank rotations. All the channels listed on the left are displayed in the graph. The selected channel will be brighter than the others so you can see it more easily. Initially, the graph displays the x-position of your object during the animation. The horizontal axis of the Motion Graph is the time, while the vertical axis is Meters (for position), Degrees (for rotation), or Percent (for scale). The graph editor can be used to modify these properties of the objects during the animation. At the bottom left, you will have a list of the objects, lights, and cameras in your scene. Double clicking on them will allow you to edit their motions without having to go back and select them in the main window.

General Editing

In order to modify the property of any keyframe, select a keyframe by clicking on it with the left mouse button. Keyframes are marked in the graph with a + symbol. Then, make sure the "Curves" tab is selected. You can adjust the frame the selected channel key is associated with by changing the value of the "Frame" field. You can adjust the value for the channel at the key by changing the value in the "Value" field. In both cases, you can use the button on the right side of the field to (with the arrows pointing left and right) to change the value.

You can use the mouse to edit the keys by dragging them around the graph. Between the graph and the three tabs, there is a row of five buttons. The active button specifies what actions the mouse will take when you select and drag key frames around. The buttons (from left to right) allow you to: Move keyframes, Add/Delete keyframes, Stretch keyframes, Roll the keyframes, Zoom the graph. To the right of the buttons is a description of how to use it. For example, when the "Move" button is selected, you can:

Before and After the keyframed motion

You can also change what the motion is before the first keyframe ("Pre Behavior") and after the last keyframe ("Post Behavior"). The default is "Constant", which means that the value of the first or last keyframe is used, depending on whether or not you are editing the Pre or Post behavior. Other values are:

The best way to understand these options is to create a short motion (maybe three keyframes long) and play around with them in the "Graph Editor". When changing the Pre and Post Behaviors, you may want to zoom out a little so you can see what the effects are over a long period of time.

If you want to edit the entire motion of an object at once (and not just a single channel), you can select all the channels by holding down the "Control" key on the keyboard as you click on them. Holding down the "Shift" key will select a range of channels. Doing this is particularly useful when you want to change the Pre and Post behaviors.

Graph bounds

You can use the "Limits" menu in the top right corner to automatically set the graph to the proper values to be able to see the entire curve of the current channel. Just pick the "Automatic Limits" option in the menu. The "Numeric Limits" option will give you a dialog box where you can type in the numbers for the minimum and maximum values of the X and Y axes in the graph. Dragging on the criss-crossed arrow button to the right of the Limits menu will let you move the graph, while dragging on the magnifying glass will let you zoom in and out.

Spline Controls

You can control properties of your motion paths by altering some parameters associated with the splines that Lightwave is offering you. When you have a keyframe selected, the "Incoming Curve" menu becomes active. Using this, you can adjust the motion curve as it enters (and sometimes as it exits) the selected keyframe. There are a number of different curves available.

Making Objects Move with Other Objects

If you save a motion path, and read it in for another active object, that object will use the same motion path. This may mean it moves on top of the original object, so you can also alter this motion path by shifting key frames, or in other ways, to see a relationship that is not exact. When you read in a motion path for a new object, it becomes a new motion path, and changes do not affect the original one.

To save the motion associated with an object, open the "File" menu, and then the "Save" sub-menu. Pick the option "Save Motion File..." and give your file a name.

Another way to do this that does not allow changes is to parent one object to another. One this happens, the child object is always affected by the motion of the parent, but it can have its own motion relative to the parent as well. This is a hierarchy. For example, if you make the parent of the camera an object with a motion path, the camera will follow that motion path, even if you change it. To establish this relationship, we must select the Camera object and then click on the "Motion Options" button on the left-hand side of the window. This will display the "Motion Options" dialog box. At the top of the dialog is a menu that displays every object, Light, and Camera in your scene. You can pick any of these to be the parent of anything else (but, just like real life, nothing can be its own parent). The "Motion Options" dialog is available for any other object and light as well.

You can also make and object track another object. In this case, it will always point at that object. To track an object, again open the "Motion Options" dialog and pick the object you want to track from the "Target Item" menu. You can have a parent and a tracking object at the same time. Note that when you track an object, you no longer have direct control over the rotation angles for the object doing the tracking (the tracked object is not affected).

Creating and Animating Hierarchies

It is quite simple to make a hierarchy. First, make the parts of your hierarchy (e.g., the limbs of a tree or the parts of a character) in separate layers and save the object. Then bring the object into the Layout.

Now just make each layer's parent the layer that you want to be above it in the hierarchy (for example, select the Neck layer as the parent for the Head layer). Now you have a hierarchy. When you move any part in the hierarchy, it and all of its children will move together.

More advanced tools for animating hierarchies are bones and inverse kinematics. We will discuss them in class but they are not part of this assignment.

Morphing Objects

In order to morph one object to another in Lightwave, the two objects -- the source object and target object -- must have the same number of points. The order of the points in the two objects are important because the morph will map the points of first objects to the points of second objects using the sequence of points that is used to define the two objects. One easy way to ensure all this is to create a target object by deforming the source object in the Modeler. You can copy the layer to another layer and deform the copy. You can also make the morph target a separate object (which you may want to do if you are morphing multiple layers of your original object).

Back in Layout, load your object and its morph target (if the target is not a layer in the object). Select the object (or layer) that will be the morph target from the "Item" menu at the bottom of the screen. Click on the "Objects" tab at the top of the window. On the left side of the screen you will see a number of buttons, including "Unseen by Cam", "Unseen by Rays", "Self Shadow", "Cast Shadow", and "Receive Shadow". The first two options "Unseen by ..." will make the object disappear. The last three "... Shadow" will make sure the object has no affect on other objects in your scene. Since morphing works on the original object only, you want to make sure the target object(s) are not visible in the scene (they have to be in the scene in order to perform the morph, but you don't necessarily want to see the extra objects). To make the target object(s) disappear, turn on the "Unseen by ..." buttons, and turn off the "... Shadow" buttons.

Morph Target Settings (in the Rendering tab of the Item Properties panel)

Now select your original object (the one that will perform the morph) from the "Item" list, and click on the "Item Properties" button below the menu. In the "Item Properties" dialog, click on the "Deformations" tab. The first thing listed in the tab's panel is the Morph settings. Choose your target object or layer from the "Morph Target" menu. If the surfaces of the two objects are different, you can check the "Morph Surfaces" button to change the surface of one object into the other object as it morphs.

Morph Object Settings (in the Item Properties panel)

Use envelope to morph the first object to the second object. An envelope is like a graph editor for a single parameter. In fact, you edit the envelope in the same Graph Editor you use to adjust your keyframe settings. It allows you to vary the value of a parameter over time. In this case the parameter is the morph amount. To access the morph envelope controls, click on the button next to the Morph Amount field that is labeled with an "E". Envelopes are also used extensively in the Surface Editor.

Create a Keyframe at frame thirty (to create a one-second morph sequence) and adjust the value along the vertical axis to 100%. Then you can close the Graph Editor. At this point you may preview the animation using the playback controls at the bottom of the window. If you wish to vary the speed of the morph you can bring up the morph envelope window again and add additional keyframes along the spline.

Morph Envelope Settings

Complex morphs may require more than one target. Creating such a sequence is referred to as creating a morph chain. This chain should be set up so that object1 has target object2, object2 has target object3, etc. In this scenario, setting the morph amount to 100% will morph to the first target, 200% will morph to the second target and so on. You may create a chain of up to forty (maybe more) targets... Happy morphing!


This is the animation created by the morph envelope above. There is only one morph target here. The branch starts and ends with the original object. Between frames 43 and 47 (give or take a few), the branch is morphed fully into the target object (another branch, but with leaves that have been bent).

Envelopes can also be used to modify many other parameters like surface texture and lighting that can be accessed through image and surfaces panels on the top of the screen. These parameters will also have a button with an E on it next to them. We will not discuss these envelopes in this handout. You can, if you wish, explore these rendering-related envelopes as well. Remember Lightwave 3D manuals are on every computer in the lab.

If you ever decide you don't want an Enveloped value to change during the animation, you can open the Graph Editor for that value and set the values at frame 0 to the ones you want to use. Then delete all the other keyframes for that curve. You will always have to open the Graph Editor to change the value, but you do not have to keep it animated.

Saving Animated Images

Remember that different aspects of your 3D model and scene must be saved separately, including individual object, surfaces, scenes, motion paths, and the actual rendered images. The rendered images are stored in one file that includes all the images for the animation. Just as there are different formats for saving single images (.gif, .jpg, etc.), there are different formats for saving animations (.avi, .mpg, etc.) We are using .avi here. When giving the file name for saving the animation, you MUST have a suffix of .avi or .mov. Without the suffix, the file will not be saved!

Selecting a Resolution

It is best to render simple, small animations first, as they can take a long time. Rendering should be done only after the preview indicates that the motion is as you wish. Also, in terms of the final animation, it's important to consider the final application of your piece and the medium through which it will be viewed - will it be distributed on video tapes, broadcast on television, or viewed on a computer screen? If it is viewed on a computer screen, do you need full screen video or would you be willing to sacrifice some resolution for faster download times? If it is to be available over the internet, it would be wise to try and keep it small enough for acceptable download times.

The resolution settings can be accessed through the "Camera Properties" panel (select the Camera, then click on "Item Properties" at the bottom of the screen. There are several preset resolutions available in a pull-down menu. these include "VGA", "SVGA", "NTSC", "PAL", "HDTV" resolutions (to name a few). We recommend "VGA" resolution with a resolution multiplier of 50% (the menu just below will allow you to set the multiplier). Attempt others only if you can meet space and time requirements. You may define a custom resolution changing the Width or Height fields manually.

Rendering and Saving the 2D Animation

Now open the "Rendering Options" panel (from the "Rendering" menu in the top left). To get realistic rendering, make sure "Realistic" is selected in the "Render Mode". Then make sure "Ray Trace Shadows", "Ray Trace Reflection", and "Ray Trace Refraction" are also check marked. (You don't need these for initial tests, but you will for your final animation.) Also, turn off "Show Rendering In Progress", set the "Render Display" to none, and make sure "Auto Frame Advance" is checked. Setting these options will make sure the computer doesn't waste time showing you each frame as it creates the animation and that it will not ask you if it is okay to continue before going on to the next frame.

Click on the "Output Files" tab. Choose animation type to be "AVI" (the first "Type" menu is the animation type) You can also pick "QuickTime", if you are rendering on a Macintosh (this is the choice displayed below). Finally, click on save animation and save your 2D animation as filename.avi. Now choose "Render Scene" from the Render menu, or push the F10 key on the Keyboard. This will render your scene and save your animation. You can now view your animation using Windows Media Player or through QuickTime.

Render Settings Render Output Settings

Some Extra Info

A.1 Working With the Camera

LightWave provides you with a large number of camera options to affect the look and feel of your scenes, most of which can be accessed through the Camera Panel at the top of the screen. We have discussed some of these in class already.

We first discuss some camera movement terminology. Moving the camera in a forward/backward motion is called a truck. Moving the camera in a sideways motion is called a dolly. Panning is like turning your head to watch a car go by. Tilting is like looking at the ground or the sky. Boom shots are taken from high up, and are usually used to establish the setting at the beginning of a scene. (How many times have you watched a scene open with a shot from high above a neighborhood street and then zoom in closer to a house or a car driving down the street?) You can use these camera movements. There are also options that allow you to adjust the film size, and the properties of your camera lens, such as the Depth of Field, Focal Distance and F-Stop.

You can adjust the aspect ratio of the pixels.

Anti-aliasing may be used to avoid jagged edges, or to soften the edges of objects when you are composing multiple objects using a background image/texture map or performing blue screen overlays. Antialiasing produces great results, but tends to increase render times, so you may not want to turn it on until the final product is being generated. If you have turned on the Anti-aliasing option, it is also possible to add motion blur to objects in your scene that are moving very fast.

A more advanced technique some of you may want to play with involves composing video rendered from multiple camera angles. This is the effect you see while watching a car race on television and seeing a car disappear around a corner from behind, only to have it viewed head on as it comes out of the corner a split second later. In LightWave, you could do this by animating the camera to jump from one position to its new position around the corner. Another possibility would be to use Final Cut Pro (available on the Macintosh computers in the Social Science 1 computer lab) to composite any number of animations you create together. Final Cut Pro is a professional video editing program and has many more options for controlling how the movies are combined. If you're feeling ambitious and want to try this out, Mark might be able to help you out.

A.2 The Scene Editor

Clicking on the "Scene Editor" button (Top-Left) brings up the Scene Editor window. This window contains a list of all the objects and lights in your scene, as well as the camera. Child objects are listed below their parent object and are indented slightly. If you right-click with the mouse on an object's entry, you can "Clear" an object from the scene (as in, remove it... this does not delete the object's .lwo file, so you can put it back in later if you change your mind). You can also "Clone" an object. Like the modeler command, "Clone" lets you create multiple copies of an object. However, each copy is placed at the center of the world; there is no way to automatically distribute the objects as a part of the clone command. You can also access the "Object Properties" panel from here (this is the same panel you get if you select an object and click on "Item Properties" in the main window).


The menu above is accessible by clicking on an object with the right mouse button. The Light(s) and Camera(s) have similar menus.

The next column in allows you to change the display property of an object. For lights and cameras, you can turn their display off. This can be useful if having all the lines of the extra objects is making it hard for you to see your scene. You can also change how much detail is used when displaying an object. By default, the Layout tries to use texture mapped objects so you get the most information without needing to render the scene. However, as your objects get more complex, and as you add more objects to your scene, turning the realism down on the most complex objects can help reduce the amount of work Lightwave has to do to redraw the window as you interact with the scene.

At the top right of the window are two menus "Shift All Keys" and "Scale All Keys". Using "Shift All Keys", you can move the keyframes either earlier or later in the animation. The "Scale All Keys" menu allows you to make things happen faster or slower (take a different amount of time). You can use either of these commands on all of your objects, or just the selected ones.


In this image, notice the Light and Camera object have been given a Null object as a parent object. Also notice that there are small white + marks where each keyframe is for the Branch1 object's morph envelope. Clicking on the circled plus icon to the left of an entry's name will expand show each keyframe channel on a separate line.

A.3 Null Objects

In addition to the objects that you create in the Modeler, you can also create Null objects (or Nulls). Nulls are used for tracking, parenting (grouping), for certain inverse kinematic functions, and controlling many plug-in effects.

For example, say you want a flock of birds to follow a particular path. You could create a null object and animate it as a path. Then parent each bird, or instance of a bird, to the null object after placing them in an initial configuration to the null object. When then the null object is animated, all the birds will be also.


A sample Null Object

You can create Null objects by choosing "Add Null Object" from the "Add" pop-up menu on the left side of the screen when the "Items" tab at the top is selected.

Questions? E-mail Mark Slater or Jane Wilhelms.