View Full Version : Need a tip or two on MAX 7.5 animation


alchemist
Oct 20, 2007, 06:10 AM
Hi All!

I am working on my first unit mod for BTS. I am making a civ and I allready have a unique building, which was simple enough with the excellent tutorials I found here in the forum. I have created a nice model gunpowder unit (by tweaking the Roman Praetorian model) and now I'm working on the animation, which leads to some headaches for me.

Since I based my unit on the Roman Praetorian model that comes with the "Getting your units in Civ 4" tutorial, I am also reusing the exect same rig.
I mainly have two problems:
1) What is the proper way of moving the entire character around?
For some movements I have to move the entire character vertically. The Run movement is a good example, where one has to have a "bobbing" motion up and down to create a believable run loop. Die is another example where you want to simply push the entire character to the ground and then start to arrange the limbs. What I have come up with is that to do this with only a single object (dummy/bone ...) you have to use the MD dummy, as all other candidate bones like spine and pelvis are fixed to their parent position. This doesn't seem quite right though, as it seems very hard to copy and paste MD keys. (Don't know why but it seems that copying and pasting the MD keys to avoid twitchy loop animations instead causes unnatural bending to limbs, the head in particular). Selecting all the bones and move them around in world space doesn't work at all, since all bones will move around in their own little world. Allthough producing interesting art-deco-ish postures, I don't think it's usefull for anything else that creating "human vs. train" -like traffic accidents :)

2) How do I temporarily disable the physics of the character in the rig? It seems that the the default behaviour of the character rig is to impose some sort of physics to each change in direction you key to a bone. What I mean is that if you move the hand first left and then forward from the body it will try to make the movement more fluent by slowing down when the direction changes, as well as "over shooting" the keyed position slightly before getting back on track. This is of course great for creating hand movements as it produces much more believable results with much less effort. There are times when I want to avoid this thouh. It could be that I want my gunpowder unit to stomp it's foot during the Fidget animation. If it overshoots the keyed target position it will actually shove it's foot through the ground. How can I disable the physics for a particular key?

I would greatly appreciate any pointers, tips or tricks anyone gan give me on this!

Cheers!

./Alchemist

Refar
Oct 20, 2007, 07:18 AM
1) Moving MD is not a good idea - it is not a bone, so we not know what the exporter will do of this.

Look in the scematic view to get a idea of how the bones are influencing each other. Below is the screenshot of the pretorian object hierarchy. I also highlighted the "Scematic View" Button.

The thin green arrows in the scematic view allways point from parent (top) to child (bottom).

Basicly moving the Parent will move the child with it. (There are exception, as with every rule. One is "inverse kinematics" - see "Old" 2). But even then, a properly set up animation will have a root bone, being the parent of everything else.

Here the root bone is called "BIP".http://img525.imageshack.us/img525/6550/hierarchycv0.jpg
2) You can change the Type of the incomming/outgoung tangent for every key. If you set the tangent to "Flat" you will eliminate the smoothing. You might choose te leave the incomming tangent smoth, and just change the outgoing. A great way of doing this is in the curve editor - there you can see the results of your changes visualized as curves.http://img263.imageshack.us/img263/197/tangentsjb3.jpg
Edit Uhm... sorry, it seems that for some reason my first explanation to 2) was completely missing your question. I took the term "Physics" as a reference to how the bones affect each other. I reread your post, and i did not find the qusetion i had in mind when answering.... I edited the post, answering the real question above. I do not delete the 'original answer' "Old" 2) below, since it is not wrong, it's just missing the point.

-----

"Old" 2) You can not use different controllers during one animation. You can switch to another controlles/solver but if so, you will have to use it for the complete animation. And since the Pretorians skeleton is set up for a special Controller, you probably will have a harder time animating it, if you choose to switch.

Biped is animated via inverse kinematics. Meaning that - contrary to what i said above - the children will affect the parents (hence inverse). (Still a IK setup has a root bone parent affecting everything else). The idea behind this is generally:
Normal: If you use standard animation to animate let's say walking, you would have to move the upper leg, then rotate/move the knee joint, then the foot joint - this is a pain to do and very hard to synchronize to look good and fluid.
Inverse: So insted you just want to move the foot in a path you need, and the foot will 'drag' the other bones with it.

You could switch to be using the 'normal' instead of the inverse kinematics but then you would have to animate everything usind the rather painful way described above as 'Normal'. (I am also not sure how to switch the controller/solver easily - usually the skeleton is set up for a controller from the start).

But there is nothing that would require to disable IK - it should be possible to achieve every pose you need with the current controller. In general when working with IK you want to move the 'end bones' of a chain to they target position first. Then - only if needed - you can adjust the other bones.

alchemist
Oct 21, 2007, 07:59 AM
Thanks Refar!!

You are right, I probably expressed myself a little strangely. I am not quite familiar with the lingo of 3d animation yet, so physics to me is rather Newtonian physics, mass, gravity kinetic energy and such.

I have been experimenting with handling the BIP root, and the rig looks to be working as per your description of IK. It's just alot simpler now that I know what is good practice and what is to be avoided. Also, thanks for the tip on the Track View, that's an epiphany :) I'll have to lab-around with it and see what I can do with that.

You obviously put in alot of effort into you answer, and I really appreciate that!


If you don't mind another question:
You wouldn't happen to know if the NIF exporter will sample the mesh at each frame? I am primarily thinking of things like wind space warps and such. Would be cool to have some wind effects in the Idle animation, but I can't imagine that gamebryo will handle that effect exported as is, let alone the CPU cycles it would cost to calculate in RT.

Cheers!


./Alchemist

Refar
Oct 21, 2007, 09:17 AM
The Nif format as it is used in Civ4 basicly works as follows: All geometry data and all abjects are stored in the .Nif file, without the info on animation. The KF files (KF for KeyFrames - the animation Keys you set) hold the info on animation. No per-frame information is stored. (Unless of course, you set a Key on each frame.)

I know that Civ can use keys for Visibility, Material Properties, Textures as well as of course Rotation/Position/Scale. I never tried, but i dont think the Nif format does know how to handle reactor effects like Wind or Space wraps.

Since usually everything is animated by moving just the bones, usually only the bones Key-Frames will be in the KF file. However, every Key you set will go in the KF file for the animation, so in theory you can set Rotation/Position/Scale keys for Bones, as well as directly for Objects/Vertices. It is not good idea though to mix it. (by mixing i mean: you set keys for a bone affecting a Vertex and then in addtion set keys for the vertex directly - the interaction might cause unexpected results.)

-----

A easy and safe way of getting a wind effect, would be adding a extra bone for it. I assume you want the border of the coat to be waiwing in the wind.
- Make a bone there.
- Make this new bone child of the Root Bone, or maybe of the bonw which is affecting the vertices in the border the most.
- Add this bone to the skin modifier of your mesh.
- Give the vertices you want be moving in the wind a low weight with the new bone (maybe .20 for the lowest row and 0.10 for the second lowest row of verts in the coat. You can slightly vay the values +/- 0.05 or so ro make the effect less uniform and hence more natural)
- Just pull the bone backwards when you want to have wind.

Dont give the verts to hight weight under the new bone - the weight you are giving the new bone, you are taking away from the bone that affected the coat before. To some extent you can compensate for the low weight the bone have, by just moving it more during animation.

-----

Before putting to much effort in animating the wind however, remember the scale the unit will have in the game, and the short duration of the animations (most are under 1 sec. I think (not sure) the maximum idle length is 60 frames, which could be 2 sec.).

I noticed for example, that animating the flag of a ship to move in the wind, is almost not noticeable in the game - even in the bigger Civilopedia image and and full zoom in in the map, you have to look really hard to see it.