skeleton animation using vertex shaders

A while ago I had posted asking about various extensions that I thought handled skeleton animation and I was told that they were obsolete and it was generally done with vertex shaders. I put the problem aside and went to work on other things, but now I need to finish skeleton animation.

My question is, how is the accepted shader setup for this?
My thoughts were to have weights and indices stored as vertex attributes and then sent along with the other vertex information, and the matrices would have been set using calls to glUniformMatrix (i think that’s the correct method), and finally calculations would be standard and easily discovered online.

However it seems that if I wanted to have a skeleton of any decent size, updating the matrices each frame, and each model, could get quite expensive. On a related note, how fast are glUniform() and glUniformMatrix() calls, and on average, about how many bones are in a skeleton used for a model in a game?

Thanks a lot

[quote=""]
Correct.

[quote=""]
Uniform update performance has never been an issue for me, even for hundreds of animated models in two passes, assuming of cource that you’re using the batch update methods (Uniform4fv or UniformMatrix4fv). Btw, if your bones are never scaled, you can skip the final matrix row and upload 4x3 matrices instead of 4x4 (use Uniform4fv, not UniformMatrix4fv).

There is a limit of bones per render call. The limitation is how many uniforms the GPU supports, minus uniforms already used by other stuff in your render setup (light positions, material colors etc). So, if you want to have a model with hundreds of bones, you’d have to split it up and do extra render calls. I don’t remember the exact limit, but I’m sure it was fairly low on early GPUs.

I forgot about the batch calls, they would definitely speed things up. I doubt I would need more than 10-20 bones (MAX), it’s just the quantity of animated characters could be fairly high.