I have a model I want to load into my program. The model was build and animated in Milkshape3d. I am using the Milkshape3d ascii format to load my model. So here is my question. Say the model has 10 different aminated frames. Would it be possible, or better to do the math ahead of time and save each frames vertex information into an individual vertex array, and then simply call the arrays in order on a givin time interval to display the animated effects. Or would it be better to let opengl do the matrix manipulations for each frame, then post the frame? The only downfalls that i can see would be, the first method would be space costly. I mean 10 array, even if idexed, would take up atleast 8 or so times the room in bytes, but even if I have 1000 vertecies per frame, thats still only 8-10 thousand floats, which is compleatly fine with me. But on the flip side, im sure that the program would run much faster due to dropping most of the math implementation right out of the workload. Any suggestions?? I would like to do the first way. I think that would work best for me. But im not sure of the performance and “even if its possible” issues.
normally going frame 0-1-2-3-4…8 doesnt look good (its jerky)
u should lerp between frames
the simplest is linear interpolation
say each frame takes a second to draw (normally u want 15-20 frames a second)
check the time say its 0.234
use that in your calculation
frame0 vert * 0.234 + frame1 vert* (1.0-0.234)
(not an answer to your question but i didnt understand it :P)
The ideal solution is to use skinning with an animated hierarchy. By doing that you only need to store bone rotation keyframes and interpolate between them. Storing up large chunks of animation data is best avoided because the memory rquirements tend to get to silly levels after you add a few animation cycles.
Ok, could someone then tell me more about interpoling between frames? is there an opengl call that can be made to interpolat between 2 given arrays. So that if i want 10-20 frames between 2 arrays of verticeis, it will plug them in for me, on a give time scale??