godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.15k stars 97 forks source link

Godot 6 Feature - Option for a Nanite Style LOD Rendering? #8560

Closed MangoDragonHub closed 11 months ago

MangoDragonHub commented 11 months ago

Describe the project you are working on

I am currently not working on a project that requires this.

Describe the problem or limitation you are having in your project

I know this is WAY far in the distance and I understand that Godot as a project is designed for Indie to AA Devs, but with multiple solutions being either in the works or maturing to allow for seamless LOD generation without pop-in or degradation of mesh quality while still being low on CPU resources might be a cool idea. This is mainly designed for mid-ranged to high-end consoles, desktops, and mobile devices.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I'm not a graphics programmer so I don't 100% understand the under-the-hood elements of this but from how Unreal Engine creates a virtual geometry system that allows highly dense meshes to be split up into multiple colored clusters. As the camera moves further away from the geometry, the clusters where geometry is filled get more spaced out, allowing less of the object-to-task resources to render while at the same time still having the same geometry from the user's DDC of choice.

That might be from Unreal's way of doing things but over the past few years, graphics programmers have been doing research and finding similar implementations to add to their own game engines and other commercial game engines like Unity. I think this would be a benefit for game artists since this research would show how to optimize this solution further for other solutions and make for less time to go into tools like Blender to heavily decimate or retopologize models. We still need to make our game models compatible with this format of rendering so the classic format of generated Auto-Lod should still be available for regular users.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

I don't know much about technical solutions Unreal uses, it's probably in their source code showing how they were able to accomplish that feat. However, I have been keeping an eye out on indie developers who are trying to replicate a similar process but executing it differently. There is this guy named Chris Kahler who's working on a solution called NanoTech where he uses Octrees to get the virtual geometry needed to try and minimize draw time and CPU calls when rendering boatloads of high-end geometry in addition to Virtual Texture support.

Here are some video links that might be helpful. Unreal Nanite Unity Nanite Solution

I can't speak about how it should be implemented via C/C++ but from a user perspective using the standard Godot UI, in the import Tab when you import a mesh from your DCC tool of choice in your general settings it should be a drop-down menu allowing that mesh to be rendered a quote on quote "Nanite mesh" with it having certain guidelines in order it be used in the editor. That can probably be highlighted in the Godot Docs for users to know ahead of time so it would be easier to import objects.

If this enhancement will not be used often, can it be worked around with a few lines of script?

There's is a reason why I suggest this feature being part of Godot 6 or later. This feat is very large in scope unless you have the manpower and donation funds to get it to work.

Is there a reason why this should be core and not an add-on in the asset library?

Would a GD-Extension count as core? If not, I think this might be a core feature since this is baked into the rendering process when you import meshes into the scene.

AThousandShips commented 11 months ago

Sounds like a duplicate of:

YuriSizov commented 11 months ago

Yes, indeed. Let's consolidate.