Hi all, I can’t set useMultiview: true in the createDefaultXRExperienceAsync method using typescript with Vite, while it works in playground javascript:
Object literal may only specify known properties, and ‘useMultiview’ does not exist in type ‘WebXRDefaultExperienceOptions’.ts(2353)
There are no useMultiview anywhere in the framework. It works in the JS playground cause there are no type checks in JS but true or false will do nothing.
The reaosn for the naming of the variable is that it will fall back to standard rendering if the underlying system does not support layers or multiview
I’ll look into that throughout the week. I don’t have a quest 2, so I am going to have to trust you on the results, though it is very odd because I used to test with a quest 1 and never got these low numbers.
I can activate cascadedShadow (normal shadow were very pixelated on so big ground I think) but the shadows “swimm” / “shimmer” even with stabilizeCascades set to on.
If I use the second method, instead of the first, to handle WEBXR (see source code notes) I can see nothing from the right eye.
When I move myself toward the scene, My Oculus Quest 2 OVR METRICS show very low value of FPS (from 25 to 45).
Here the playground:
And trying this other demo, when I grab and move the deer, I can’t go over 10 FPS…
So, I did some debugging. Most of the issues here are perf issues you would have with any scene. The problem with XR is that you are rendering the entire scene twice. For example, take this -
Setting the performance mode before creating the meshes will probably increase the performance (does on my device). I am rendering this scene in 85-90 FPS.
Don’t forget that each scene starts with every feature the framework offers. Near interaction, pointer selection, teleportation enabled and more. And those are just the XR features. The scene itself should also be optimized to your specific use case (described wonderfully here - Babylon.js docs). I agree that you should expect a default scene to render as fast as possible. Here is the simplest scene, which, if doesn’t render in the (almost) highest FPS, we do have a problem:
Any unoptimized babylon scene is raw and needs to be prepared for production. There are many ways of doing it, which mostly depends on your use-case
I would like to know what hardware you are testing with, Raanan, because your numbers sound like you’re testing in Chrome with a Rift or Oculus Link, utilizing the PC’s video card rather than the snapdragon on the Quest.
i’m on quest 3, this is my main device at the moment.
I am not sure why you get 22 FPS. Here is a screenshot over time (note the drop right before taking a screenshot is me messing around with a few things before opening the camera app)
I am not trying to convince anyone that they are wrong - I totally believe you. I can’t debug on your device, so it is hard for me to tell you what could have gone wrong there. But this high CPU and GPU usage on a scene with a sphere and environment feels impossible. We are not doing anything apart from rendering the scene twice. WebXR is simply renderloop * 2 per frame. no magic (once you remove the webxr features that are not available on the desktop). As it depends on the resolution of the rendered window, rendering in full FPS in the browser does not 100% mean that you will render in half FPS or more when in XR, as the fullscreen resolution is probably higher than the window rendering the scene in the browser. But still, if a mobile device can render this scene in the max FPS (and it does), no reason a quest won’t.
Anyone else cares to check the last scene i shared and share a screenshot?
I’ve noticed another thing (not 100% sure but it seems):
sometimes if I reboot the quest 2 and first of all I launch oculus browser, the performance are much better for a short period of time (even 80-90 FPS with this scene).
Then, perhaps after some period of time or after some movements, or after closing and reopening the scene, the perfomance are worse.
I’ve noticed that if you press the home button to see the dock and windows the performance goes up to the max you have configured (72fps in my case). I have the new multitasking feature enabled. When I close it (or pinch to focus in immersive experience in the browser) the performance drops drastically.
So, it looks like a issue with the OS or the Oculus Browser itself, not babylon.