2
\$\begingroup\$

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?

\$\endgroup\$
2
  • \$\begingroup\$ -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. \$\endgroup\$ Aug 19, 2012 at 0:51
  • \$\begingroup\$ @JonathanHobbs I rewrote the question as your guidance :) \$\endgroup\$
    – Eonil
    Aug 20, 2012 at 7:06

1 Answer 1

2
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\begingroup\$ tl;dr version: write it and profile it, see if it's faster or not on your target hardware. :) \$\endgroup\$ Aug 20, 2012 at 22:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .