Did some research. There is one disadvantage when using a merged mesh: you do not have LODs. (see also Simondev’s video which I think will particularly pertain to large mega meshes ).
I wonder can we get LODs into merged meshes / SPSs (assuming free camera angles)? I thought about something like this: https://playground.babylonjs.com/#C42H5F#4 But this is super disappointing. I thought if you reject a vertex in the vertex shader it is like a cheap passthrough. But I do only see a small improvement
At least if the goal is (according to my understanding of Simondev) to avoid small triangles, then small (e.g. clutter) objects should not be merged into the big merged mesh.
I’ll add your post to the list.
Thanks!
Are you saying that merging meshes don’t retain LODs? A merged mesh is a mesh itself. Is there a reason LODs can’t be added after merging?
Seems like an algorithm (not yet created) could extract LODs from multiple meshes before merging. Then those extracted LODs could be merged, then added back to the merged mesh. (It might have to deal with different zoom levels in the separate LODs.)
Alternatively, LODs could be created from the merged mesh directly.
I tend to agree. This should work
scene.performancePriority = BABYLON.ScenePerformancePriority.BackwardCompatible;
// Intermediate
// Aggressive
mesh.cullingStrategy = BABYLON.AbstractMesh.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY;
// CULLINGSTRATEGY_STANDARD
// CULLINGSTRATEGY_OPTIMISTIC_INCLUSION
// CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY
mb, ymmv
No wait, let me explain. I realise that my phrasing was poor!
Say there is some level in a game. Let it be de_dust for instance. Now say you merged the entire level geometry into one mesh. Also assume there is like an FPS camera or sort of an ISO perspective on the level like in a commnader mode (not a top down camera!).
As I understand it, regular LODs would not be any good here. The game level is made of one merged mesh (consisting of many former indivudal meshes) and therefore you only ever have 1 LOD level available (right?). But actually you needed different LOD levels for different former meshes because they have different distances to the camera.
I think I see what you are saying, and yes it makes sense that one distance calculation is made per mesh for LOD (and only one level within the mesh is selected as a result). I don’t know for sure that that is how it works, but I think it does. Also mesh culling(?) via bounding box outside camera view is less effective.