Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have thought about saving animation data in texture. I think I can save shader parameter setting and interpolation cost in CPU, and also enable animated instancing.

But I couldn't find no text mentioning about this, so I think there's some obvious reason people don't do this. Which I'm missing.

Can I know what I missed? Or is this just widely known technique?

share|improve this question
    
-1 How to ask questions the smart way: "Describe the goal, not the step. If you are trying to find out how to do something (as opposed to reporting a bug), begin by describing the goal. Only then describe the particular step towards it that you are blocked on." Instead of asking whether you can store animation data in a texture (which sounds absurd), tell us what goal you're trying to achieve through this method and ask us how you can achieve that goal. –  Jonathan Hobbs Aug 19 '12 at 0:51
    
@JonathanHobbs I rewrote the question as your guidance :) –  Eonil Aug 20 '12 at 7:06
add comment

1 Answer 1

up vote 2 down vote accepted

The main reason to not do skinned mesh instancing is that the vertex shaders texture fetch is fairly slow compared to other instructions (not sure to what degree), however you need to compare this with doing an extra draw call per instance instead.

To tell if you gain or lose on using instancing you would have to measure your particular code, in most cases you will probably gain on it as long as your rendering more than a trivial number of models.

Skinned Model Instancing has some nice information, its targeted towards XNA but has a section on performance which would be applicable.

share|improve this answer
    
tl;dr version: write it and profile it, see if it's faster or not on your target hardware. :) –  Sean Middleditch Aug 20 '12 at 22:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.