[c++]skeleton animation time

Started by
5 comments, last by giugio 14 years, 9 months ago
Hy. I'm still implementing a skinned mesh and i have my .collada file animation sapled at 30 fps. At what time i change the skeleton pose? I must use a timer ? i read some like :fps * sampletime *frame ecc.....????? THanks.
Advertisement
upup
Quote:At what time i change the skeleton pose?

I do not understand the question and I also feel you do not understand skeleton animations. The joints will be constantly slerping or lerping between keyframes.
http://gpwiki.org/index.php/OpenGL:Tutorials:Basic_Bones_System#Skeletal_animation
Quote:
I do not understand the question and I also feel you do not understand skeleton animations. The joints will be constantly slerping or lerping between keyframes.


i think insteed that the update of the bones is relative to the fps and the sample time of the animation file(in my case collada).
Quote:Original post by giugio
Quote:
I do not understand the question and I also feel you do not understand skeleton animations. The joints will be constantly slerping or lerping between keyframes.

i think insteed that the update of the bones is relative to the fps and the sample time of the animation file(in my case collada).

You probably don't know the terminology but that's exactly what he said.

lerp = linear interpolation
slerp = spherical linear interpolation


You can use time based animation calculated from the number of ticks that have passed between your updateAnimation();

Grab the current CPU ticks and calculate deltaTime from currentTime - previousTime. Remember that 1000 ticks = 1 second.

Your main would follow something a bit like this:

init();
main_while(1)
{
getCurrentCPUTicks();
handle_input();
getCurrentCPUTicks();
// if its time to update based on deltaTime
updateAnimationNextFrame();
}

Hopefully this will get your on the right track. If you need more help, just ask and I'll try to help you out.
------------------------------------------------------------visit my: homepage
thanks , but what are ...

lerp = linear interpolation
slerp = spherical linear interpolation

???????

This topic is closed to new replies.

Advertisement