I have a Mesh with a SubMesh for each Material and they all use the Mesh's sharedVertexData. A small subset of the vertices are morph-animated. As I understand, it would be much more performant for them to be in their own VertexData so that the static vertices are not sent to the GPU (sw animation) or calculated in the GPU (hw animation) every frame. But the animated vertices are present in multiple SubMeshes and so would ideally be shared.
I can think of some options:
- Keep the static vertices shared and duplicate the animated vertices for each SubMesh.
- Keep the animated vertices shared and duplicate the static vertices for each SubMesh.
- Split the animated part into it's own Mesh and Entity.
- Have multiple shared VertexDatas in a Mesh that each SubMesh can choose from. This could essentially replace SubMesh's own vertexData and keep them all owned by the Mesh.
Would option 4 be a welcome and useful feature for Ogre? Or am I needlessly complicating things? I would be happy to code it up and submit it.