How LOD works ? is there library or it's a Technique?

in open worlds games when you close objects, they show more detail and the far objects are have low quality and when we close the objests they show with good quality

i searched about it and i find “LOD” (level of details)

how does it works ? how must implement it ? is there any library for it ?

tessellation/geometry/mesh shaders for dynamic vertex lod. its not available on the web. you can do premade LOD models offline and just load them at different distances, much like a nextjs or gatsby image plugin. you can also do limited cpu lod for terrain, since its so impactful its worth the cost. also, compute shaders can generate geometry now , but the bandwidth is gonna be less than an actual geometry shader, and its probably not approachable anyway so dont worry about it. for texture/fragment shader lod, thats just done automatically though mipmaps. also, i’ve seen a compute shader implementation for variable rate shading, so thats possible on the web now. basically just like… when it does anti aliasing, it does it in chunks, but you need to define the chunking in a compute shader. anyway, probably some blender addon or something that’ll make lod variants for you if you really want

1 Like

You can look at the documentation:

Btw did u see nvidia has a micromesh extension for gltf? Newly released i think. Supposedly the micromesh vertex info is encoded into some topologic data structure (sounds a lot like nanite) . The data in the gltf is supposed to be linked with fallback to textures so renderers that dont/cant use it can still work. Prob could work with babylon native’s vulkan and dx12 backends with some small changes to the shader store and the native webgl shim.

I didn’t know about it, but according to their explanation, it seems this structure is optimized for use with a ray tracer?

i think it’s just runtime gpu decimation, so any global illumination technique would benefit. my takeaway was that its a sdk/library to use mesh shaders that make use of an asset with pre-encoded topology, just like nanite. I think its kind of like, engine agnostic nanite with gltf and usd extensions. I suppose mesh shaders are not new and have already been crazy fast, like the asteroids demo from 2018 had 3.5 trillion tri’s lol. I was playing with zig yesterday and got a meshlet scene to ~500m tris at 60 fps. i tried compiling a micromesh scene but kept getting hlsl errors. I assume that the micromesh will be even faster since the topology is pre-encoded. What really excited me was the gltf extension

1 Like