Mesh shape: use one or more subparts?

Mesh shape: use one or more subparts?


Assuming the following situation: Large landscape mesh, using hkpExtendedMeshShape und Moop-Code. The mesh should be able to use different materials per triangle/subpart.

Would it be better to use a single vertex / index / materialindex buffer on the whole mesh or use a triangle subpart for all triangles sharing the same material (group the triangles by material, of which generally only a few exist)?

The latter could possibly allow to use 16bit indices instead of 32bit, but as far as I know this would still require the materialindex buffer to store the same index (assuming the triangle grouping per material) for all triangles in a subpart, which would be a waste of memory.

Futhermore, is the performance of mesh shapes using moop generally better with a single subpart or with more than one (but only a few)?

Thanks for any hints,

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi S_W,
There shouldn't be any difference in performance between using a single subpart or multiple subparts. They're basically there to make it easier for you to combine vertex data that might be spread out in memory. I think a few medium-sized subparts should make it easier to share identical sub-meshes between meshes (e.g. instancing a tree in several locations).

By the way, MOPP (Havok's bounding volume system) stands for Memory Optimized Partial Polytope. Moop sounds like it's from a Seinfeld episode


Hi Chris,

thanks for the hint ;)


Leave a Comment

Please sign in to add a comment. Not a member? Join today