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

Add a LOD bias setting for each automatic mesh LOD level #11188

Open
Sandstorm-mt opened this issue Nov 19, 2024 · 1 comment
Open

Add a LOD bias setting for each automatic mesh LOD level #11188

Sandstorm-mt opened this issue Nov 19, 2024 · 1 comment

Comments

@Sandstorm-mt
Copy link

Describe the project you are working on

3D FPS Parkour Slasher

Describe the problem or limitation you are having in your project

I cant set set LOD bias for each LOD.

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

This feature is needed for achieving better performance on old systems.

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

Add a switch between default LOD bias and configuration for each LOD.

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

No.

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

Yes. It`s a necessary feature, i presume.

@Calinou Calinou changed the title Please, add a LOD bias setting for each LOD Add a LOD bias setting for each automatic mesh LOD level Nov 19, 2024
@Calinou
Copy link
Member

Calinou commented Nov 19, 2024

When you import a 3D scene, LODs are generated using meshoptimizer. This library not only creates the LOD meshes, but it also assigns distance thresholds switching LODs based on the LOD's polygon count and the pixel count taken by the object on screen. You can bias the LOD level that is displayed globally using the Rendering > Mesh LOD > LOD Change > Threshold Pixels project setting or on a per-GeometryInstance3D basis using the LOD Bias property.

The exact metric used to determine LOD distance thresholds is quite complex, and it's unlikely that manually adjusting the LOD levels will lead to a better turnout (while needing a lot more complexity in the codebase, along with the list of exposed import options).

Can you show some screenshots of meshes where LODs are not being switched at appropriate times? Using the wireframe debug draw mode can make LOD level changes easier to see.

Remember that if you need more control over LODs, you can always use manually authored LODs using visibility ranges.

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

2 participants