Jump to content
  • Advertisement
Sign in to follow this  
fguihen

which should i use skelital or keyframe animation ( + i need examples)

This topic is 5397 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

im only just beginning managed directX with c#. i have to do a simulation of a crowd in 3d. im wondering, for a beginner, would keyframe or skelital be better?also are there any examples on theese in c#?im cant read c ++ very well, and i dont use it. i have searched the site but found nothing. thanks all [Edited by - fguihen on October 4, 2004 9:50:22 AM]

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
in my experience, key-frame is easier to learn but skeletal animation gives better results. start with key-framed and then determine if you need a more robust implementation.

Share this post


Link to post
Share on other sites
Skeletal animation uses keyframes too ...

You mean skeletal animation versus vertex animation? With more complex models (which is common these days), skeletal animation can be more economic.

It's harder to implement, but definitely worth the effort.

Share this post


Link to post
Share on other sites
skeletal animation tutorial is a tut i wrote.

I prefer skeletal animation for consoles/PC because:

1) consumes less memory than vertex animation
2) you can do cool things like rag dolls, bone collision,etc
3) you can share animations between different characters

cons:

skeletal animation requires more math than vertex animation. hence, it makes the CPU work harder.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by vajuras
skeletal animation tutorial is a tut i wrote.

I prefer skeletal animation for consoles/PC because:

1) consumes less memory than vertex animation
2) you can do cool things like rag dolls, bone collision,etc
3) you can share animations between different characters

cons:

skeletal animation requires more math than vertex animation. hence, it makes the CPU work harder.



A number of articles mention having the GPU do more
spherical tweening of skeletons (alot more instructions per pass in the newer graphics cards and space for function tables
in the gpus...)

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Quote:
Original post by vajuras
skeletal animation tutorial is a tut i wrote.

I prefer skeletal animation for consoles/PC because:

1) consumes less memory than vertex animation
2) you can do cool things like rag dolls, bone collision,etc
3) you can share animations between different characters

cons:

skeletal animation requires more math than vertex animation. hence, it makes the CPU work harder.



A number of articles mention having the GPU do more
spherical tweening of skeletons (alot more instructions per pass in the newer graphics cards and space for function tables
in the gpus...)


I've writen a skeletal mesh loader app and tho all the work is being done on the CPU atm i can see how easy it'd be to push this onto the GPU with a simple vertex shader.
you might want to look at the book "Focus on 3D Models" published by prima tech. i got that and used the chapter on Milkshape 3d models as the basis for my loader. only things i need now are
1) skills to make my own model (will probably resort to ripping one out of a commercial game as my artistic skillz are less than an inebriated donkey with epilepsy)
2) some method of control the animation. if anyone has ideas on this point i'd like to hear em.

Share this post


Link to post
Share on other sites

Quote:

A number of articles mention having the GPU do more
spherical tweening of skeletons (alot more instructions per pass in the newer graphics cards and space for function tables
in the gpus...)


I am not familiar with this concept but it sounds groovy. I've honestly just started moving my skeletal animation to the GPU (shaders). thanks for the tip!

Share this post


Link to post
Share on other sites
I've read that vertex animation can give better performance when you're dealing with massive amounts (several hundreds, even thousands) of low-polygon models. That way you can also batch several identical models together, after animating them, and render them with a single call.

Share this post


Link to post
Share on other sites
Well, for the start, keyframe animation is definitely simpler to program. Actually, once you have your own importing function coded, you just load 25 files into an array and that`s it.
True, it`s very memory-intensive when it`s uncompressed and you have 10 characters with 5 animations in memory.
But when you later create a vertex shader that decompresses the data, you can get pretty low memory consumption. Just consider that common vertex format would be 3 floats for position and 3 floats for normal (texture coordinates are stored just once per animation). So this is 6*6=36 Bytes.
But you can easily get away with 3 bytes for position and 3 bytes for normal. yes, in a shader you have to pad it 4 bytes, but other than that, it`s just 6 bytes per vertex ! So it`s a 6:1 ratio. And usually you don`t need to store normals each frame. My experience shows that a normal may be stored just each 3rd or fourth frame and then interpolated inside a shader, so on average, we now have just 4 bytes per vertex (without padding), and that`s 9:1 ratio compared to ordinary vertex format (float x,y,z, nx,ny,nz). So, the memory consumption is not that big issue anymore. Plus, because of vertex shader decompression, you save a pretty much of bandwidth, because 9 times less data gets transfered over the bus.

However, nobody mentioned the problem with skeletal animation which is when you bend a hand, there are vertices at joints that get collapsed, which creates an ugly atifact of stretched polygons. This is something that your 3d animator can easily fix when exporting each frame manually.
Surely there are ways around this but this can get tricky and is nowhere near programming your own orutines for keyframe animation that can be coded easily under 1 day or a weekend mostly.

However, if you need 20 different characters to have same animations, skeletal approach is an obvious winner.

Share this post


Link to post
Share on other sites
Quote:
Original post by vajuras
skeletal animation tutorial is a tut i wrote.

I prefer skeletal animation for consoles/PC because:

1) consumes less memory than vertex animation
2) you can do cool things like rag dolls, bone collision,etc
3) you can share animations between different characters

cons:

skeletal animation requires more math than vertex animation. hence, it makes the CPU work harder.



link down... :(

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!