Performance on a HoloLens2

I did not realize Babylon has MRTK support and wanted to check out the demo here https://playground.babylonjs.com/#24DLJ4#7 linked from the docs. It has low FPS though almost like holographic rendering mode in unity. I was wondering if anyone had some tips or tricks for better performance

Adding @bghgary our hololens expert

I am definitely not a HoloLens expert. :slight_smile: I will ask some people on the HoloLens team.

2 Likes

I am going to give Babylon Native a whirl later for it as well. Side project idea does not have to be web based, maybe its faster over there

1 Like

@br-matt I tried out that scene and also the intro XR example scene (https://playground.babylonjs.com/#9K3MRA#1), and didn’t notice any real difference between them on my Hololens. Do the two scenes have similar performance for you as well, or is there a noticeable difference between them?

About the same for me. There is just that general jittery-ness if you move your head side to side. Versus what you see on an integrated windows app or one you download.

I tried the BabylonNative version last night. First off thats the smoothest native anything experience I ever seen for getting installed + built to device(remote at that!). I was ready for the usual day long horror show and pleasantly surprised

The Playground(BabylonNative one) is acting strange though. Performance is about the same as a web PG, if not worse with the hand tracking models and cube at 15 or 20 fps maybe. There are strange white bars across the screen when looking in the direction of the cube. A handful out of dozens of launches, I swear have seen these white bars not show up and the cube was firmly locked in place with good FPS.

Incase it helps, I turned on the OpenXR Tools FPS display. Also maybe some clue but the white bars do not show up in screenshot but do see them on device :thinking:

So the white lines artifact you’re seeing is actually a known issue:
Broken clearing in right eye on HL2 when rendering utility layer · Issue #1087 · BabylonJS/BabylonNative (github.com)

I’m currently investigating the issue and should be able to get a fix out in the next couple weeks.

For now to get rid of the white lines what you should be able to do is set nearInteraction: false in the WebXRDefaultExperienceOptions when calling createDefaultXRExperienceAsync. Because the rendering bug happens when you use a utility layer scene, this also means that all of the stuff that requires the GUI3DManager (i.e. MRTK GUI) is currently experiencing that bug on HoloLens.

The reason the lines don’t show up in the screenshot is because the “camera” used to take the screenshot is not your right eye.

2 Likes

Hi @br-matt, the fix for the white bands is in BabylonJS and will be propagated to BabylonNative by the end of this week.

2 Likes

Sorry I did not have a chance to look until this weekend. I cloned down a fresh copy of repo master branch and building to the device. It’s better at first now ( most times ) when launching and just looking around at the cube. If I lose tracking or look away from the cube and back at it, the white bands are appearing again. I have also seen it rarely right after launch

Sorry @br-matt, I encountered a bug at the last minute on Friday that prevented me from merging the fix to master: Update BJS for xr utility layer fix by rgerd · Pull Request #1113 · BabylonJS/BabylonNative · GitHub

If you would like to test right away, you can use my unmerged branch on my fork for now:

Sorry for the inconvenience :confused:

2 Likes

Fix is in master! You should be good to go now. Thanks for your patience.

1 Like