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

Change Mesh Instance Lightmap Scale to a Decimal Multiplier #9117

Closed
WickedInsignia opened this issue Feb 18, 2024 · 1 comment
Closed

Change Mesh Instance Lightmap Scale to a Decimal Multiplier #9117

WickedInsignia opened this issue Feb 18, 2024 · 1 comment

Comments

@WickedInsignia
Copy link

Describe the project you are working on

Graphics-intensive demo scenes

Describe the problem or limitation you are having in your project

It can be very useful to define each individual mesh's scale in the lightmap. This allows for large faraway meshes with less demand for lighting quality to take up less size in the lightmap.
Godot's only method of doing this is through a handful of multipliers (1x, 2x, 4x, 8x) per Mesh Instance:
GodotMeshGIPrompt

These multipliers are very limited and unpredictable, especially since they're based on an arbitrary texel definition in the respective mesh's Import dialogue.
These multipliers also scale up rather than down, which completely opposes how artists usually utilize this type of feature (scaling down lightmap size on a few specific meshes).

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

Unity uses a decimal multiplier for each mesh based on the global Texels Per Unit scale:
Unity_ScaleInLightmap

If you have Texels Per Unit set to 40, that means you have 40 texels per meter (since 1 Unity unit = 1 meter). If you set an individual mesh's Scale In Lightmap to 0.5, that is reduced to 20 texels per meter for that mesh. If you increase it 2, that is increased to 80 texels per meter.
It's a very efficient and easy-to-understand system.

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

  • Remove the option to set texel scale in the Import dialogue. This is not needed if a mesh's lightmap scale can be set in its properties.
  • Change the Lightmap Scale setting in the Mesh Instance properties to use a decimal multiplier based on a global Texels Per Unit defined in Lightmap GI.

This proposal is designed to compliment #9116

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

Will be used often.

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

Core functionality.

@Calinou
Copy link
Member

Calinou commented Feb 18, 2024

Thanks for the proposal! Consolidating in #3233.

(For reference, "Remove the option to set texel scale in the Import dialogue. This is not needed if a mesh's lightmap scale can be set in its properties." is already tracked in #9116.)

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