Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have 90 obj for an animation and currently using LWJGL. How would I be able to load them in sequence for 3000 seconds (a frame every 33 milliseconds)?

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

My first suggestion: don't use Wavefront .obj for animation. You're getting tons of keyframes for your data, but you have hope of interpolating between them, unless you make absolutely sure the indices stay the same. Instead, why not try COLLADA? It supports vertex animation, skeletal animation and simple node transformations, with a lot less keyframes.

In answer to your question: I would suggest loading the future frame you want to display while displaying the current one. This is known as double buffering. So if your animation is 3 frames:

  • Load frame 0
  • Load frame 1
  • Display frame 0
  • Load frame 2
  • Display frame 1
  • Load frame 0
  • Display frame 2

This ensures that you always have something to display, even if loading a frame takes a bit longer than you anticipated.

share|improve this answer
    
Do you know where I can find a good tutorial to load/parse the data in Java for a *.dae file? –  ChocoMan Jul 28 '12 at 8:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.