Sign in to follow this  
giugio

[c++]skeleton animation time

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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


Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
thanks , but what are ...

lerp = linear interpolation
slerp = spherical linear interpolation

???????

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this