Jump to content

Mesh/SMesh model splitting


photo

Recommended Posts

Having a look at some of the OilRush models with articulated parts (e.g. gun turrets, rotors etc) some of the models are split into a static mesh for non-moving geometry and smesh for articulated parts) while other models are modelled as a single smesh only.

 

Is there some rule of thumb (e.g. vertex count) when it pays off to split a model into mesh/smesh (as this approach also introduces more draw calls and a more complex model structure compared to single smesh approach) ?

Link to comment

ObjectMesh is always faster than ObjectMeshSkinned.

 

Static mesh has more optimal vertex size 32 byte instead of 48 bytes.

Render can draw 32 static meshes by single draw call, skinned meshes can be instanced also, but they have more strict limits because of limited size of bone transformations array (just 96 bones).

For skinned meshes we should setup bone transformations array in addition to node transformation array for vertex shaders.

Vertex shader is more complex for skinned meshes but it doesn't matter on modern GPU.

 

We have several stress tests for maximal performance measurement:

00000.jpg stress/mesh_01: OpenGL 7.8M triangles in scene and rendering performance is 506MTris/sec

00001.jpg stress/skinned_00: OpenGL 1.9M triangles in scene, performance is 126MTris/sec

00002.jpg stress/skinned_00: Direct3D9 1.9M triangles in scene, performance is 323MTris/sec

 

It's not absolutely correct comparison because of difference number of triangles, but we can get some approximately results.

Performance of skinned meshes is highly API limited.

00000.jpg

00001.jpg

00002.jpg

Link to comment
×
×
  • Create New...