Godot-proposals: Add support for automatic LOD generation

Created on 1 Apr 2020  路  3Comments  路  Source: godotengine/godot-proposals

Describe the project you are working on:
no specific project but evaluating godot over other solutions

Describe the problem or limitation you are having in your project:
Import a mesh but see that godot does nt seem to be capable to generate any lod automatically ("autoLOD")

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
autoLOD :
image
https://docs.unrealengine.com/en-US/Engine/Content/Types/StaticMeshes/HowTo/AutomaticLODGeneration/index.html
how it helps: import a model (whatever the format), godot to generate 1 or more lods :

  • at runtime
  • and/or import time

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
As a 1st implementation, a gdscript only solution would be good enough (no ui/editor):

  • import a model
  • call a gdscript function to generate a LOD of a MeshInstance at a given precision level

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

Is there a reason why this should be core and not an add-on in the asset library?:
A quadratic mesh simplification style algo has to be in core cpp. I have searched and did nt find an asset lib to do generate lod but perhaps I missed something.
Refs:
https://docs.unrealengine.com/en-US/Engine/Content/Types/StaticMeshes/HowTo/AutomaticLODGeneration/index.html
https://docs.unrealengine.com/udk/Three/MeshSimplificationTool.html
https://github.com/sp4cerat/Fast-Quadric-Mesh-Simplification
https://doc.cgal.org/latest/Surface_mesh_simplification/index.html
https://software.intel.com/en-us/articles/3d-modeling-and-parallel-mesh-simplification/

kind

import rendering

Most helpful comment

There should definitely be a programmatic API for this as well, let's not exclude procedural meshes.

All 3 comments

Support for LOD and automatic LOD generation is planned in Godot 4.0.

There should definitely be a programmatic API for this as well, let's not exclude procedural meshes.

The approach for singular meshes I described to reduz was.

  1. have a static vertex array
  2. indexes are changed based on lod
  3. https://github.com/godot-extended-libraries/mesh_lod/tree/master
  4. https://github.com/HungryProton/concept_graph/issues/44#issuecomment-629863488

I have done the implementation of this as a module and as a gdnative code for concept graph.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SpyrexDE picture SpyrexDE  路  3Comments

rainlizard picture rainlizard  路  3Comments

WizzardMaker picture WizzardMaker  路  3Comments

wijat picture wijat  路  3Comments

davthedev picture davthedev  路  3Comments