This week we will look at animation controls within 3ds max and the Track View, which is a graphical way of viewing and editing the animation in a scene (as it may not be visible in the viewport).

Click screenshot to launch QuickTime video
To demonstrate the uses of the Track View we will make a spring that bounces up and down. The aim of this exercise is not to create a lot of animation (it is just a single bounce), but instead to create some expressive animation. Quality is always more important than quantity when it comes to computer graphics.

In the top viewport create a Helix shape. The helix can be found under Shapes, and is a primitive in the shape of a spring. Because it is a shape rather than geometry (it's just a line), it won't render by default.

Instead of turning it into geometry we can simply click the checkbox "Renderable" under the Rendering parameters rollout. You can also tick the "Display Render Mesh" to see the mesh it generates in your viewport (rather than just lines).
To get the shape of a spring increase the Turns spinner to about 10 or 15, and adjust the bias so there are more turns near the bottom of the spring.
Now, to animate this bouncing we will animate the spring moving up and down, but also changing the parameters of the Helix to make it stretch up and down (particularly the Height and Bias values).
As mentioned in Week 1, we usually use keyframe animation in 3ds max, which is where we set keys for values at different times, and 3ds max interpolates between these values over time. So, to make our spring move up and down we can simply create a key of the spring sitting on the ground at frame 0, then create a key of it up in the air at frame 20, then another key of it on the ground at frame 40. 3ds max will then automatically interpolate all the in-between frames, giving a smooth animation of the spring moving up and down.
To create keys in 3ds max we simply turn on the Auto Key button (down underneath the time slider), then whenever we change a value 3ds max will create a key at the current frame. So, remember to change to the correct frame before you change values.

Click the Auto Key button on, move to frame 20, and move the spring up in the Perspective viewport. Notice that the keys appear in the timeline under the time slider, and that one has automatically been created at frame 0. If you use Auto Key and there are no keys already on the property being changed, it will create a key with the existing values at frame 0.

Now if you scrub the time slider you will see the spring moving up from frames 0 to 20. To make it back on the ground at frame 40 we can simply move the time slider to frame 40, then in the viewport move the spring back down. Of course, doing it this way will not necessarily move the spring to exactly the point it was before. To make sure that the key at frame 40 is exactly the same as the one at frame 0, we can simply copy the frame 0 key to frame 40.
Click on the key at frame 0 to select it (it will go white). Now, hold down the Shift key and drag it to frame 40. Holding the shift key will clone the keyframe, just like it clones geometry. You will not be asked about the clone options (copy, instance etc), since keyframes are always independent of each other.

Shift-drag the key at frame 0 to frame 40
Now play your animation, and see that the spring bounces up and down between frames 0 and 40. You may notice that the interpolated movement is not linear, the spring eases into and out of each key (so it accelerates upwards, then slows down, then accelerates falling, then slows to stopped). This is because of the default interpolation in 3ds max (which has this easing), and this is where the Track View comes in. While it is possible to change this interpolation type by right clicking on the keys in the time line you don't have much control, which is what you do get in the Track View.
From the Graph Editors menu select "Track View - Curve Editor", or hit the icon on the main toolbar (it looks like a little spreadsheet).


You will be presented with the Track View window (in Curve Editor mode). By default it will be highlighting the currently selected object, so if you make sure your Helix is selected in your viewport, you should see something like the following screenshot.
The Track View has two panes. In the left are all the properties of your scene (objects, materials, lights etc), and in the right pane the animation curves for the selected objects are shown. In the above screenshot the X, Y and Z position of the Helix is selected, and in the right pane the animation curves for these three properties are shown. The curves are colour coordinated (Red, Green, Blue for X, Y, Z), but you can't see the X as it is behind the Y (neither move from 0). The Z axis shows the up and down movement of the spring, moving from 0 at frame 0 to around 45 at frame 20, then back to 0 at frame 40.
If you select just the Z Position in the left pane (to hide the other curves), and grab the keyframe at the top of the peak (frame 20), you will see that it has a bezier handle. Move it around to see how it changes the curve, and play your animation to see the result on the spring bouncing.

This animation has the same keys, but gives very different interpolation
Whenever you select a key it will display the two properties of the key (its frame and its value) at the bottom of the Track View window. You can type values into these fields to set specific values.
While the default key type has bezier handles, you can change how each key interpolates by selecting the key, then right clicking on it. You will be presented with the following dialog.
![]()
If you click on either of the In or Out panels (currently showing bezier handles), you can select from all available options:
Which are (from top). Smooth, Linear, Stepped, Slow, Fast, Bezier, and Flat. Basically they act as their thumbnails display, important ones being Linear (a straight line between keyframes) and Stepped (no interpolation between keyframes), and of course Bezier.

The Track View actually has two modes, Curve Editor and Dope Sheet. The Curve Editor is what we've been looking at, where it shows the interpolation curves for any existing animation. In Dope Sheet mode the Track View just shows black bars to indicate where animation is, making it easier to line up animation points and to rescale animation. To look at Dope Sheet mode you can just select Dope Sheet from the Modes menu.
Because there is only one object with animation in our scene, you can only see one black bar. You can drag the ends of this bar to rescale the animation, or you can grab it in the middle to offset the animation. In Dope Sheet mode you can't see the values of keys or change interpolation.

Now that we've looked at how the Track View can be used to display information about the animation in our scene, we'll go back and animate the spring to give it some life. To get this effect, we want the spring to have some anticipation to its jump, and we want the spring to react as though it is springy - instead of just moving up and down it needs to stretch and squash.
Because we don't really need the bounce that is already on our spring, we'll go ahead and delete the existing animation. To do this, select your Helix object, and marquee select all of the keys visible in the time line. Then you can either hit the delete key, or right click on one of the selected keys and select "Delete Selected Keys" from the menu. Be aware that when you delete all keys the object will remain where it is on the current frame, it will not reset to say frame 0.
You can also delete keys through the Track View. In Curve Editor mode, select keys in the right hand pane and hit the delete key.
If your Helix is not already, centre it to the world. You can do this by selecting the Move tool, then in the Transform TypeIn area below the timeline either type 0 in each box, or just right-click on the spinners for each box. You can zero any value in 3ds max by right-clicking on its spinner.
The motion we want for the spring is to have a little bounce at the start (like a warmup), then to squish down tight, release and jump into the air, then to fall back to the ground, like the animation below.
There are three discrete parts to this motion. Firstly there is the spring actually moving up and down, which happens between approximately frames 60 and 80 (out of 100 frames total). Secondly there is the Height of the Helix, which does vary a lot. Thirdly there is the Bias of the spring, to make the centre coils seem to move independently of the whole spring.

Right Click on the Time Slider
Firstly we'll do the actual translation (movement) of the Helix. We want it sitting still at frame 60 and frame 80, and up in the air at frame 70. We could do this by putting the Auto Key button on, moving the Time Slider to Frame 60 and moving the Helix ever so slightly (with Auto Key this will make a keyframe). Instead, just right click on the Time Slider itself (it doesn't matter what frame the Time Slider is on).
You will be presented with a Create Key dialog box. Note that you do not have to have the Auto Key or Set Key buttons on, but you do have to have an object selected.
This dialog will allow you to create a Transform key on the currently selected object, and you have the control to set keys from any frame to any frame. In our case the Helix has no animation, so the source time does not matter (the values will be the same from any frame). For the Destination time we want frame 60, so put that in and hit OK. We really only need a key on the Position of the Helix, but it won't matter if it's also on the Rotation and Scale.
Once you hit OK, right click on the time slider to bring up the same dialog again. This time put 80 as the Destination frame and hit OK. Now you have created keys for the Helix sitting still at frames 60 and 80. This method of creating keyframes can be very useful if you have some existing animation, and want to insert a key with values from another frame (when those other values may just be interpolated, so there is not already a key to just copy). The downside is that you can only set keys for Transformation, being Position, Rotation and Scale.
To make the key at frame 70 of the Helix up in the air we need to do the usual way, so turn on the Auto Key button, move the time slider to frame 70, and move the Helix up. I moved the Helix up so it jumps about as high as the Helix is tall (approximately 100 units), but feel free to use whatever size suits you.
The default motion does not suggest that there is gravity in our scene, so load up the Track View in Curve Editor mode (Graph Editors menu, Track View Curve Editor). With your Helix selected it should automatically display the keyed Transform channels, if not then simply navigate to them in the left hand panel and select them (particularly Z Position).

In the right hand panel you should see the curve of the Helix moving up and down, with the three keys at frames 60, 70 and 80.

Don't forget you can change your view of the curves by using the view tools at the bottom of the Track View window. Use the Zoom Region tool to marquee zoom onto the bits that we need to work on, the actual movement. Also, isolate just the Z Position channel in the left hand pane; we don't care about the keys on the other channels.
Firstly we want to change the keys at frames 60 and 80, as there is easing on both of them. In reality there is a sharp push up by the spring, and an equally sharp landing due to gravity. Select one of these keys, and change the In and Out Tangents to Linear.
Instead of selecting the other key and right clicking on it, you can just use the left and right arrows in the Key Info dialog box to navigate between the available keyframes. Change both keys at frames 60 and 80 to have Linear Tangents.
You should end up with a curve looking like this screenshot.
Now that we have the movement of the Helix, we want to work with the Height. Study the animation earlier in the tutorial to see how the height needs to change on the Helix.
We'll start at the beginning. Over the first 20 frames it changes from normal height to a bit shorter and back to normal height. Put the Auto Key button on, move the time slider to frame 10, and bring the Height property of the Helix down to about 2/3 of it's original value. You will have to go into the Modify panel to find the Height property.

The highlighting of the Height spinner shows there is a key on this frame.
Move the time slider to frame 20 and bring this height back up. It doesn't have to be exactly the same as the original value, just approximately.
From frames 20 to 55 the Helix needs to squish right down. To make it look like the spring is under a lot of tension when it's really tight we want it to get quite small fairly quickly, then get just a little smaller over the remaining frames.
At frame 30 bring the Helix Height down to around 1/2 its original height, then at frame 55 bring it to about 1/3 the original height.

If you look in the Track View and highlight the Height channel of the Helix, you should see a curve similar to below.

The default Tangent types of Bezier are fine for this curve, as we want it nice and smooth.
Now for the stretching as the spring makes its jump. The important thing about this is that it extends quickly (before it leaves the ground), and for the top of its arc the top of the spring stays almost level.
At frame 62 (just after the spring has left the ground), increase the Height of the Helix to its original height. Remember to have Auto Key still on, or you will be offsetting all of the existing animation rather than making a new key. At frame 70 (the top of the arc), decrease this Height to around 2/3 of the original height.
Now, as the spring falls back to the ground it will stretch out again. At frame 80 (just as it touches the ground again) put the Height to around 80% of the original height. We put this keyframe on frame 80 as immediately after this frame the shock of hitting the ground would occur, and the spring would compress again.
At frame 83 bring the Height to around 50% of the original height, to account for the compression of landing. The spring will recover from this, but slowly, so at frame 100 put a keyframe with the Height back to the original value. The good thing about the height ending at the same value as it starts is that our animation will loop seemlessly.
This screenshot shows the final keys and values used for the Height of the Helix.
Play your animation back. You may decide to adjust the values and frames of your keys to give a more personalised result.
There is one last element to the spring jumping motion, and that is to animate the Helix Bias value to change where the spring is bunched, to make it look like the spring can stretch other than by changing its height. This value will indicate the change in velocity of the spring, so while on the ground it will be bunched near the bottom, as it will while it makes the jump. At the top of its arc it will be bunched near the top, and as it squishes after landing it will bunch at the bottom again.
So, the default value of about -0.12 will be fine from frames 0 to 60, so with Auto Key on go to frame 60, then change the bias and bring it back to -0.12, just to create a key (click the spinner down arrow, then up arrow). You will see the spinner get a red outline to indicate it has a key at this frame. A key will also appear in the time line, except that as there is already a key there you won't see it appear.
The Bias has a key on this frame
Move the time slider to frame 70, and change the Bias value to 0.1 (positive), so that the spring is bunched at the top.
At frame 80 put the bias value to -0.03 (slightly bunched near the bottom), then at frame 83 put the Bias back to the original value of -0.12. This way it will loop seemlessly with the start of the animation.

The Track View curve for the Bias value
Now we're basically finished with animating the spring. To give the spring even more character you can add a Bend modifier, and animate it randomly bouncing around a little (as a spring would do), particularly after it has landed. Also, you could make it wiggle back and forth fairly erratically (but only a small effect) when it is crouching for the jump, to show the built up tension.
Since rendering just a green helix with looks quite boring, we'll quickly put some materials and lights in. Firstly, we need a floor, so in your top viewport zoom out and create a Plane (Standard Primitives), make it really big and centred around your helix. Looking down on your helix in the Perspective view you shouldn't be able to see the edges of this plane.

Big square plane, little helix.
Now, load up the Material Editor. Instead of creating our own materials, we can simply grab some that come pre-made with 3ds max. Select one of the empty material thumbnails, and hit the Get Material icon (first from the left under the thumbnails).

From the resulting Material/Map Browser window, select "Material Library" from the Browse From radio buttons, and choose "Metal_Chrome".

Select your Helix, and hit the Assign Material To Selection button to apply the material.


In the next material thumbnail, again hit the Get Material icon. This time we want to change what Material Library we are looking in, so down the bottom left side of the Material/Map Browser hit the Open button. Browse to the 3dsmax/Matlibs folder, and choose "architectural.materials.finishes.mat". These Architectural material libraries ship with 3ds max 6, and contain a huge amount of materials for use in architecture.
Now choose one of the Flooring materials, I have used Finishes.Flooring.Tile.Square.Terra Cotta, but feel free to choose any that take your fancy. Apply this material to the plane you just created for a floor.
If you render your scene (just a single frame) at this stage, it doesn't look very appealing.
First of all, the material on the floor is far too large, it needs to be tiled. Apply a UVW Map modifier to the Plane, and increase the U Tile and V Tile properties to something around 10 (experiment to see what size looks good).
This is better, but we definitely need some lights.

In 3ds max there are a few different types of lights, which are available from the Create panel, then the Lights icon. There are three "standard" lights, spotlights, directional lights, and omni lights.
Spotlights are lights that originate from a single point, and have a cone of illumination extending in a particular direction. A Target spotlight has a controller for where it points (a little aim-point that can be moved around), while a Free spotlight doesn't have an aimpoint, and must be rotated to face a particular direction.
Directional lights don't originate from a point, they originate from a flat area, and casts parallel light rays (there is no cone). Directional lights are primarily used to simulate sunlight, where due to the massive distance between the earth and the sun all light seems to strike the earth from the same angle. Directional lights can also be Target or Free.
Omni lights also originate from a single point, but they emit light equally in every direction, you cannot (and need not) aim an omni light. Omni lights are also known as point lights.
Don't worry about Skylights, or the Mental Ray Area Omni and Mental Ray Area Spot lights, these all require advanced rendering techniques and will not be used in this subject.
To render still models you will often use a method of lighting known as three-point lighting, which is where you use three lights to give good definition to the detail in your models. There is a great tutorial on three-point lighting available at http://www.3drender.com/light/3point.html. This setup is similar to what you would use in a video production, where we have a key light (that provides most of the light colour and has distinct shadows), a fill light (that lightens up the shadows from the key, and gives the impression of ambient lighting), and a back light (that separates our main objects from the background).

To create your key light, create a Target Spot light in the Top viewport, with the target ending about on your objects. In a side viewport move the spotlight up so that it is shining down on the spring.

Give this light a slight yellow tint, by adjusting the colour picker next to the Multiplier value in the light's properties (Modify panel). You should use the colour only to change the colour of the light, not the intensity. Use the Multiplier value to change the intensity of the light, and since we want fairly soft light in the scene lower this key light's Multiplier value to 0.8.
We want this light to cast shadows, so we have to tick Shadows on. By default lights in 3ds max will give direct illumination (surfaces that are within the light's cone), but they will not cast shadows due to objects obscuring the light. This can be useful to simulate ambient lighting, but should be used sparingly as it is an impossible effect. There are a few methods of rendering shadows, and you can use a different method for each light if you wish. The two important shadow methods are Ray Traced and Shadow Map.
Ray Traced shadows will trace rays through the scene when rendering to find exactly what pixels are illuminated and which are in shadow, so ray traced shadows will give a very accurate and sharp-edged shadow, at the expense of additional render time. Ray traced shadows will also work correctly for transparent (or partially transparent) objects
Shadow Map shadows generate a black and white bitmap image for each light, determining what objects are in and out of shadow. Because this is a raster image it can have resolution issues, which is actually the good and bad thing about shadow maps. The light's shadow parameters let you change both the shadow map resolution, and the blur factor used on this final shadow map. This means you can get soft edged shadows (due to the blurring), but it also means you can have horrible pixelation from low resolution shadow maps. Make sure you test render the shadows from each shadow map light to see the resolution is appropriate. Shadow maps render the fastest, but also use the most memory.
All the shadow parameters can be set in the two rollouts at the bottom of the light parameters, under "Shadow Parameters" and the shadow type specific parameters rollout.
You can read about the other shadow types in the 3ds max help under "General Lighting Parameters".
For our key light we want to reduce the shadow density so that the shadows from this light won't be a solid black. When we add other lights into the scene the shadows would be no longer black anyway (unless the two lights' shadows overlapped), but we do want soft light with soft shadows. Go down to the Shadow Parameters rollout in the light properties, and change the Shadow density to 0.8

Next we have to put a Fill light in, so there is illumination on the spring from more than one angle. The fill light should be another Target Spot, approximately 90 degrees from the key light (when looking from above) on the other side of our viewpoint (from the left), and lower to the ground. This is to give the impression of secondary light bouncing around the rest of our scene, so should not be very bright.

Make the colour of this spotlight white, and reduce the multiplier to 0.3.
Since this is such a simple scene this lighting will be sufficient.
There are a couple more attributes for lights that can be very useful, but are not needed in this exercise. One important thing is light decay, or attenuation. In the real world all light decays at an inverse square rate, that is twice the distance from a light you will be receiving a quarter of the light energy. This is the same for any three dimensional radiance (including audio), and is just due to the ratio of surface area on a sphere (as radiating energy expands in a spherical shape), let alone any further decay due to the matter the light is passing through. In computer graphics lights do not automatically decay, in fact all of the lights we have used so far are just as bright no matter how far they are from an object.


If you need a light to diminish over distance, you can either apply a Decay (of inverse or inverse square), or you can use Attenuation. Attenuation is a way of controlling how light fades in or out the further it is from the light source. The Near attenuation start and end is used to set a fade into full brightness, and the Far attenuation start and end is used to set a fade out to nothing

In the Spotlight Parameters you can change the cone angle of the light, the falloff beyond the cone angle, and whether the light is emitted in a circle or rectangle shape
The cone angle determines the angle in degrees that direct light is emitted (which will be the full brightness as specified above), while the Falloff angle is used to determine where the edge of all illumination from the light is. If these two values are the same there will be a very sharp edge to the light, one point will be fully illuminated and the next will be pitch black.

Left: a 20 degree falloff. Right: a 2 degree falloff