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?
Bones, matrixmanipulation or animation buffer
Started by gobien, Dec 10 2012 01:25 PM
3 replies to this topic
Sponsor:
#2 Crossbones+ - Reputation: 5345
Posted 10 December 2012 - 04:52 PM
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
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
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums
#3 Members - Reputation: 495
Posted 12 December 2012 - 01:59 PM
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
Technical Director at Emerge Digital






