FAQ

Questions

Q1. Why can't I see anything when I load navigate.sc in MOAN?

Q2. How do I reflect an object (e.g to make a right arm from a left one) in MOAN?

Q3. When I use scale transformations, weird things happen. Any hints?

Q4. Cubic interpolation has the undesirable effect of making the figure stop at each keyframe. Is there a way around this?

Q5. I try to animate joint rotations and I get weird results. What am I doing wrong?


Answers

Q1. Why can't I see anything when I load navigate.sc in MOAN?

Because navigate.sc has no primitives: its goal is not to define a visible scene; rather, it's to teach you scene tree navigation. See the MOAN documentation on scene navigation for more information, including a diagram of the scene tree for navigate.sc.

Q2. How do I reflect an object (e.g to make a right arm from a left one) in MOAN?

You edit the scene file. You may only modify one property of a scene from within MOAN: keyframes of joint transformations. Nothing else.

When you cut-and-paste a body part in your scene file, make sure you do so only after the body part is completely designed, and right before you begin animation (during which, most probably, you will animate differently the right and left copies). If you plan to make further edits in the design, you would have to maintain two copies in sync if you replicated the part first.


Q3. When I use scale transformations, weird things happen. Any hints?

Yes. Uniform scales are (mostly) benigh. But non-uniform scales, such as those turning spheres into ellipsoids are not: if they precede rotations, they will give very unexpected results. See the OpenGL Programming Guide, pages 78-9 , for details. The moral of the story: use groups to "encapsulate" non-uniform scales so that they only affect the shape of a primitive and nothing else in the scene tree.

As concerns lighting, scales, whether uniform or not, may have strange effects, as they change the length of unit normals, which are the key elements of all lighting calculations. Enabling GL_NORMALIZE asks OpenGL to re-normalize the length of normals prior to making the lighting calculations. However, if a scale transformation has managed to turn a unit normal into a zero (or near zero, due to floating point errors) vector, GL_NORMALIZE does not help: this happens only when a scale is degenerate (or nearly so), i.e. fully "squashing" one dimension, such as when it turns a cone into a disc. Avoid such scales! Can you see now why MOAN offers a separate disc primitive?


Q4. Cubic interpolation has the undesirable effect of making the figure stop at each keyframe. Is there a way around this?

None besides linear interpolation. Your model will momentarily stop, indeed, and this is undesirable. But it's the price to pay for using a cubic interpolation method that

Q5. I try to animate joint rotations and I get weird results. What am I doing wrong?

Joint rotations are tricky: the safest way to use them is to keep the axis constant and unchanging for all the frames of your animation; let only the angle vary.

This means that if a joint has two or three degrees of freedom in its orientation, then you need to use two or three rotations (each about a constant, different axis, such as the coordinate axes). Thus, you are wasting space, since in theory, an arbitrary orientation can be represented by a single rotation. However, specifying the orientation of a joint using the four parameters of a single joint rotation is much harder than using the three angles of three successive rotations; so, what you lose in efficiency you gain in user-friendliness.

If you decide to animate the rotation axis, bear in mind that you risk making it (0,0,0): this is illegal (see glRotate*()) and produces totally unexpected, ill-defined warps of your scene.


© 2003 Apostolos Lerios