godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.34k stars 21.06k forks source link

LODs are not working when using mesh from GridMap #88656

Open joyhillgames opened 8 months ago

joyhillgames commented 8 months ago

Tested versions

Reproducible in 4.0 and higher. Not tested below 4.0 version.

System information

Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated AMD Radeon RX 6700 XT (Advanced Micro Devices, Inc.; 31.0.12027.9001) - AMD Ryzen 7 5700X 8-Core Processor (16 Threads)

Issue description

Levels of details and visiblity range (HLOD) stops working when mesh is used from the GridMap/MeshLibrary.

Steps to reproduce

  1. Create empty scene with Node3D as root.
  2. Add MeshInstance3D and give it any mesh.
  3. Under GeometryInstance3D change LOD Bias and Visibility Range End value. LODs and HLODs are working here when zooming out.
  4. Export scene as MeshLibrary
  5. Create new scene, add GridMap and assign previously created MeshLibrary for GridMap.
  6. Place object from GridMap to the scene. LODs and HLODs are not working anymore when zooming out.

Minimal reproduction project (MRP)

N/A

smix8 commented 8 months ago

LOD is part of the MeshInstance3D / GeometryInstance3D. After export such a node does no longer exist, because only the mesh resources, collision shapes and navigation meshes are exported, not the nodes.

The GridMap uses a MeshLibrary with MultiMeshInstances per Quadrant, so there is no individual LOD or individual node features.

NuclearPhoenixx commented 6 months ago

LOD is part of the MeshInstance3D / GeometryInstance3D. After export such a node does no longer exist, because only the mesh resources, collision shapes and navigation meshes are exported, not the nodes.

The GridMap uses a MeshLibrary with MultiMeshInstances per Quadrant, so there is no individual LOD or individual node features.

Thanks for the explanation. I was wondering why visibility range was working with individually placed MeshInstances but not the GridMap instances. Is there any way to do something similar using the visibility range on a quadrant or something for the GridMap?