Live data from Hacker News

The HTTP of VR

roderickkennedy.com

71–75 of 75 posts

Re: The HTTP of VR

#71
post #66

Earlier quoted context omitted.

This is why I think it's a joke to be building metaverse apps in Unity. Unity and dynamic asset loading are not happy bed fellows. There's not a lot I liked about Unity when I was working with it full-time a few years ago. But the one thing I could acknowledge that it has that was generally missing from open source web development was the asset pipeline. But dynamic, user-uploaded assets won't be able to use the asse…

You can do some level of dynamic asset loading. The real issue to get around in Unity is dynamic script loading. There's some progress being made with Unity's new visual scripting system. The visual scripts are stored as assets.

There are some problems even with dynamic asset loading in Unity that make creating a very smooth, very clean experience very difficult to achieve.

1) Asset bundles are the Unity "favored" means of supporting dynamic content. However, they are extremely heavy and have to be authored in the Unity editor. So you could do things like release new levels for an offline game, or new environments and items for a MMO, but user-generated content gets really hard to do. It's possible, with running the Unity editor headless, but that's so fraught with peril that it really shouldn't be considered.

2) Primitive, binary assets like textures and audio tracks are the easiest thing to load over the 'net in Unity, but last I checked, decoding them was still implemented on the UI thread. The download itself happens off-thread, but you'll have too large of a performance hit for devices like the Oculus Quest 2 with even a few textures: you will drop frames all over the floor. It's so bad that I had to find, fix, and compile in a full C# implementation of JPEG just to support dynamic texture loading without dropping frames on HoloLens 1, Oculus Go, and Quest 1. I quit using Unity by the time Quest 2 came out, but it's not so much more powerful that it would move the bar far enough.

3) Again, for primitive assets, the raw, decoded data may not be the final format that you want. To use memory efficiently, there are compressed texture formats that are supported directly in GPUs. Surprise, surprise, there is no 100% cross-platform format, so tool's like Binomial's Basis can transcode between formats. This is built into Unity's asset pipeline; if you start life with a PNG file for your image, statically loaded in your Unity scene, it will get transcoded into whatever compressed format the graphics APIs that your target operating systems support. Hence part of Unity's need to have target platforms specified.

4) For 3D models, you need to figure out where you want to lie on the spectrum of small, network-transmission friendliness vs. ease of parsing. That model will then need to be converted to Unity GameObjects and Meshes, which again, takes place on the UI thread. I know of no workaround for this, other than blanking the user's view out to black just before the object creation happens so they don't see the dropped frames.

If all you're making is a card game on smartphones, nobody is going to notice dynamic asset loading causing dropped frames because your "loading" screen isn't tied to their face. But in VR, it's basically table stakes, and Unity makes half of it very hard and the other half impossible.

Re: The HTTP of VR

#72
post #53
post #46

Earlier quoted context omitted.

But why does it have to load dynamically, when you can just package releases instead?

Because, in a real metaverse, everybody can make changes to their own stuff. That's the difference between a metaverse and an MMO.

I'm actually really curious to see how streaming video might work for things like light maps. You could have a beast of a machine, or a cluster, performing real-time raytracing on light and environment maps that then get streamed to the user. Sort of a hybrid approach between on-device rendering and remote gaming systems like Stadia where all the rendering takes place remotely. I think Ben Nolan was working on something like this for CryptoVoxels, but I stopped following him when he went full NFT crazy.

Re: The HTTP of VR

#73
post #53

Earlier quoted context omitted.

Because, in a real metaverse, everybody can make changes to their own stuff. That's the difference between a metaverse and an MMO.

I'm actually really curious to see how streaming video might work for things like light maps. You could have a beast of a machine, or a cluster, performing real-time raytracing on light and environment maps that then get streamed to the user. Sort of a hybrid approach between on-device rendering and remote gaming systems like Stadia where all the rendering takes place remotely. I think Ben Nolan was working on someth…

How much to do remotely is a big issue. A big problem with local rendering is that you need more bandwidth to the client than you'd need for video. A big advantage of cloud gaming is that you're in a data center, close to the asset servers with many gigabits of bandwidth.

The big problem with remote rendering is that it costs too much. "Cloud gaming" startups have appeared and disappeared for years now. If they charge too little, they go broke, and if they charge too much, users leave. NVidia cloud gaming is currently $10/month for 6 hour sessions. So is Stadia, now. That's not too bad, but it may be a loss leader. NVidia already doubled their price once. Startups with similar offerings are charging around $45/month.

Re: The HTTP of VR

#74
post #66

Earlier quoted context omitted.

You can do some level of dynamic asset loading. The real issue to get around in Unity is dynamic script loading. There's some progress being made with Unity's new visual scripting system. The visual scripts are stored as assets.

There are some problems even with dynamic asset loading in Unity that make creating a very smooth, very clean experience very difficult to achieve. 1) Asset bundles are the Unity "favored" means of supporting dynamic content. However, they are extremely heavy and have to be authored in the Unity editor. So you could do things like release new levels for an offline game, or new environments and items for a MMO, but us…

It's certainly not easy. I was just saying they've made a bit of progress. Assets still need to be activated on the main thread. You'll never get Awake and Enable off the main thread. But things like deserializing the asset can be done asynchronously now. Assets are loaded to the GPU from the main thread but that can be time slices over many frames.

Of course, I think those improvements are only for asset bundles so if that's a no-go for you then there's not been much progress.

Re: The HTTP of VR

#75

Earlier quoted context omitted.

On a related note, I develop libraries for embedding web browsers in Unity 3D ( https://vuplex.com ), including a library for embedding the Mozilla GeckoView library used by FireFox Reality. I plan to develop a WebXR driver for it, but haven't prioritized it yet. If you're interested in developing a WebXR driver for use with GeckoView (for example, to use with Oculus Quest), you can contact me, and I'll send you my n…

I'm interested in how you might be able to get through the CORS problem in WebXR/Browser standards ? In a VR Unity app with embedded browsers you can click through hyperlinks no problem but in WebXR the same hyperlink will trigger an origin mismatch and break out of immersion. Not having good 2D web content integration is a major blocker in WebXR for so many applications.

Hi, Jimmy . I think what you're saying is that when a new page is loaded, you want to avoid getting kicked out to the 2D view of the browser first (similar to switching between apps on Oculus Quest). I think there are opportunities to achieve that both at the web page level and at the browser level.

• At the web page level, an alternative to loading a new page entirely could be to load new content into the existing page, similar to a SPA. However, like you mentioned, that wouldn't really work if you want to seamlessly transition to a WebXR experience from a 3rd party. That's where browser-level innovation could come in:

• At the browser-level, it could be possible to come up with an innovative solution to this. For example, perhaps the user could grant a site permission to load the second site in a second browser instance and then transition from the first to the second once the second has loaded. This is kind of like allowing popups in a traditional 2D browser, where a page can create a new tab with window.open(), but with the additional capability of allowing the page to programmatically navigate to the new window once it has loaded.

Post reply on HN