Archived

This topic is now archived and is closed to further replies.

Jiia

3D Animation

Recommended Posts

I'm just getting into 3D development, so please take pity on my completely newbie question. How are most 3D models animated? Like The Sims, or GTA3, or Vice City. The human models. Is it as simple as looking at each moving part of their body as a seperate object, and kind of rotating each part like a human skeleton? Like using the elbow as the origin, and moving the forearm by rotating it's location from the shoulder part? Some of the games look as though the parts are really connected. Is that something else, like the way Curious Labs-Poser does it, or is it just done really well so that the connections are not very visible? Am I even close? Any help is appreciated. Jiia [edited by - Jiia on November 15, 2003 2:30:20 PM]

Share this post


Link to post
Share on other sites
Jiia,

You are on the right track.

Historically, character animation has been done using segmented models - a skeleton is defined and animated, and then models are build that are attached to each bone. Unfortunately, this ended up with all kinds of pinching and interpenetration where you would see the joints.

In the last few years, people have been doing skinning. This is a system where a mesh that defines the entire character is attached to the bones using a weighting system that allows each vertex in the mesh to be transformed by multiple bones. The number of bones a vertex can be effected by is usually 3 or 4 because of the limits of hardware vertex shaders. This will no doubt increase as hardware improves.

The process goes something like this.

for (each vertex in the mesh)
{
for (each bone effecting this vertex)
{
multiply vertex by the animation for this bone
add it to this vertex''s output.
}
divide output by number of bones effecting this vertex
}

draw the mesh using the new output vertex array.

Of course, in hardware this is done differently, but when I wrote my animation and skin exporter I coded it up all in software, and while it was slower then hardware, it was easier to fix the problems on the animation side before migrating to vertex shaders.

If your artist is using max he should look at Character Studio''s Physique modifier or Discreets Skin Modifier. Both of these tools let you weight a mesh to a skeleton, setting the number of bones each vertex is effected by.

Once you get this working you may still see pinching, but it is fixable - just a tuning by the artist of the bone weighting.

The nice thing about this is you get one continuous mesh without segments. The downside is that it isn''t nearly as fast as a segmented model, but we''re at a point with hardware that this is acceptable.

Best of luck, hope that helps.

Share this post


Link to post
Share on other sites
i''ve been looking into implementing vertex skinning also. i''m interested in the point you (Sphet) made, and i''ve noticed it mentioned in other forums/articles as well. you mentioned that vertex skinning allows you to structure the model into one continuous mesh. however, our current model format (not using weighting) can have more than one mesh. IOW, each mesh is tied to a material. if we made the model one complete mesh, we''d lose our higher-level separation of material information. if the model were one continuous mesh, we''d have to have the material index stored in each vertex. is this how it is meant to be? or is it intended that the model should only have 1 material, reducing the material index to one per model, instead of one per vertex?

or, are all my questions moot and is it a matter of personal preference?

just thoughts...
jebus

Share this post


Link to post
Share on other sites
quote:
Original post by mightyjebus
i''ve been looking into implementing vertex skinning also. i''m interested in the point you (Sphet) made, and i''ve noticed it mentioned in other forums/articles as well. you mentioned that vertex skinning allows you to structure the model into one continuous mesh. however, our current model format (not using weighting) can have more than one mesh. IOW, each mesh is tied to a material. if we made the model one complete mesh, we''d lose our higher-level separation of material information. if the model were one continuous mesh, we''d have to have the material index stored in each vertex. is this how it is meant to be? or is it intended that the model should only have 1 material, reducing the material index to one per model, instead of one per vertex?

or, are all my questions moot and is it a matter of personal preference?

just thoughts...
jebus


I think typically you have a mesh per material/shaderset. You could do either way though, certainly, though you''ll have to test performance to see. (Though it would require placing multiple materials/shader paths on the hardware at once, which is probably prohibitive.)

I like pie.

Share this post


Link to post
Share on other sites
Basically theres two methods. Skinning as has been mentioned. The mesh is animated with a skinning tool.
Then the vertex data is either animated by keyframing.
Or another option for big companies is to use MOCAP(Motion capture). Here an actor wears a suit that transmits the position data to the computer. The position data can then be used in the programm. For instance you could have a file that holds the Information for a character ducking. Whenever the character is supposed to duck the data is retrieved and played back much like a movie.
-CProgrammer

Share this post


Link to post
Share on other sites