Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MeshInstance3D - Auto LOD Issue #71031

Closed
Tracked by #57416
Platinguin opened this issue Jan 7, 2023 · 4 comments
Closed
Tracked by #57416

MeshInstance3D - Auto LOD Issue #71031

Platinguin opened this issue Jan 7, 2023 · 4 comments

Comments

@Platinguin
Copy link

Platinguin commented Jan 7, 2023

Godot version

4.0.dev beta 10

System information

Windows 10, Vulkan

Issue description

The LOD seems to swap to a lower resolution when you come really close to the object. If you look towards the center of the bounding box, it swaps to the correct lod again. (this issue was not present in Godot 4.0 beta 2)

video showing the issue:
https://www.youtube.com/watch?v=LL2B9NABJvs

Steps to reproduce

  • Import the project.godot in the "AutoLod Bug" folder
  • Edit the Project
  • Observe the MeshInstance in the opened scene
  • Move closer and further away with the camera
  • Look towards the center of the bounding box or to the edge of the bounding box
  • Notice the LOD is not switching correctly

Minimal reproduction project

AutoLod Bug.zip

@TokisanGames
Copy link
Contributor

Set lod_bias to 1 or higher like 5-30. 0.2 forces the lowest resolution mesh much of the time. When you have the camera much closer to the object than the dimensions of the object and you're forcing the LOD to the lowest resolution, you're going to get odd results. 1 or higher will expand your LOD0 radius. Or test with objects about the same size as the camera field of view (eg not trees).

https://docs.godotengine.org/en/latest/classes/class_geometryinstance3d.html#class-geometryinstance3d-property-lod-bias

@Platinguin
Copy link
Author

0.2 is just a little axxagerated to highlight the issue. The issue is that when I'm inside the bounding box or very close to the object, it should be on lod0 or no lod. When I move back, outside the bounding box it seems to swaps to lod0 once. (it's somehow dependend on where you look at, possibly towards the object center, which is not always good if you have very concave objects) When I'm increasing the value to 1 or 1.5 the issue is still present, it's just pushed back. If the entire object is inside the camera view frustrum, it seems to work.

@roalyr
Copy link

roalyr commented Feb 13, 2024

This addresses the issue: #88273

@clayjohn
Copy link
Member

Fixed by #79590

@clayjohn clayjohn added this to the 4.3 milestone May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants