Jump to content

  • Log In with Google      Sign In   
  • Create Account

Bones, matrixmanipulation or animation buffer


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 gobien   Members   -  Reputation: 117

Like
1Likes
Like

Posted 10 December 2012 - 01:25 PM

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?

Sponsor:

#2 L. Spiro   Crossbones+   -  Reputation: 13595

Like
0Likes
Like

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 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
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#3 Aeramor   Members   -  Reputation: 1148

Like
0Likes
Like

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

CTO at Conjecture, Inc.


#4 gobien   Members   -  Reputation: 117

Like
0Likes
Like

Posted 13 December 2012 - 08:45 AM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS