Jump to content
  • Advertisement
Sign in to follow this  
Walking_Target

OpenGL Vertex Buffer Performance in Keyframe Animation

This topic is 3169 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm just starting to learn a little about Vertex Buffers in OpenGL. As I understand, a Vertex Buffer Object is something that lets you store vertex data in Server(VRAM) memory rather than Client(RAM) memory. This improves performance over vertex arrays because the data doesn't have to be moved to the video card each time you render. This makes sense for static models. For models with keyframe animation though, the position of vertices is tweened to give a smooth animation. So at first I imagined maybe we store the keyframes in VBO and see an improvement. But, we still have to perform the calculations and then render the tweened vertices, which aren't stored in a VBO, using the old fashion glFloat3v() method. On the other hand, we could throw the tweened vertices into a VBO every update, which means we'd allocate memory once, move data many times. Then we're still performing the memory transfer by hand but never having to hunt for space again. I guess I'm just asking if someone can explain the best way to render keyframe animations in OpenGL using VBOs, and maybe why it's the best way. ...maybe I've figured it out in the process of writing the post?

Share this post


Link to post
Share on other sites
Advertisement
Another option is to use a vertex shader to animation your model. Just pass the matrices in and bone weights and have it do the transformations (:

Share this post


Link to post
Share on other sites
vertex shaders. Then the data is *always* resident on the GPU, and the tweening happens a hell of a lot quicker due to the faster GPU ram (vs system ram) and more GPU cores...

Share this post


Link to post
Share on other sites
Yeah exactly

although a counter argument to vertex shaders would be if you were already GPU bound. If your GPU is already doing so much work that your CPU is sitting around waiting for it most of the time, your better off doing this work on CPU. (:

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!