godotengine / godotengine/godot-docs

Improve clarity about lod related parameters

Open
#10,958 0 comments 0 reactions 0 assignees View on GitHub
area:class reference enhancement
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

**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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.