Sign in to follow this  
Darkbouncer4689

Animation - Keyframe vs Skin-and-bone

Recommended Posts

Hey all,

I'm currently getting started with animation and I was wondering if I should implement keyframe or skin-and-bone animation in my game. Or is it necessary to include both? What are some disadvantages and advtanges between the two? Is one significantly faster?

Any information will be very helpful.

Thanks,
Achilles

Share this post


Link to post
Share on other sites
I'm confused now. I thought that skin-and-bone animation was where you define some skeleton with joints and then have some skin over it. As the skeleton moves you can calculate the movement needed for each vertex of the skin that is associated with that joint.

For keyframe animation, can't the artist define a bunch of different frames for certain times and then you linearly interpolate between the frames depending on your current time.

Is the skin-and-bone method required for the artist to generate the different keyframes?

Any insight on this would be great =) I'm just starting my journey into 3D animation. Please be as specific as possible =)

Thanks,
Achilles

Share this post


Link to post
Share on other sites
Hodgman    51324
Sorry, I could've been more descriptive in my first post...[quote name='Darkbouncer4689' timestamp='1307609767' post='4821246']I'm confused now. I thought that skin-and-bone animation was where you define some skeleton with joints and then have some skin over it. As the skeleton moves you can calculate the movement needed for each vertex of the skin that is associated with that joint.

For keyframe animation, can't the artist define a bunch of different frames for certain times and then you linearly interpolate between the frames depending on your current time.[/quote]Those are both correct -- now, put them together and you've got key-framed skinned animation ;)

i.e. you define a skeleton with joints. The artist defines a bunch of different frames ([i]which is a pose for the skeleton at a specific time[/i]) and you can linearly interpolate between those frames to generate in-between poses depending on the current time.
Once you've got a pose, you can use that to calculate the movement needed for each vertex of the skin (depending on the vertexes associated joint(s)).

This is the most common way of animating characters in games.

Share this post


Link to post
Share on other sites
lauris71    841
Start with skin-and-bone animation, but plan ahead so you can support full or partial keyframes for specific poses as well.

The big pluses of skeletal animations are IMHO:

[list][*]It is much easier to make animated models[*]You need less data[*]You can easily add IK solvers and adjust poses dynamically[/list]
Keyframes can give you better quality - but this implies you can invest enough into creating models and animations.

Share this post


Link to post
Share on other sites
mhagain    13430
The big minus of skeletal animation is that a lot of the time it needs to run on the CPU. You can do keyframed animation (including interpolation) entirely on the GPU and with very high performance, although obviously there is the storage cost to consider.

Share this post


Link to post
Share on other sites
SimonForsman    7642
[quote name='mhagain' timestamp='1307625472' post='4821303']
The big minus of skeletal animation is that a lot of the time it needs to run on the CPU. You can do keyframed animation (including interpolation) entirely on the GPU and with very high performance, although obviously there is the storage cost to consider.
[/quote]

Skeletal animation can be done entierly on the GPU using vertex shaders (Look up hardware skinning, its extremely straightforward and the shaders aren't very expensive), transformation matrices for the bones can be stored on the GPU (which means you can store keyframes for the skeleton on the GPU aswell.

Some types of animations are excessivly difficult to make using skeletons though so there are definitly good reasons to use vertex morphing instead in some situations.

Skeletal animation works best for objects that have skeletons or joints, while vertex morphing works better for things that change shape (Turning a cylinder into a cube using skeletal animation is painful to say the least and forcing your artists to make such an animation using skeletons and vertex weights will drive them insane, Making a humanoid walk properly however is far easier to do using a skeleton and if you want something like ragdolls its pretty much required)

Mixing multiple animation techniques for a single object is possible aswell. (You can morph the vertices you use as the skin for a skeleton to create some pretty cool things)

Share this post


Link to post
Share on other sites
Keyframe animation is used in most games, especially where speed is important (like RTS or MMORPG); models are stored key frame by key frame (all you need is to interpolate between any 2 key frames), so the file is rather large, but it's easy to implement and use; World of Warcraft uses keyframe animation (you wouldn't wanna be in the WoTLK Dalaran if there were skeletal animations, computations would kill any video card).

Skeletal animation is also key framed, but the final result (skinning) is done dynamically. It is only useful in high-end games, rag-doll physics, complex and interactive animations, games where a more organic animation is required; Crysis uses skeletal animations.

Both types of animation can link models with other models by using tag points; this way you can achieve a higher degree of animation as well as adding different features like faces, hair styles, clothes, items etc.

I would recommend you to start with keyframe animation, it's easier and you can find a huge load of free animation files on the public domain.

Share this post


Link to post
Share on other sites
_the_phantom_    11250
The 'keyframe' being referred to in the post above is 'vertex key framing' as each vertex position is stored at each key frame.

Both skeletal and vertex-blend animations are 'key frame' animations, it's just how the data is stored and the resulting mesh is constructed which changes between them.

Share this post


Link to post
Share on other sites
Hodgman    51324
Yeah, there's a lot of incorrect terminology being used in this thread.

What's basically being discussed is [url="http://en.wikipedia.org/wiki/Morph_target_animation"]morph targets[/url] vs [url="http://en.wikipedia.org/wiki/Skeletal_animation"]skeletal[/url] animation.

Key-framing is a completely different concept, which can be used with almost every form of animation, including both of the above (both of the above can also be used [i]without[/i] key-framing)...

In a general sense, morph-targets are require more memory, whereas skeletal requires more computation power.

Skeletal animation can be extended to use the "Skinning" technique -- which is where each vertex can be attached to more than one bone to get more natural movements around joint areas.
Skinning only became really popular once vertex shaders came on the scene and gave us that level of computation power.

Most things can be animated via either, but fairly rigid objects (like skeletons) work well with skinning, while fairly soft objects (like faces) work well with morph-targets.
Modern games often use both techniques at the same time (e.g. morphing a character's face, while also using a skeleton for their body).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this