• Advertisement
Sign in to follow this  

Bones, matrixmanipulation or animation buffer

This topic is 1862 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

hi, this is my first post.
i'm programming a tiny game in webgl, and i would ask what is a better way to program animations:
actually i do a matrix transformation for every element of an object (a humanoid body for example),
i tryed to implement a bone system, where vertices are calculated from bone position, this is more cloth-like but too wavy.
so i'm thinking to do a very complex animation, and store precalculated vertices in a buffer and then ->
draw(offset,length)
frame1 -> draw(0,100)
frame2 -> draw(100,100)
and so on

is this a good metod? what about performance? and if can this work, are there somebody who did that?

Share this post


Link to post
Share on other sites
Advertisement
The number of frames necessary to make a jitter-free animation means you would be consuming a massive amount of RAM.
It is really not a good idea. Just use matrix multiplication or position-vector/scale-vector/rotation-quaternion interpolation with a matrix build out of those components at the end.


L. Spiro

Share this post


Link to post
Share on other sites
Storing keyframes for vertices was actually common practice not too long ago. The first 3 quakes used that method to great effect, I'm sure there are still games today that use it as well. He is correct though, it will use more ram. For a small game, it's a non-issue. Just remember to only store diffs and to make sure you have keyframes so you can easily jump to a different animation.

Share this post


Link to post
Share on other sites
I thought to apply this just for main characters, such as 150-200 vertices per frame

Share this post


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

  • Advertisement