🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Mesh Shaders and Lod

Started by
1 comment, last by JoeJ 1 year, 11 months ago

I've been looking into mesh shaders, and it appears they are basically a sub-mesh Lod system. If you have a single object that is big enough that near and far parts should be shown at different resolutions, then a mesh shader is an appropriate tool to use. Although you could do the same exact thing with a good scene management system, so I don't completely understand the point.

As I understand it, you render a bunch of submeshes and select an Lod version for each one based on distance from the camera. What I don't get is how you would resolve the difference when two adjacent submeshes use different levels of detail?

10x Faster Performance for VR: www.ultraengine.com

Advertisement

Josh Klint said:
What I don't get is how you would resolve the difference when two adjacent submeshes use different levels of detail?

A very nice solution is shown in UE5: They ensure there never is a mismatch across boundaries at all, so no need for stitching to prevent cracks.

To make this work, their hierarchy of surface clusters is generated in a way so boundary edges become internal edges in the parent cluster.
This way the former static boundary edges can be reduced in a higher level of the hierarchy.

There is some ‘Nanite Deep Dive’ video with Brian Karis on YouTube, explaining things in detail.

Personally i'm very impressed by this idea and solution. I'd say it's the largest step forwards in rendering of a decade.
However, i'm not yet sure if it will be adopted by the entire industry, as it has some drawbacks:

Raytracing APIs are not flexible to do this at all. The brilliant experts at NV and MS obviously assumed the classic ray tracing idea from the 70's is exactly what we need for games. <:(
Thus we need to choose: Either we solve LOD, or we use ray tracing. Or we solve LOD just for rasterization, and fall back to low poly proxies + discrete LOD for RT, like Epic does.

Making preprocessing tools to generate LOD hierarchies is hard and comes with new issues and artifacts.

Using LOD mainly to achieve higher detail increases costs of content creation and data sizes. Not sure about benefit / cost ratio.

To me it feels like an extremely difficult and frustrating topic. Especially ray tracing acts like a coffin nail to any continuous LOD solution we might come up with.
The longer you can postpone this, the better, imo.
Personally i'm interested to see first UE5 games. Can they utilize the new potential in production at all? Or will other engines, staying at traditional discrete LOD, still compete well?
Will hell freeze over and we get flexible RT in less than 10 years?

Believe me, i truly regret having already invested so much time into continuous LOD myself.
On the other hand, it's really an urgent problem to solve.

Josh Klint said:
If you have a single object that is big enough that near and far parts should be shown at different resolutions, then a mesh shader is an appropriate tool to use.

It's useful, but no solution yet. You still need a higher level system to process a hierarchy of detail levels, which is the real problem but independent from rasterization details.
That's why Epic can draw triangles in 3 ways: Traditional, mesh shaders, and software rasterization.

The topic is really broad, raising some more questions:
Storage problem: Can we really build our worlds from instances of a small set of building blocks, like Epic proposes? This does not work for large but natural terrain, where everything is unique and connected without seams.
Abandon triangles? If we have high detail everywhere, point splatting becomes faster than complicated triangles. Which changes everything we're used at.
Dynamics: Can our system also implement deformation and destruction?
On client generated procedural worlds: No longer possible because LOD preprocessing is offline?

… really a deep rabbit hole : )

This topic is closed to new replies.

Advertisement