Textblock in WebXR

Hi all… I’m getting double vision in my VR headset when experimenting with adding a textblock to a scene. PG: https://playground.babylonjs.com/#9K3MRA#276. Any help is appreciated.

hi,

I just tested it on my quest, and it renders correctly in XR (including the hover effect). Want to share your working environment? browser/headset will be great. Maybe a few screenshots so I will be able to know what’s going on.

Hi Raanan,

So…this morning I woke my computer up and everything works as expected. Maybe my computer just needed a good night of sleep? I have a Samsung HMD Odyssey+ for WMR testing using Chrome and Edge. I’ve preordered an HP Reverb Gen 2 because of the resolution specs. (Also have a HoloLens 2 which seems to be in need of a major update to support WebXR from its version of the Edge browser.)

Did I go a little overkill with the text resolution/scaling in the example PG? Text was very blurry when I started.

BTW Raanan… Honored to chat with you. Thank you for leading the charge on WebXR for Babylon. This stuff is amazing and clearly the future of technology.

1 Like

Thanks! the honor is all mine :slight_smile: I am always happy to see people using WebXR and implementing amazing things with it!

BTW - Hololens 2 supports WebXR with the firefox reality browser. It is a preliminary version that works well, with a few missing features (like plane detection, hit test, and SVG support. So no GUI-Textblocks…) . Firefox sadly stopped the development.

Oh, and I am very glad it is working as expected :slight_smile:

Ouch…no hit test in FF Reality Browser? I’m sure Microsoft and Google are working on implementing WebXR for AR into Edge and Chrome, right?

No official message about it, I have the same hopes as you. I think Babylon Native will be released before edge/chrome do, and it is looking great already :slight_smile:

I haven’t heard of Babylon Native before now. So that would let you compile a stand-alone cross platform app from Babylon JS code? It’s kind of nice to be able to deliver, update and run an app within the browser though. Would Babylon Native have the advantage of protecting source code or would there still be scripting at some level?

It is a native app, so I assume you will be able to hide your code. It will be much better than the free software delivery system that is the web, that’s for sure :slight_smile:

You can read about it here - Babylon.js: Powerful, Beautiful, Simple, Open - Web-Based 3D At Its Best

Is there an easy way to keep the position of the textblock fixed based on the camera? I’d like to make it always hovering and readable to the user when they select an object then turn it off when they deselect an object. Sort of like a fixed UI/control panel. Thanks.

Hi,
could you look at this example:
https://playground.babylonjs.com/#9K3MRA#283

I see doubled “xd”. The only difference I see is that I use AdvancedDynamicTexture.CreateFullscreenUI(“ui”);

Is it a bug?

Yes, I don’t think you can use AdvancedDynamicTexture.CreateFullscreenUI(“ui”); in VR/XR.

That is true, fullscreen UI is currently not supported in XR, but I don’t mind looking into it when I have the time.

You can try using an object that will follow the camera instead, and will present the UI on top of it.

Ok, thanks :wink: