Accessibility
 
Home > Products > Director > Support > Basics of Director 3D
Macromedia Director Support Center - Basics of Director 3D
Animation and model setup

Shockwave 3D is designed to accommodate both simple and highly detailed models and animation. The simplest case is to animate separate rigid-body objects independently of each other by keyframing the changes in their position, rotation, or scale. This requires no setup. However, you should check for streaming issues—for example, the order in which objects or textures stream into the scene.

Note: The Shockwave 3D exporter does not support soft-body or non-bone-based mesh deformations. You cannot animate the bend of a bird's wing without using a bones system; you cannot use the conventional morphing techniques in most 3D packages to perform lip-synching. But you can perform facial animation in Shockwave 3D and drive the poses with Lingo (see Using Lingo bones).

 
Streaming 3D content
In 3D Studio Max, you can set streaming properties by selecting an object, right-clicking to choose Properties/User Defined Properties, and entering the text value of the property and its numeric value. All properties begin with sw3d_ , which is a reserved string in Lingo.

Here is the complete list of text properties:

sw3d_stream_priority
sw3d_texture_stream_priority
sw3d_no_lod
sw3d_visibility
sw3d_lod_adjust_normals
sw3d_lod_minimum_crease_angle
sw3d_lod_max_normal_error

 
Using animation hierarchies
A more complex animation technique is to set up a linked hierarchy of objects, where the parent and child objects are each animated. Shockwave 3D normally collapses such hierarchies as part of its compression, resulting in only the parent object's animation exporting, and no motion for the child objects. For example, if you have an animation of a cellular phone flipping open and rotating toward the camera, the body would rotate, but the lid would not open. As a workaround, group each object separately, link the objects into the hierarchy, and animate the groups in the chain. This will export correctly.

 
Performing character animation
You can best achieve character mesh deformation using a skeleton or bones-driven hierarchy, as opposed to other deformations in which vertices are moved by modifier or other method. Shockwave 3D supports animation using bones, as well as static deformations from other 3D tools. To animate a character walking, you attach the character mesh to the bones system and animate the bones movements, setting keyframes for each pose. The character mesh can be in one piece or in segments.

In 3D Studio Max, the skeleton either can be built in a hierarchy that uses Max bones, or it can be a Character Studio biped. It cannot be a skeleton comprising both. The biped and bones system each have a root node in Shockwave 3D, so if you append bones to a biped, you will have more than one root node, resulting in the loss of animation on one of them. As a workaround, build the systems separately and export them in the same file; they can be joined later by the Lingo programmer.

 
Using the Character Studio plug-in
If want to take advantage of the character animation capabilities of Shockwave 3D and you're working in 3D Studio Max, you'll need the Character Studio plug-in. Physique is the only modifier available to bind the mesh to a Max bones or biped system. A Character Studio biped is the only way to load skeletal motion capture data onto a character. These motion files can be in the biped (BIP) file format, the Character Studio Motion (CSM) format, or the Biovision (BVH) format, all of which are available from many sources and can be output from other modelers. An example is Credo Interactive's Life Forms, a low-cost cross-platform tool for developing virtual choreography exportable to Character Studio. If you're working in another 3D package that exports to Shockwave 3D, arrange your workflow to accommodate third-party motion capture data.

When you work with Character Studio, be careful with the reference pose. When you perform character setup, the biped is normally in reference mode—you pose the character mesh with arms out and legs apart, scale the biped to fit the mesh, and apply physique to bind the mesh to the biped. To animate the character and check the physique settings, you leave reference mode and animate the character. Be sure to position the reference pose and start of the animation close together; otherwise, you might not see the animation in the Preview window at export time.

 
Using kinematics
Bones systems and skeletal systems feature forward kinematics and inverse kinematics. In forward kinematics (FK), moving the parent moves the children in the hierarchy, while the children move independently; in inverse kinematics (IK), the child at the end of the chain moves the parent elements. However, FK and IK data is stripped from the system during export, leaving the positional and rotational bones keyframes to be imported into Director. This should not pose a problem for the 3D artist, since the purpose of FK and IK is to move the character from pose to pose, setting keyframes at each pose. For example, you'd use FK for rotational motions, such as rotating the upper arm at the shoulder to make an arm swing; you'd use IK for other poses, such as placing the character's hand in his pocket. In either event, you're setting keyframes along the timeline for each new pose.

If you want the mesh to deform according to skeletal movements and you're working in 3D Studio Max, you must bind it to the skeleton with Character Studio's physique modifier. (The 3D Studio Max skin modifier isn't supported.) Characters made from a single mesh often look the same as a version made from multiple mesh segments. Typically you'll build in an elbow pad, collar, shoulder pad, and so on, to hide the intersections of the pieces. When applying the physique modifier, select all pieces at once. Segmented and single mesh characters should deform with the same results when you use the physique modifier.

If your mesh is in segments (different pieces for the upper arm, forearm, head, and so on) and you don't require the mesh to deform, you can use 3D Studio Max's linking tool to attach the mesh to the skeleton. This is preferable in some cases, as with robot characters. The joints don't deform, and the pieces appear to fit together. Some prefer this technique to using the physique modifier in its rigid mode.

Note: In deciding whether to build a character as a single mesh or in segments, consider the character's intended use. If your character will experience collisions, you should anticipate the size of the bounding boxes of the models involved in the collisions. A single mesh character will generate a single bounding box; a segmented character will generate multiple envelopes, slowing performance.

 
Building characters efficiently
You can speed model production by creating a template character, copying it, then deforming and retexturing the copy to make a new character. Make sure the copy is a copy, not a reference. A copy carries with it all attributes of the original—modeling, texturing, animation—up to the copy event, but thereafter is independent of the original. With an instance, future changes to one updates the other instances of the model; with a reference, changes to the original update the reference, but not vice versa. You will experience problems in Shockwave 3D if your characters are not real copies.

It's common practice to make characters independent of their environment or other objects in the scene, assembling them at the end of the process. If you discover disparities of scale, be careful how you proceed. If the character is bound to a skeleton, take the elements apart, scale them separately, and reskin the skeleton. The rescaling should be done at the geometric level and not as a scale transform in world space. That is, if you have an object 10 units in diameter, scale the vertices instead of the object as a whole; in 3D Studio Max, this means scaling at the sub-object level or applying an XForm modifier to the object. Otherwise, an object with a diameter of 10 scaled tenfold is interpreted as an object with a diameter of 10, not a diameter of 100.

 
Using Lingo bones
Using Lingo bones is a good way to take advantage of a 3D package's bones system in facial animation. Using this approach—unlike the animation techniques above—the 3D artist models the mesh, builds a bone system, binds them together, and exports. The Lingo programmer creates the poses by manipulating the bones, recording the changes (deltas) in position and rotation as Lingo list objects, and saving each result. (The bones are accessible through their model resources.) The facial poses are likely to be common phonemes (vowel and consonant sounds) as well as some emotion-driven expressions. The advantage of this is that each pose can be expressed in a dozen or so lines of code, which in turn can be tied to an external input source such as a speech-recognition program.

 
Combining motions
It's important to keep the following points in mind when combining motions:

Multiple objects can be linked or joined together in Director, and then animated.
Director provides an animatable mesh deformation modifier.
Multiple textures can be blended in Director.
Multiple motions can exported and mapped onto a single character. There are two techniques for this: making a single timeline containing multiple moves, and exporting multiple motion files to be mapped onto an object. The first is preferable.

Suppose you have a walk cycle occupying frames 0-21, a run from frames 22-30, and a fall at frames 31-50. The Lingo artist can sample and loop each segment at the desired intervals and/or set up interactive triggering events, and the Bones player modifier in Shockwave 3D will blend between the different motion segments. Alternatively, you can export only the animation data as one or more separate W3D files. The caveat is that underlying skeletons or bones systems have identical bone compositions and names. In 3D Studio Max, for example, this can be tricky. If you clone or copy a biped or bones skeleton, Max will give distinct names to the copy. You can get around this by selecting the skeleton, grouping it, opening the group, and giving the copy of the bones/skeleton the same name as the original. For convenience, give each group a name to match the motion—for example, "Walk," "Run," "Fall," and so on.

 
Using physics
Shockwave 3D supports certain kinds of animation driven by rigid-body dynamics: you can have an object held to the ground by gravity and use collision detection to prevent the object from falling through the ground. These physics capabilities are provided by a third-party Xtra for Director and Shockwave 3D from Havok. If your 3D modeler contains rigid-body dynamics, check your exporter documentation to determine whether it's supported in Shockwave 3D.

For example, in 3D Studio Max, gravity and collision are applied through "space warps," which do not export to Shockwave 3D. The dynamics features in Max will export—not because of physics, but because the simulation is written to keyframes like other animation, which does export. However, Havok makes a physics modifier for Max, and Max simulations developed with the Havok rigid-body modifier export by producing a W3D file and a companion HKE file.

To Table of Contents Back to Previous document Forward to next document