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

Bring back an option to not use atlases in LightmapGI #3734

Closed
mrjustaguy opened this issue Dec 31, 2021 · 3 comments
Closed

Bring back an option to not use atlases in LightmapGI #3734

mrjustaguy opened this issue Dec 31, 2021 · 3 comments

Comments

@mrjustaguy
Copy link

Describe the project you are working on

Large Open World game

Describe the problem or limitation you are having in your project

LightmapGI in 4.0 automatically atlases the textures into a single 16k image. While this is fine for environments that aren't very large, in complex environments this is easily taken up.

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

Bring back the option to make Lightmap textures per mesh, and add Texture LOD support (to save on Memory usage) so that distant Textures aren't as detailed, but close up meshes are as detailed as needed.

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

Return "Generate Atlas" to LightmapGI

To save on memory usage, Stream in Lightmap textures of a given quality as needed based on distance.
Note: This would require Texture Streaming to be implemented which isn't planned for 4.0 afaik.

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?

Lightmaps are Core, and there's no way to change a core functionality easily without tweaking the engine.

@Calinou Calinou added this to the 4.x milestone Dec 31, 2021
@Calinou Calinou changed the title Bring Back an Option to not use Atlases in LightmapGI Bring back an option to not use atlases in LightmapGI Dec 31, 2021
@Calinou
Copy link
Member

Calinou commented Dec 31, 2021

See also #2147.

My understanding is that using an atlas for lightmaps is pretty much always better/faster/more organized than not using an atlas. Godot 3.x supports not using atlases in BakedLightmap because atlases are only supported when using GLES3, not GLES2. Godot 4.0 will not support GLES2, so I don't think there's a point anymore.

@mrjustaguy
Copy link
Author

mrjustaguy commented Dec 31, 2021

True, Atlases are faster, more organized and generally better, until your lightmaps accumulate a total over 16k x 16k worth of pixels, which for really complex scenes can happen, and for such cases, having an option to not use atlases, or use multiple atlases (tho this would be really messy to stream into memory only the bits you need efficiently) is a must, as you want to have only one Baked Lightmap pass, as multiple mixed (Split in multiple scenes and baked separately) will produce artifacts quite often, or at the very least make it really difficult to make the Scenes.

Also Happy New Year everyone! 🥳

@mrjustaguy
Copy link
Author

Closing as the issue was solved by godotengine/godot#61861

@Calinou Calinou modified the milestones: 4.x, 4.0 Aug 11, 2022
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