| Taelon's gmax Tutorials Tutorial 6 Animation and Projected Shadows, Part One. ![]()
|
Animation & Projected Shadows, Part One gmax lacks rendering capabilities beyond what is shown in the Viewports, simply because it's intended use is for creating models for game pack supported games which can then be rendered using the in-game engine. However, sometimes we just want to model something for fun, or to show friends and family, post on a webpage, etc. But without a built-in renderer to project shadows, objects in our scenes can often look as if they are floating. Shadows help to "ground" an object and make the scene look more realistic. Tutorial 4 shows a way to create fake viewport shadows using Vertex Colors, this tutorial will demonstrate an entirely different technique. Here we will create a simple shadow map mask in a paint program, then create an animation for an object and it's shadow to demonstrate that realistic animated shadows aren't beyond the reach of the gmax viewport. Then in Part 2, we will expand the scene by adding constraints and controllers which opens the door to a near infinite number of possibilities for viewport scene animation.
|
|
| Step 1) Create the Shadow Map First we need to create our fake shadow. Probably the easiest way to do this is to create a mask that will be transparent everywhere except where we want the shadow to be, and opaque where we need the shadow. Since gmax allows us to use a separate "Opacity Map" when creating a Material there are a number ways we could create the mask. Some image file formats even support internal alpha channels, but to keep this easy and to show you a method that anyone with access to a simple paint program can use, we will create a separate image to use as the mask as the "Opacity Map" in gmax.
Step 2) Create a Sphere Start gmax or select "File" > "Reset" to start a new scene.
|
![]()
![]() |
| (Note: Creating New Materials and Assigning Maps was
illustrated in greater detail in Tutorials 1 and 4.) Step 4) Create the Ball Material
Step 5) Create the Plane Material
|
![]() |
| Using the Opacity Map as a Shadow Map To understand what you're seeing, click on the Diffuse Color swatch and adjust the color. The color of the shadow will change as you make adjustments, this corresponds to the White (Opaque area) of the "Opacity Map". However since the Black area of the opacity map applies a full transparency to the material it doesn't matter what color we assign to the Diffuse color slot, those areas will remain transparent. Return the diffuse color to Black or near Black since this is going to represent the Shadow of our ball, and close the Material Editor. |
![]() |
| Animation Basics Nearly anything you can create in gmax can be animated. Objects, sub-objects, modifiers, lights, cameras, material map coordinates, etc. can all be manipulated and animated. Step 6) Time Configuration
The blue bars represent our "Key Frames" and are required any time we want to significantly alter a transform (direction, rotation, scale, etc.) in the animation. We don't need to animate every single frame like traditional hand-drawn animation was done, instead we designate key frames and the movement between them is automatically calculated and generated by the software. Step 8) Copy Key frame 0
|
![]() ![]() ![]() ![]() ![]() |
Step 9) The Track View Window
|
![]() |
Step 9) The Track View Window (cont.)
![]() |
|
| Step 9) The Track View Window (cont.) In the "Parameter Curve Out-of-Range Types" window
To verify it, press the "Play" button and watch the ball, it should bounce 8 times before the time slider returns to 0 to repeat. |
![]() |
| Step 10) Animate the Opacity Map Now that we have the animation of a bouncing ball we'll animate the fake shadow map. In this case we will assume that the scene is set outdoors around noon, or in a large room with a bright overhead light. The main points to consider when faking a shadow are the direction, distance and intensity of the light source in relation to the object and the direction and distance to the surface where the shadow is being projected.
You should see that the opaque (white) area of the opacity map is now very small, this corresponds to a small shadow in our display when the ball is at the top of it's bounce (the furthest point from the "floor" where the shadow is projected).
|
![]() |
Step 11) Loop it
You could easily expand this technique by simply taking a screen capture of any model, then in a paint program use White to paint over the model, and use Black to fill-in the background. Apply the image to a plane in the Opacity Map Channel as we did above and Voila! you have a "fake projected shadow" for anything that you can model. Think of the possibilities, and don't be afraid to experiment! |
![]() |
| Step 12) Dummy Helper
A Dummy helper object is a wireframe cube with a pivot point at its geometric center. It has a name but no parameters, you can't modify it. Its only real feature is its pivot, used as a center for transforms. A dummy is most often used to animate the motion of linked objects, lights and cameras in a scene.
|
![]() |
| Step 13) Align the Dummy Aligning one object to another is often required when modeling, and is critical to properly apply transformations across a hierarchy during animation. Although it's possible to align objects manually, it's far easier and more accurate to use the built-in "Align" tool.
|
![]() |
| Step 14) Linking Links are used to build a hierarchy of a parent and one or more child objects. Once objects are linked, any transformations applied to the parent are also applied to its children. Here we will link both the ball and it's shadow to the dummy, then animate the dummy's position. The ball and shadow will then play their animations independently as they follow the dummy in the scene.
|
![]() |
| Step 15) Test the Animation
Create a simple animation to see it in action.
Feel free to experiment with the animation of the Dummy, but DO NOT save your scene over the "ball_bounce01" file. We will be using the "ball_bounce01" scene saved in Step 14 in part two of the tutorial. This concludes Part 1 of this tutorial. In Part Two, we will use an Array to create a spiral staircase, then add a helix shape and use a path constraint to move the bouncing ball along the helix to animate the ball bouncing down the stairs. |
![]() This is a screencap of frame 19 of this animation tutorial. |
If you find any errors or have difficulty following this tutorial, please post in the forum or contact me at the Email address below. Thanks! |
|
|
|
| top of page |
|
Tutorial created on 8-Aug-2003