Live data from Hacker News

UE5 Nanite in WebGPU

github.com

41–50 of 117 posts

Re: UE5 Nanite in WebGPU

#41
post #40
post #17

Oh, nice. Third party implementations of Nanite playback. Nanite is a very clever representation of graphics meshes. They're directed acyclic graphs rather than trees. Repetition is a link, not a copy. It's recursive; meshes can share submeshes, which in turn can share submeshes, all the way down. It's also set up for within-mesh level of detail support, so the submeshes drop out when they're small enough. So you can…

> and so far only Unreal Engine's editor does it Not a major/mainstream engine by any means (a small Rust ECS game engine) but Bevy also supports something similar under the feature name "Virtual Geometry", mentioned here: https://bevyengine.org/news/bevy-0-14/#virtual-geometry-expe... Also, a technical deep dive into the feature from one of the authors of the feature: https://jms55.github.io/posts/2024-06-09-virtual…

[deleted]

Re: UE5 Nanite in WebGPU

#42

Is the demo using user agent strings to determine compatibility? That's not good, and feature compatibility should be determined on a case-by-case basis by simply attempting to detect/use the specific feature. I am on Chromium, not Chrome, and use WebGPU all the time, but the demos tell me to use Chrome, which I cannot do ethically. Would love to try the demos out, this looks like a lot of hard work!

It's not working for me on Chrome under Linux, nor on Android, for what it's worth (though Firefox is what I use for practically all my browsing needs). Something really odd with their detection logic.

Re: UE5 Nanite in WebGPU

#43
post #35
post #34

Earlier quoted context omitted.

> Repetition is a link, not a copy. It's recursive; meshes can share submeshes, which in turn can share submeshes, all the way down. While it does construct a DAG to perform the graph cut, the final data set on disk is just a flat list of clusters for consideration, along with their cutoffs for inclusion/rejection. There seems to be a considerable misunderstanding of what the DAG is used for, and how it's constructed…

It may not be based on what the mesh's creator considered repetition, but repetition is encoded within the mesh. Not sure if the mesh builder discovers some of the repetition itself. Look at a terrain example: https://www.youtube.com/watch?v=DKvA7NZRUcg

I'm not seeing what you claim to be seeing in that demo video. I see a per-triangle debug view, and a per-cluster debug view. None of that is showing repetition.

Re: UE5 Nanite in WebGPU

#44
Whenever I see rendered scenes like this (I.e., lots of repetitive static geometry) I imagine that annoying guy’s voice going on about “unlimited detail” from that old vaporware video. I guess nanite really did solve that problem for real, as opposed to whatever that old thing was using (I remember something about oct-trees or something).

Re: UE5 Nanite in WebGPU

#45

Wow, I can't remember the last time I read a project summary with so much jargon - I literally didn't understand anything: > UE5's Nanite implementation using WebGPU. Includes the meshlet LOD hierarchy, software rasterizer and billboard impostors. Culling on both per-instance and per-meshlet basis.

UE5 Nanite -> https://dev.epicgames.com/documentation/en-us/unreal-engine/...

WebGPU -> https://developer.mozilla.org/en-US/docs/Web/API/WebGPU_API

Meshlet -> https://developer.nvidia.com/blog/introduction-turing-mesh-s...

LOD -> https://en.wikipedia.org/wiki/Level_of_detail_(computer_grap...

Software rasterizer -> https://en.wikipedia.org/wiki/Rasterisation ("software" means it runs on the CPU instead of GPU)

Billboard imposters -> https://www.alanzucconi.com/2018/08/25/shader-showcase-satur...

Culling -> https://en.wikipedia.org/wiki/Hidden-surface_determination

Re: UE5 Nanite in WebGPU

#46

Is the demo using user agent strings to determine compatibility? That's not good, and feature compatibility should be determined on a case-by-case basis by simply attempting to detect/use the specific feature. I am on Chromium, not Chrome, and use WebGPU all the time, but the demos tell me to use Chrome, which I cannot do ethically. Would love to try the demos out, this looks like a lot of hard work!

>Is the demo using user agent strings to determine compatibility

>I am on Chromium, not Chrome

Don't know about your build, but I'm using Ungoogled Chromium, and it has the exact same user-agent string as Google Chrome.

Have you enabled the WebGL permission for the site in site settings? I think it was disabled by default for me.

Re: UE5 Nanite in WebGPU

#47
post #17

Oh, nice. Third party implementations of Nanite playback. Nanite is a very clever representation of graphics meshes. They're directed acyclic graphs rather than trees. Repetition is a link, not a copy. It's recursive; meshes can share submeshes, which in turn can share submeshes, all the way down. It's also set up for within-mesh level of detail support, so the submeshes drop out when they're small enough. So you can…

> Nanite playback

That's not what this is though. It's an implementation of the techniques/technology used in Nanite. It doesn't load data from Unreal Engine's editor. One of the mentioned goals:

   Simplicity. We start with an OBJ file and everything is done
   in the app. No magic pre-processing steps, Blender exports, etc.
   You set the breakpoint at loadObjFile() and F10 your way till
   the first frame finishes.

Re: UE5 Nanite in WebGPU

#48
Note: this isn't actually UE5 Nanite in WebGPU. It's a totally independent implementation of the same idea as Nanite.

This technique is starting to appear in a variety of places. Nanite definitely made the idea famous, but Nanite is the name a specific implementation, not the name of the technique.

Re: UE5 Nanite in WebGPU

#49
post #39

Is the demo using user agent strings to determine compatibility? That's not good, and feature compatibility should be determined on a case-by-case basis by simply attempting to detect/use the specific feature. I am on Chromium, not Chrome, and use WebGPU all the time, but the demos tell me to use Chrome, which I cannot do ethically. Would love to try the demos out, this looks like a lot of hard work!

> and use WebGPU all the time I'm curious, what for?

I've used it to build and/or run various machine learning models for text generation, speech recognition, image generation, depth estimation, etc. in the browser, in support of an agentic system I've been building out.

Lots of future possibilities as well once support is more ubiquitous!

Re: UE5 Nanite in WebGPU

#50
post #42

Is the demo using user agent strings to determine compatibility? That's not good, and feature compatibility should be determined on a case-by-case basis by simply attempting to detect/use the specific feature. I am on Chromium, not Chrome, and use WebGPU all the time, but the demos tell me to use Chrome, which I cannot do ethically. Would love to try the demos out, this looks like a lot of hard work!

It's not working for me on Chrome under Linux, nor on Android, for what it's worth (though Firefox is what I use for practically all my browsing needs). Something really odd with their detection logic.

WebGPU is not supported on Linux, and it won't for the foreseeable future.

On Android you should have at least Android 12, with good enough Vulkan drivers, not blacklisted.

Post reply on HN