# LOD - lazy loading on demand?

**URL:** https://discourse.threejs.org/t/lod-lazy-loading-on-demand/40101
**Category:** Questions
**Tags:** on-demand, lod, geometry
**Created:** [July 7, 2022, 6:11pm UTC](https://discourse.threejs.org/t/lod-lazy-loading-on-demand/40101 "2022-07-07T18:11:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![vielzutun.ch](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/vielzutun.ch/32/21366_2.png) [@vielzutun.ch](https://discourse.threejs.org/u/vielzutun.ch)
#### Post date: [July 7, 2022, 6:11pm UTC](https://discourse.threejs.org/t/lod-lazy-loading-on-demand/40101/1 "2022-07-07T18:11:26Z")

</div>

Hi all,

I’m working on a tile-based digital elevation model viewer/navigator of a nearby mountain range. Since it’s real world data, each tile is unique, so no instancing is possible. The maximum spatial resolution is considerable (0.5 m, which means 4 mio data points per square km / tile), so I’m using LODs, which still can exhaust the available physical memory of my machine. (Yes, I’m aware that LODs increase the amount of required memory.). For this reason I currently forgo the most detailed level and start with the second-most-detailed level, which cuts my memory footprint to one-fourth. Yet I’m regretting this when I’m zooming into one tile for a most detailed view.

So I’m wondering:

Is it somehow possible, to initially supply a low-res “dummy” mesh instead of the most detailed one to an LOD, and load the actual high-res mesh only on-demand?

At this point, any transient drop in framerate would be acceptable.

---

<div class="post-metadata">

### Author: ![drcmda](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@drcmda](https://discourse.threejs.org/u/drcmda)
#### Post date: [July 7, 2022, 9:20pm UTC](https://discourse.threejs.org/t/lod-lazy-loading-on-demand/40101/2 "2022-07-07T21:20:15Z")

</div>

it’s an interesting problem, i’ve hacked a quick prototype together, you can see in the networking tab that it only loads on demand. [Re-using geometry and level of detail (forked) - CodeSandbox](https://codesandbox.io/s/re-using-geometry-and-level-of-detail-forked-5x2rub?file=/src/App.js)

an unforseen problem now is that “tiles” that LOD declares as visible have the lowest geometry so you see it flashing through.

i think the solution has to be in vanilla, the LOD implementation could be made just a little bit more intelligent, it mostly needs events so that you can react on the visible state. THREE.LOD doesn’t seem to let us know so there’s only polling.
