skeleton animation dx 10 and frames

Started by
1 comment, last by Black Knight 14 years, 5 months ago
Hy. I'm near to complete my little skeleton animation engine imported from collada files. My problem now is when change the frame in the animation. I have a class timer that get tiks and return the frame rate and the delta time. The animation matrix from collada are on 30 frame/s . I have this code:

render(){

timer.tick();

if(timer.getDeltaTime()==?????????????)
   renderSkinMeshes(....
  }
}

when i must render the skinned mesh?at what deltatime? Is a correct method? Thanks.
Advertisement
up up
I think you should render the mesh at all times :) Or it will flicker.What you want is to update the animation of the mesh depending on the time passed and the rate of animation.So if the animation is set at 30 frames/second that means 1 frame per 1/30 seconds.So accumulate the elapsed time if it passes 1/30 seconds advance to the next frame subtract 1/30 from the accumulated time and continue.You are drawing the mesh every frame.
Hope this gives some ideas and doesn't cause any more confusion :)

This topic is closed to new replies.

Advertisement