# Virtually Geometric

**URL:** <https://discourse.threejs.org/t/virtually-geometric/28420>\
**Category:** Showcase\
**Tags:** lod, geometry\
**Created:** [July 28, 2021, 6:26am UTC](https://discourse.threejs.org/t/virtually-geometric/28420 "2021-07-28T06:26:20Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![mrdoob](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mrdoob/32/22417_2.png) [@mrdoob](https://discourse.threejs.org/u/mrdoob)\
**Post date:** [December 2, 2022, 6:24am UTC](https://discourse.threejs.org/t/virtually-geometric/28420/21 "2022-12-02T06:24:32Z")

</div>

Not so smooth on a Pixel 7 😅

---

<div class="post-metadata">

**Author:** ![Fennec](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fennec/32/59265_2.png) [@Fennec](https://discourse.threejs.org/u/Fennec)\
**Post date:** [December 2, 2022, 6:25am UTC](https://discourse.threejs.org/t/virtually-geometric/28420/22 "2022-12-02T06:25:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Chaser\_Code](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/chaser_code/32/20199_2.png) [@Chaser\_Code](https://discourse.threejs.org/u/Chaser_Code)\
**Post date:** [December 2, 2022, 10:41am UTC](https://discourse.threejs.org/t/virtually-geometric/28420/23 "2022-12-02T10:41:23Z")

</div>

10 FPS. laggs

---

<div class="post-metadata">

**Author:** ![Juan\_Renoldi](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/juan_renoldi/32/16148_2.png) [@Juan\_Renoldi](https://discourse.threejs.org/u/Juan_Renoldi)\
**Post date:** [December 7, 2022, 5:19pm UTC](https://discourse.threejs.org/t/virtually-geometric/28420/24 "2022-12-07T17:19:30Z")

</div>

Amazing!!!

---

<div class="post-metadata">

**Author:** ![dubois](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@dubois](https://discourse.threejs.org/u/dubois)\
**Post date:** [December 7, 2022, 11:29pm UTC](https://discourse.threejs.org/t/virtually-geometric/28420/25 "2022-12-07T23:29:59Z")

</div>

> [@mrdoob](#):
>
> Probably not in core but I could be an external class, right?

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](https://discourse.threejs.org/t/three-js-semver-and-addons/45539)

---

<div class="post-metadata">

**Author:** ![Strapdoor\_Inc](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/strapdoor_inc/32/8085_2.png) [@Strapdoor\_Inc](https://discourse.threejs.org/u/Strapdoor_Inc)\
**Post date:** [January 27, 2023, 2:38am UTC](https://discourse.threejs.org/t/virtually-geometric/28420/26 "2023-01-27T02:38:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![win](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/win/32/23479_2.png) [@win](https://discourse.threejs.org/u/win)\
**Post date:** [March 14, 2023, 6:58pm UTC](https://discourse.threejs.org/t/virtually-geometric/28420/27 "2023-03-14T18:58:24Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Usnul](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/usnul/32/2355_2.png) [@Usnul](https://discourse.threejs.org/u/Usnul)\
**Post date:** [March 14, 2023, 10:51pm UTC](https://discourse.threejs.org/t/virtually-geometric/28420/28 "2023-03-14T22:51:01Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![whatisor](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/whatisor/32/35663_2.png) [@whatisor](https://discourse.threejs.org/u/whatisor)\
**Post date:** [May 9, 2023, 2:43pm UTC](https://discourse.threejs.org/t/virtually-geometric/28420/29 "2023-05-09T14:43:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Umbawa\_Sarosong](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/umbawa_sarosong/32/30107_2.png) [@Umbawa\_Sarosong](https://discourse.threejs.org/u/Umbawa_Sarosong)\
**Post date:** [May 9, 2023, 3:01pm UTC](https://discourse.threejs.org/t/virtually-geometric/28420/30 "2023-05-09T15:01:07Z")

</div>

This is amazing, this will allow [massive world](https://theneoverse.web.app/#serini&&serini) to be loaded in threejs,

---

<div class="post-metadata">

**Author:** ![Umbawa\_Sarosong](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/umbawa_sarosong/32/30107_2.png) [@Umbawa\_Sarosong](https://discourse.threejs.org/u/Umbawa_Sarosong)\
**Post date:** [May 10, 2023, 12:39am UTC](https://discourse.threejs.org/t/virtually-geometric/28420/31 "2023-05-10T00:39:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Steven\_Mieszelewicz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/steven_mieszelewicz/32/21900_2.png) [@Steven\_Mieszelewicz](https://discourse.threejs.org/u/Steven_Mieszelewicz)\
**Post date:** [June 5, 2023, 11:38pm UTC](https://discourse.threejs.org/t/virtually-geometric/28420/32 "2023-06-05T23:38:09Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Usnul](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/usnul/32/2355_2.png) [@Usnul](https://discourse.threejs.org/u/Usnul)\
**Post date:** [June 12, 2023, 4:16am UTC](https://discourse.threejs.org/t/virtually-geometric/28420/33 "2023-06-12T04:16:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Umbawa\_Sarosong](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/umbawa_sarosong/32/30107_2.png) [@Umbawa\_Sarosong](https://discourse.threejs.org/u/Umbawa_Sarosong)\
**Post date:** [August 8, 2023, 7:38am UTC](https://discourse.threejs.org/t/virtually-geometric/28420/34 "2023-08-08T07:38:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Usnul](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/usnul/32/2355_2.png) [@Usnul](https://discourse.threejs.org/u/Usnul)\
**Post date:** [August 8, 2023, 10:58am UTC](https://discourse.threejs.org/t/virtually-geometric/28420/35 "2023-08-08T10:58:22Z")

</div>

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:

> <https://github.com/Usnul/metis-js/blob/5f8a22aa40fc719e7991b2db5fc46ed697a6ae17/js/metis.js>

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

> <https://github.com/Usnul/metis-js/blob/5f8a22aa40fc719e7991b2db5fc46ed697a6ae17/metis-5.1.0/wasm.c>

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 😅 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.

---

<div class="post-metadata">

**Author:** ![Umbawa\_Sarosong](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/umbawa_sarosong/32/30107_2.png) [@Umbawa\_Sarosong](https://discourse.threejs.org/u/Umbawa_Sarosong)\
**Post date:** [August 12, 2023, 6:04am UTC](https://discourse.threejs.org/t/virtually-geometric/28420/36 "2023-08-12T06:04:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Umbawa\_Sarosong](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/umbawa_sarosong/32/30107_2.png) [@Umbawa\_Sarosong](https://discourse.threejs.org/u/Umbawa_Sarosong)\
**Post date:** [August 12, 2023, 4:40pm UTC](https://discourse.threejs.org/t/virtually-geometric/28420/37 "2023-08-12T16:40:43Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Usnul](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/usnul/32/2355_2.png) [@Usnul](https://discourse.threejs.org/u/Usnul)\
**Post date:** [August 12, 2023, 5:18pm UTC](https://discourse.threejs.org/t/virtually-geometric/28420/38 "2023-08-12T17:18:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Umbawa\_Sarosong](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/umbawa_sarosong/32/30107_2.png) [@Umbawa\_Sarosong](https://discourse.threejs.org/u/Umbawa_Sarosong)\
**Post date:** [August 12, 2023, 6:03pm UTC](https://discourse.threejs.org/t/virtually-geometric/28420/39 "2023-08-12T18:03:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Adrian](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/adrian/32/36905_2.png) [@Adrian](https://discourse.threejs.org/u/Adrian)\
**Post date:** [September 22, 2023, 10:26am UTC](https://discourse.threejs.org/t/virtually-geometric/28420/40 "2023-09-22T10:26:07Z")

</div>

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

[Previous page](https://discourse.threejs.org/t/virtually-geometric/28420.md?page=1)

[Next page](https://discourse.threejs.org/t/virtually-geometric/28420.md?page=3)
