Multiple Shared VertexDatas per Mesh

What it says on the tin: a place to discuss proposed new features.
Post Reply
chilly willy
Halfling
Posts: 65
Joined: Tue Jun 02, 2020 4:11 am
x 19

Multiple Shared VertexDatas per Mesh

Post by chilly willy »

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:

  1. Keep the static vertices shared and duplicate the animated vertices for each SubMesh.
  2. Keep the animated vertices shared and duplicate the static vertices for each SubMesh.
  3. Split the animated part into it's own Mesh and Entity.
  4. 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.

paroj
OGRE Team Member
OGRE Team Member
Posts: 2016
Joined: Sun Mar 30, 2014 2:51 pm
x 1089
Contact:

Re: Multiple Shared VertexDatas per Mesh

Post by paroj »

the issue with 4) is that all affected vertexData is a public member and thus this would break API. However I am not convinced this is worth it, as you can achieve the same effect by using 3) with only little overhead.

Post Reply