Virtually Geometric

Not so smooth on a Pixel 7 :sweat_smile:

4 Likes

Me and my brother were joking about running lumen and nanite on a browser, I would’ve never believe you if I wasn’t looking at your examples, I mean even with unreal 5 it steel recent technology, I was also expecting a heavy wasm file, it’s just under 131KB, amazing work. looking forward to your updates.

6 Likes

10 FPS. laggs

Amazing!!!

1 Like

Check out this thread. This is a question that pops up very often in unrelated conversations. In short, stable motivates developers to develop stuff like this, unstable does not: Three.js, semver, and addons

1 Like

@mrdoob : could you describe steps to create this external class. Ozone will gladly sponsor some internal development to bring about.

1 Like

I’m glad you were able to find commercial success for your efforts with this work. That said, it is still sad that this kind of thing isn’t available to threejs devs, it feels like it would be revolutionary and quite empowering.

Do you know of anything available out there that is similar to this project?

2 Likes

Hey @win ,

As far as I know there isn’t anything like that around. It’s not that the any individual part of the system is that complex, but it requires a very specific background and a ton of research to accomplish this. The knowledge here is more about graph theory than it is strictly speaking about graphics. For WebGL, it’s made harder by the fact that you need compute shaders, and WebGL doesn’t have them. I don’t think there will be a solution like this for WebGL anytime soon. For WebGPU it would be a lot easier to implement this type of system, but even there it wouldn’t be trivial.

It took Brian Karis around 5 years or research to achieve this with a dedicated team at Epic, I doubt it can be replicated very easily. I was lucky you could say, I just happened to have the right background for this, so it took me only a few months to connect the dots. I was also lucky in finding similar literature. I watched a few presentations from various conferences by Brian after I finished my solution, and I was surprised to learn that he was following a very similar trail of research literature as me. Even though that information was not public at the time when I was working on my solution.

I think I might give it a try on WebGPU once that is out, and license it with permissive terms for opensource/free projects. It’s was a really fun piece of tech to create.

Hope that provides some clarity, and thanks for checking out my work!

10 Likes

Unbelievable work done! 1 billion triangle on web browser ! Love this.
I wonder if it works well with texture?

1 Like

This is amazing, this will allow massive world to be loaded in threejs,

1 Like

How is this even possible, this massive amount of triangles is insane?

Hi @Usnul … first let me say amazing work! I was hoping to understand this approach further and was wondering what would the major differences between this approach and 3D tiles?

Hey Steven,

3D tiles are an interesting and cool piece of tech. The major difference is that 3D tiles don’t account for discontinuities in any way. That is - when you have 2 tiles next to each other that are of different resolution - you will generally see cracks where the edge of one tile follows a different path from its neighbor.

This is fine for data-heavy application where you want a cheap way to have LOD and you don’t care too much if the overall result looks a bit janky. Virtual geometry solves the problem in a complete way, that is - there are no cracks or discontinuities, it’s 100% seemless.

Beyond that, 3D tiles have discrete LOD levels, which is, again, fine for most usecases, we have been using discrete LODs for decades, but they cause visual pops as you transition from one level to the next. Virtual geometry is a “continuous” LOD system, meaning that there are no discrete levels and geometry gets progressively simpler or more complex in nearly-infinite number of steps as you move your camera closer or further away.

I’d say that for the complexity of implementing virtual geometry - if you can get away with a simpler solution and accept a certain degree of jank and pop - go for that solution instead, as it’s going to be way way easier to achieve.

2 Likes

Can u provide us the source code of metis.js sample in javascript, cheers :slight_smile:

1 Like

Heya, there’s not much in a way of source-code. I it was auto-generated by emscripten and slightly adjusted by hand.

Here’s the source:

You can see the C bindings that the JS file is generated from here:

I wrote a wrapper around that that’s part of my engine, but that’s not open-source. That wrapper just offers a nicer JS interface, there’s not much secret sauce there.

Metis is a bit of a pain to work with :sweat_smile: mostly because it’s following the paper(s) very closely, but there’s no documentation at all and it never says which paper it follows where. If you read some of the author’s work, it will make reading the source code much easier, as it is - it’s pretty obtuse. The comments in wasm.c that I wrote are probably the most useful bit of documentation you’ll find, unfortunately.

3 Likes

thanks so much, metis algorithm is awesome, i did some minor c tweaks to make a bit direct

1 Like

I tried to replace the (.ply) loader with GLTFloaders but it doesn’t seem to work because it freezes, I think I must be missing something, can you share us the GLTF version?

Hey Umbawa, this demo is not opensource. The code is under copyright. The copyright is owned by a third-party. I do not advise trying to reverse-engineer or re-purpose this, as it could lead to legal issues.

Also, the code for this tech is no longer in my hands.

2 Likes

which copy rights does it belongs to, we are very interested to procure the technology

also i already have read and understand the .c programs and have knowledge how the algorithm works, if we create our own tech that would be too laborious to accomplish maybe in a year or two, and we do not wish to reverse engineer metis technology, although I have already learned how the metis algorithm works from the .c source codes.

pls let me know how we can contact the closed source author for my boss to contact.

1 Like

So wait, you’re saying then not only is it not opensource but it can never be used/licenced by anyone else either? Thats a real shame if true you’ve thrown away money there for sure