Jump to content
  • Advertisement
Sign in to follow this  
ehmdjii

accelerating rendering of animated meshes

This topic is 4493 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

hello, you can speed up the rendering of a mesh using either vertex arrays, display lists or vertex buffer objects. right? now if i am not mistaken, all of them kinda "lock" the vertex positions of the mesh. what if i have an animated mesh? how can i still make use of one of these technologies? thanks!

Share this post


Link to post
Share on other sites
Advertisement
well, the precise details depend on the type of animation you want todo, but the general answer is use a custom vertex program to perform the animation

Share this post


Link to post
Share on other sites
well,

* vertex arrays can be modified willy nilly as they exist in system memory, they dont lock the vertices, but do need to be transferred to the the GPU every frame.
* display lists are only for static geometry so you wouldnt use these.
* vertex buffer objects are more optimised for static geometry i suppose but can be mapped/unmapped to modify them as they live in the VRAM directly (depending on whatever the driver does with them [smile]).

That is ofcourse if you want to do vertex updating on the CPU, as already suggested you can use vertex programs/shaders that run on the GPU to do the processing and relieve the CPU for other tasks.


Share this post


Link to post
Share on other sites
thanks!

well the animation data will most probably come from a 3ds file, so its keyframe based.

what if i would want my program to run on older graphics cards where no shaders are available, what would my options be?

Share this post


Link to post
Share on other sites
Quote:
Original post by ehmdjii
thanks!

well the animation data will most probably come from a 3ds file, so its keyframe based.

what if i would want my program to run on older graphics cards where no shaders are available, what would my options be?


Well then you would have all the keyframes stored in system memory and then each frame interpolate between two keyframes on the CPU.
You would use either a vertex array or dynamic VBO to hold the new vertices for the current frame and update them each frame.

A vertex array would be simpler to use here but a dynamic VBO may yield better performance overall (the relative performance depends on the specific implementation details of the VBO by your drivers im afraid).

Edit: Of course VBOs are only accessible through Windows via extension loading so you would need to check to make sure they are even supported by your card first and then fall-back to vertex arrays if theyre not.

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!