-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
BakedLightmap atlas size not respected #51741
Comments
The Atlas Max Size property likely defines the smaller dimension only. It could also mean that individual layers are being clamped in size, not all layers as a whole. |
Yes, Right now there isn't any way to limit the total height of the atlas, so if you want to keep images below 2048 in both dimensions you will need to disable atlassing. We could implement multi-image atlases, so instead of a single image for all layers, multiple images are used, but I don't really have the time right now. If anyone is interested, I'll be happy to give guidance on what needs to be changed. |
For reference, support for multiple atlases in BakedLightmap is being tracked in godotengine/godot-proposals#2147. |
I don't understand why multi-image atlases is left behind in a backlog, this is so critically important for proper lightmapping setup with performance in mind. @JFonS What should be done to implement multi-image atlases? Instead of stacking on top of each other to create a single atlas we need to constrain each atlas to fixed width and height, and constantly check whether we fill one out completly? This just screams for an efficient UV packing algorithm... |
@KoxaKoxama JFonS is currently working on rendering features for the As a workaround, you can increase the lightmap texel size on imported scenes to reduce the size of the generated textures. Lighting will probably still look good enough, especially if you only bake indirect lighting. Bicubic sampling (which is enabled by default on desktop) does a good job of hiding the aliasing that can be present on lightmaps. And if you do use fully baked lights, remember that sharper shadows are not always more realistic 🙂 |
@KoxaKoxama There are many things that need our attention and we have to set priorities one way or another, we can't please everyone. Whether you think this is ridiculous or not doesn't really matter, so you can skip that part in future posts on Godot's issue tracker. That said, I did look into this issue a while back, and I made some progress. The only thing preventing larger lightmaps is the fact that the As a quick fix I tried saving a There are two options moving forward:
|
@JFonS There is no need for an implementation of TextureArray saver. When texture atlas size is specified, lightmapper needs to keep texture size as pow2 and try to fill it with as much UV's as it can, and then create another texture and fill it with rest, repeat untill all mesh is done. A perfect middle ground. This could be useful for GPU lightmapper in 4.0 as well, maybe this can uplift priorities a bit. |
As I mentioned, the Note: the master branch has an image size limit of |
Fixed by #58102. |
Not fixed at all. Same error as before Failed determining lightmap size. Maximum lightmap size too small? |
@gdlq See my comment in #58102: #58102 (comment) Edit: Disregard the accidental reopen/close below. |
Godot version
3.4.beta.3 mono
System information
Windows 10
Issue description
BakedLightmap node is not respecting the atlas size as you can see:
Also i remenber in the older version there was an error message that tells you that the size of the uv's were too big, in thet version i haven't see that error anymore.
Steps to reproduce
Bake a scene with 3d models imported with low lightmap texel size (for example 0.01) and light baking as "Gen Lightmaps". Then bake
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: