MergeMeshes and subdivideWithSubMeshes

Hi everyone,

I was trying to understand SubMeshes and managed to understand them less now… :grin:

Please check this out: Babylon.js Playground

All scene stats say there still is two meshes, bounding box, too.

However, obviously, there is rendered only one mesh (or two on top of each other). What I get even less are the data of the two submeshes: vert0: 0, vertCount: 4 for both. Should the second one not start at 4? Similar for indicies.

So is this all expected behaviour I do ont understand, or is there a bug?

Best wishes
Joe

Checking!

Excellent catch my dear!!
Fix worng setp for mergemeshes when subdivideWithSubMeshes was set by deltakosh · Pull Request #17762 · BabylonJS/Babylon.js

The correct output:
image

And the correct rendering:

1 Like

Oh sweet, thanks. :smiley:

Hahaha I got you!

When I saw the values I was like: “Houston we’ve got a problem”

1 Like