Bones, matrixmanipulation or animation buffer

Started by
2 comments, last by gobien 11 years, 4 months ago
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?
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

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

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.

-Aeramor

CTO at Conjecture, Inc.

I thought to apply this just for main characters, such as 150-200 vertices per frame

This topic is closed to new replies.

Advertisement