Skip to content

Improve clarity about lod related parameters #10958

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

Open
thibault opened this issue May 22, 2025 · 0 comments
Open

Improve clarity about lod related parameters #10958

thibault opened this issue May 22, 2025 · 0 comments
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository enhancement

Comments

@thibault
Copy link
Contributor

Your Godot version:

4.4

Issue description:

I use ArrayMesh to dynamically create a mesh at runtime.

Now, I also want to create lods with the add_surface_from_arrays method.

My issue is that I don't really understand how to setup the lod parameters.

The lod parameter is a Dictionary. I managed to setup the lod indexes without too much problems, but I don't know about the keys.

The doc says :

the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used.

This is unfortunately quite vague and not really helpful. The problem is that I have absolutely no idead what this value means, and how it should be setup. Is this related to the mesh distance, or something with the pixel density for a given camera fov, or anything else? I'm left with finding values with trial and error, without knowing if it will still work if I change some of the elements of the mesh or the scene setup.

Event after inspecting the code, I don't understand what this value means. If someone could be king enough to provide some insight, I would gladely try to contribute a PR.

Thank you.

URL to the documentation page (if already existing):

https://docs.godotengine.org/en/latest/classes/class_arraymesh.html#class-arraymesh-method-add-surface-from-arrays

@Calinou Calinou added enhancement area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository labels May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository enhancement
Projects
None yet
Development

No branches or pull requests

2 participants