Merging Meshes uncomfortable experience in Oculus Quest

Is it normal that scenes with few merged meshes are more uncomfortable than a scene with smaller but several meshes in VR using oculus quest ? A scene with only 5 draw calls but huge merged mesh seems to be uncomfortable in VR than a scene with around 35 draw calls but several smaller meshes.
However, in browser (not in VR mode) seems quite the opposite (as expected). Is this normal in babylon js ?
Thanks.

That’s a tough question to answer without seeing the scenes. Want to share the two playgrounds?

There can be an explaination behind bad behavior even with less draw calls. Memory used, meshes that are always “visible”, etc.

It’s an interior of a furnished apartment (babylon file). The same scene has been optimized by merging the meshes (all furnitures, props, walls, lamps, caprpets etc., -> all share the same material) to reduce the draw calls to only 5. While the same scene without merging mesh has 56 draw call but is more comfortable in VR (Oculus Quest).
If you are saying this is not a normal behavior than I will have to investigate further. Otherwise I thought there might be a general explanation on how babylon js renders huge block of scene inside VR vs. small chunks of meshes. In theory could it be that if we combine all the meshes in a scene that everything is forced to be rendered in VR even when not in player’s view ? Does that mean merging whole scene into bigger meshes for VR is not a good approach ? Just wondering ?

Since merging meshes is for the purpose of increasing fps, by reducing cpu of slower calls, I would look at comparing the overall frame rate of the 2. It might be the increased gpu of doing the whole room every frame out weighs the cpu savings.

You are never going to know without measuring. Adding something crude in the render loop would get something cheaply. Use alert to display the results and compare. Something like:

let start = BABYLON.Tools.Now; 
let count = 0;
engine.runRenderLoop(() => { 
      scene.render();
      if (++count === 72 * 60) {  // about a minute
          alert( count / (BABYLON.Tools.Now - start) );
     }
});

The higher the number the faster the frame rate.

It makes sense. As you have mentioned I will try investigating the frame rates further using your code (quest guideline > 72 fps) … as babylonjs scene.debugLayer tool shows only max 60 fps.
Thanks !

Are there options in babylon vrhelper to display frame rate or debug info while in VR (wearing headset) ?
I am quite new to babylon and still discovering this wonderful tool. Any help is much appreciated. Thanks.

Hi Dan

I have Lenovo mirage solo. Runs at up to 75 FPS. I found that this would give me the correct output at least on my device:

engine.getFps().toFixed()

Quest’s max FPS is 72, so no guideline states anything more than that. It is recommended to get the highest FPS possible, of course, to prevent dizziness and orientation problems. I had scenes that render at 30-40 FPS and were still bearable, but not for a long time.
Babylon can show more than 60 FPS, you simply opened it on a screen that didn’t support more than 60

The quest can show a debug layer. It is an external app that need to be installed individually.
It requires adb as you met to install an external APK…

Thank you all for your input. I learned something today.
One more question … isn’t there a possibility to display the frame rates for example while in VR (webvr) using something like a HUD. Maybe using babylonjs own functions instead of installing external APK for oculus quest? secondly which browser do you advise to use if I want to display more than 60 FPS (currently supported max). Currently I am using Microsoft Edge to debug my scenes.

Of course you can :blush:
You can create a GUI text element and update it every frame. Just make sure it follows you around.

2 Likes