skeleton animation

Started by
3 comments, last by zypo 17 years, 11 months ago
A while back I programmed a 3d model program that supported built-in skeletal animation. However, this skeletal animation was handled by the glRotate and glTranslate functions. This model creation program produced an impractical solution for modern computer graphics. I have since decided to re-program another 3d model program and have a few questions about skeletal animation. (fact) If I use glRotate, then the coordinates (5, 3, 7) will be different before and after use of the function: two verticies with the same coordinates could be drawn completely different depending on when I use glRotate or glTranslate. (application) My new model program will not have different coordinates, but I plan on implementing a new rotation algorithm using matrices. (question) Could my own custom rotation function possibly be faster than glRotate and glTranslate? if so, should I go about this process by rotating each vertex and polygon normal or is there a faster method such as another openGl function?
Advertisement
if your researching rotations and such, you should check out quaternions. they might be your answer, as they are the matrix replacement of glRotatef();
Hey thanks, I im somewhat convinced quaternions are exactly what I needed. But to address my problems furthur on the same topic, there seems to be lots of disagreement on the net about using quaternions or conventional math. One site that gives this comparison is : http://www.gamedev.net/reference/articles/article1199.asp . Can you offer your thoughts on avoiding conventional math other than the fact that cos and sin are slow? In addition to this, someone by the name of Jehan says on http://www.gamedev.net/community/forums/topic.asp?topic_id=19131&forum_id=12&Topic_Title=Quaternions+%2D+Why+use+them%3F&forum_title=&M=False&S=True that quaternions offer no translation or scaling information. These two pieces of information are critical for my development. Lastly, there are a few tutorials on quaternions for game matrix manipulation, but the ones that I have seen seem to be specifically for cameras. Do you have any sites you could recommend to me that have to do with blending quaternions with pure skeletal animation (as well as supporting scaling and translating)?

(one more question) you say that quaternions are the replacement for glRotate (which i want to stay away from)... do they work exactly the same way as glRotate? what is the difference? what is the speed of glRotate anyway?

Does anyone have any other opinions on my first post?
You want to know , what glTranslate, glScale, glRotate does, these functions are modifing MODEL_VIEW matrix, glRotate is the slowest , cause it uses functions for rotation , i dont know exactly , maybe sin and cos...

But anyways i would recommend you too precompile transformation matrix and use glMultMatrixf(), it multiplies your matrix with opengl's modelview matrix, and it's the fastest transformation as i know it... The matrix you're giving to the glMultMatrixf contains scale, translation and rotation, so as you see you dont have to call glTranslate, glScale, glRotate, and calculate those values over and over :)
yes thanks, I do know what they do... but I want to avoid using those methods.
Thank you anyway for the glMultMatrixf() function, which i didn't know about... If you say its fast, then I should look into it.

This topic is closed to new replies.

Advertisement