HTML Content in BabylonJS Scenes

I haven’t shifted anything in the DOM.
I was able to recreate the problem in PG, albeit, not as drastic of a problem. The problem is more apparent on wider monitors as well.

Thanks. Would you mind creating an issue on github so we can track it there?

1 Like

I work for a digital creative agency that is helping one of our clients port a Unity based application that runs on the Web and in VR over to Babylon.js. One of the benefits of the port was that we’d be able to leverage reusing some of the 2D elements presented in the 3D scenes as simple HTML interactive components, simple forms collecting information from the user or checking things off in the level so to speak. We’ve found that we can render the HTML in the scene, but as is discussed here when we view the scene in the headset, we just get a black canvas in the place of the HTML. I was fully prepared to start a new topic and upload & provide a sample project I created showing it not working in the headset, but being rendered fine in the headset browser.
Any idea of what might be needed to push getting this working in headset? This would be a HUGE time saver for us to be able to pull in already built 2D pieces and just let them render like normal. If we have to rebuild all the different versions of the form into images and such to be used in 3D on a 2D panel, it just seems like overkill. If I’m missing something and this has been fixed, please reach out and I’ll create a new topic or provide access to a repo with my sample project in it.

But this would be a very big help for us to be able to render local HTML, not display some iframe to a website hosted somewhere, just local dynamically written HTML based on the level data and what the users has done so far.

I don’t think what you’re asking is currently possible. There’s xr-dom-overlay which is AR only AFAIK. There’s GUI, but not full screen as what I’d consider best option. Last time I was researching only iframe could be rendered to a plane, but that’s still an ok option, but probably harder to integrate.