Page 1 of 1

What are the benefits of subMeshes??

Posted: Wed Oct 11, 2017 6:20 pm
by al2950
I am currently implementing some import features for my engine, and I am currently questioning if I should break all meshes up into individual meshes, or add logic to try and have Meshes with multiple sub meshes where possible.

The question being is there any point to this?
The only answers I have are for skeletal animation (which require sharing a skeletal instance), and maybe a bit on performance as world transforms only need to be calculated once.

Any thoughts?

Re: What are the benefits of subMeshes??

Posted: Thu Oct 12, 2017 1:17 am
by frostbyte
beside what you've mentioned i think its mainly used in conjunction with subentity materials allowing you have multiple materials on the same mesh with the same skeleton( e.g change dress color etc... )

after messing around mainly with mesh import/export/manipulation over the last year, i must admit that i'm starting to feel that all this submesh/subentity over-complicates stuff while contributing very little
i'm not a cg artist so my knowledge is very limited, but most free models i've downloaded from the web don't have submeshes, so i tend to think its mainly used as an optimization technique in game-engines, being ignored by the rest of the cg community who does'nt care much about millisecond scale optimizations

that being said...ogre still strives to be super-optimized and although submeshes over complicate simple stuff like mesh manipulation they do have their advantages, maybe offering some kind of middle-ground..
if you decide to split your sub-meshed model to many singular meshes you would need all singular meshes to share/sync with the same skeleton somehow( duplicate bones? ) and you'll lose some optimization( not sure how big/important that is, espicailly for ogre 2.1 )
and if you decide to just merge all sub-meshes to a singular mesh you would lose the subEntity-material feature
so i guess the question comes down to whether you need this advantages in your engine
off course, you can alway's implement your own animation-pipeline but that is troublesome...

interesting topic...cheers... :)

edit: another big optimization benefit i can think of is with hardware pose/blendshapes animation( e.g facial animation on face submesh )