• Advertisement
Sign in to follow this  

Vertex Animation and VBOs

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

Simply put, is it even worth the effort and if so does it require a shader? Since I need to change the vertices in the VBO everyframe, dosn't that mean im uploading new data to the graphics card everyframe, basically the same time lost using regular vertex arrays to draw is lost during the update call? Then i wonder, if it is, would a shader be the solution here? If i wrote a shader to calculate the new vertex position based on the key frame vertex information? And if the above is true, I guess i should store all of my animation data on the GPU (In a VBO). Then, if that's true, do i still loose time if i just did the calculation on the CPU (Not counting interpolation time, but the passing data to the GPU) with information from the VBO? I just wan't to know if any of the above are true, because it seems that storing vertex animation data in memory, but storing each instance of that data per rendered entity in a VBO dosnt help performance because i still modify the VBO each frame with data in memory. Any help or explination is appreciated.

Share this post


Link to post
Share on other sites
Advertisement
my app gains about 5% from vbo over va so thats not much , the reason being its shader/fill limited (which i believe most apps are more likely to strike)
my advise is to keep it as straight VAs and if in a couple of months u have some spare time implement a VBO rendering path, also vbos work with or without shaders

Share this post


Link to post
Share on other sites
From your post, I state that your are speaking of keyframed animation.
Here is the way I animate for my keyframed models ;
- at startup, for each model, create a VBO per frame with all its data,
- at runtime, use a vertex shader which receive the data and perform interpolation based on a uniform value.

I made the change in my engine quite a while ago, so it's difficult for me to give you the exact speed benefit but I remember it was really worthwhile. This can be explained by the fact that this design will ;
- save you from transfering data between CPU and GPU,
- move the interpolation computation from the CPU to the GPU which is more suited for this task.

Vincent

Share this post


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

  • Advertisement