Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Rendering frames of animation. VertexArrays?

  1. #1
    Junior Member Regular Contributor
    Join Date
    Aug 2000
    Posts
    106

    Rendering frames of animation. VertexArrays?

    Hi, lets see if you can help me.

    The way I'm doing animation in my current project is importing each keyframe from 3DSMax. I'm not sure how should I render each keyframe, right now I'm calling glBegin() glVertex() glEnd(), but I suppose I should create a vertex array for each key frame and then render the current vertex array. Is this correct?

    Which is the best way for doing this, performance-wise? (I can't use display lists, because the models will have animated textures and will be affected by lighting).
    Thanks in advance.

  2. #2
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,979

    Re: Rendering frames of animation. VertexArrays?

    As I know 3DS stores some sort of key positions, and your task is to only interpolate it. The best way is to use different vertex arrays for key positions and then blend them using linear interpolation via a vertex program.

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    2,704

    Re: Rendering frames of animation. VertexArrays?

    "importing each key frame from 3dsmax" can mean many things. Key frames could be for a skeletal pose, and you could be interpolating bone positions/orientations between these key frames. Then, to render the model, you'd write an ARB_vertex_program which does skinning by looking at bone matrices out of a palette.

    Or it could mean exporting the entire set of vertices for each key frame, a la good-old MD2 files. In that case, DrawRangeElement() is certainly a better way to get performance than immediate mode Vertex() calls. ARB_vertex_buffer_object storage of the vertex data would ensure optimal vertex transfer speed.
    "If you can't afford to do something right,
    you'd better make sure you can afford to do it wrong!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •