Live data from Hacker News

WebXR

immersiveweb.dev

31–40 of 68 posts

Re: WebXR

#31
I built a VR platform for a small, foreign language training services firm. WebXR made it possible for us to target the lowest-friction device available (Meta Quest 2) while also not having to slow our project velocity by having to submit updates for approval in the app store.

People who say JS on the Quest 2 isn't fast enough to do good VR don't know what they are talking about. The problem is that a lot of small, indie developers only know the most naive way to implement things and then blame the platform for their lack of algorithms training.

I had originally started the project in Unity 3D. I eventually rewrote everything in WebXR because--while the naive path in Unity was faster than WebXR--the ideal path in Unity was nearly impossible to implement. I haven't done anything in Unity for about 3 years now, so maybe it has changed, but basic things like decoding textures happen on the render thread, which makes it impossible to use the Unity happy path to implement a dynamic XR app that wasn't prone to making people puke. While I was still tilting at the Unity windmill, I had a large amount of code that was just dedicated to decoding images before using them as textures, tasks Unity should have been able to handle itself, except for the fact that Unity is built by people who have never had to make a game or app themselves before.

There's a reason the loading screens on VR Chat are so long and boring--they can't slipstream live objects in because they haven't done the hard work of throwing away 90% of Unity's bullshit framework code. So they have to hide the dropped frames behind a scene fade-in/fade-out.

With WebXR, you get the full browser ecosystem to work with. Web Workers. Web Audio being off-render-thread by default. Fetch API. IndexedDB. It's somewhat popular to complain about Web APIs because some of them have some weird quirks and most of them don't agree on how to design an API, but you have no idea how much worse it can get. If you think browser app development is bad, trying making an app in Unity sometime.

Re: WebXR

#32
post #30
post #10

For me the main advantage of WebXR is that one can create complex 3D objects at runtime/on the fly without havjbg to load them as assets or compiling them into the binary. Any thougts on the best way to do this in classic runtimes like Unity or Unreal (which scripting plugins, which base construction objects/assets?)? The main issue I have with WebXR, though, is it being canvas-based instead of being page/HTML-based,…

For Unity, I think you can just dynamically load DLLs as long as you're not on a plane form that requires AOT (iOS). Even then, for both Unreal and Unity there are many options to use scripting languages like js or lua or what have you.

Ok. will look into scripting plugins then for now, probably bridging some introspected interfaces. Would be nice if one could add/integrate existing JS libs but that's outside the Unity context.

Re: WebXR

#33
post #10

For me the main advantage of WebXR is that one can create complex 3D objects at runtime/on the fly without havjbg to load them as assets or compiling them into the binary. Any thougts on the best way to do this in classic runtimes like Unity or Unreal (which scripting plugins, which base construction objects/assets?)? The main issue I have with WebXR, though, is it being canvas-based instead of being page/HTML-based,…

You can stream it. Here’s an example using Unity: https://appmana.com/watch/virtualtestdrive For runtime loading in such an architecture, you can using an asset like TriLib. There are many streaming ideas. Most were poorly executed. I wouldn’t generalize based on those. It is definitely the future of delivery for many reasons besides technology.

Yes. I'd love to load and re-use existing js libs as well as add code to a project and rules at runtime. I'd have loved to see WebXR being an extension of HTML instead of it being an extension to the canvas.

Re: WebXR

#34

You can experience this on iPhone by installing Mozilla's WebXR Viewer [ https://apps.apple.com/us/app/webxr-viewer/id1295998056 ], then opening the dinosaur demo [ https://www.xrdinosaurs.com/ ]

So Safari doesn't support the WebXR standard?

Sometimes I really hope the AIs take over sooner rather than later.

Re: WebXR

#35
post #34

You can experience this on iPhone by installing Mozilla's WebXR Viewer [ https://apps.apple.com/us/app/webxr-viewer/id1295998056 ], then opening the dinosaur demo [ https://www.xrdinosaurs.com/ ]

So Safari doesn't support the WebXR standard? Sometimes I really hope the AIs take over sooner rather than later.

Not yet but fingers crossed for the new apple headset driving more demand for such

Re: WebXR

#36
I love the open web and want solutions like this to win but 3D experiences built on the web seem to fall flat. Any AAA games on the web? How far is state of art native desktop 3D vs 3D through the web? Add on XR (IMU, camera, geo-tracking, AI processing) and it falls even further. It would be interesting to see some side-by-side comparisons.

Re: WebXR

#37
post #25
post #7

Won't be touching WebXR again until iOS implements it. There's an experimental feature flag to enable it, so hopefully this actually happens soon.

https://twitter.com/AdaRoseCannon https://twitter.com/fernandojsg https://bugs.webkit.org/show_bug.cgi?id=208988 https://webkit.org/status/#specification-webxr Status = "In Development"

Interesting months coming up, indeed.

Re: WebXR

#39
post #24
post #13

Earlier quoted context omitted.

Basically i'd like to add, edit, store and load code during runtime.

Just a heads up, when folks say “complex 3d objects”, it’s usually assumed that they’re talking about things like GLTF files, which contain geometry, materials, lighting elements, animations, etc, and which Unity/Unreal can absolutely load/unload at runtime or even stream from a media server online (so they don’t have to be in the binary). However, once you cross over into scripting code, you are in fact crossing a b…

I wrote up a post on my R3F based WebXR hot reloading setup here:

https://github.com/gregfagan/blog/blob/main/xr-remote-displa...

You don’t actually need this if you’re just working on graphics, as usually a flat projection is fine, but it is quite nice to work inside your own XR app while iterating on the interaction.

Re: WebXR

#40
post #10

For me the main advantage of WebXR is that one can create complex 3D objects at runtime/on the fly without havjbg to load them as assets or compiling them into the binary. Any thougts on the best way to do this in classic runtimes like Unity or Unreal (which scripting plugins, which base construction objects/assets?)? The main issue I have with WebXR, though, is it being canvas-based instead of being page/HTML-based,…

CSS supports many 3D transforms, I wonder if VR browsers implement that in any sort of 3D plane.

I don't think people realize how dog shit slow the DOM is. There is a reason webXR uses the canvas.
Post reply on HN