0
\$\begingroup\$

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)?

\$\endgroup\$
0
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ Do you know where I can find a good tutorial to load/parse the data in Java for a *.dae file? \$\endgroup\$ – ChocoMan Jul 28 '12 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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