-
-
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 CPU lightmapper crashes on large scenes #45296
Comments
Backtrace:
To speed up importing this project https://crates.io/crates/godot_image_replacer can be used which resize all images to 1x1 and now project imports in 1 instead 30 minutes. |
I think the OP issue and @qarmin's stack trace are separate issues. I have found a fix for @qarmin's crash, but I didn't manage to reproduce OP's crash. I do remember having some high RAM usage in some scenes, resulting in the OS killing the execution. |
It spams LightmapDenoiser: Out Of memory and printed ERROR: Memory :: alloc_static condition !mem is true. Returned: 0 at core/os/memory.cpp:84 according to task manager my pc still has like 10gb of memory, not sure how accurate that is though. |
Something weird is going on in OpenImageDenoise then. I will see if upgrading it to the latest version gets rid of the issue. |
Thought I would mention this also shows in the build compiled by gcc by akien. |
Added BakedLightmap.use_hdr and BakedLightmap.use_color properties that can reduce the flie size of lightmap texture at the expense of quality. Changed the denoiser to work in a single buffer, reducing RAM usage. Also added the `-mstackrealign` flag in the denoiser compilation for MinGW builds. This flag helped fix a bug in Embree, so I want to see if it will help fix GH godotengine#45296.
Is this still reproducible in Godot 3.4 RC 1 or later? |
I encountered this problem in version 3.4 rc 2. Changing capture_cell_size from 0.5 to 1.0 fixed it |
Related to #54679. @NHodgesVFX Can you reproduce the denoising crash on 3.5beta2, which includes #58102? |
@Calinou I tested it again using 3.5 beta 2 and light map generation with capture off did not crash but the capture generation at 0.5 still crashes. |
@NHodgesVFX did you get multiple baked atlases? No matter what I do it never works as intended, always single atlas with insaine resolution. |
Nope for me it creates a single atlas with the size of 256 x 1024, which is less than the max atlas size of 4096, so that seems to be working for me. Although I am surprised the file has such a small resolution for the TPS demo. |
Godot version:
Godot 3.2.4 Beta 6 Compiled with MSVC
OS/device including version:
GLES3 RTX2080s Windows 10 64bit
Issue description:
While attempting to bake the Godot tps demo, It often crashes at the fixing seems and denoising or the capture step. I can stop the first crash by setting the quality level to low or disabling denoising. The 2nd crash is fixed by turning off capture or setting the cell size to a large value like 25.
I remember reading the godot blog about how the light octree used in the capture setting is inefficient and that light probes would be better for larger levels and reduz confirmed this. The primary issue is the first crash though.
Steps to reproduce:
Minimal reproduction project:
This bug only shows it self on large projects like the tps demo. Most likely due to the scale and amount of meshes to bake. I managed to get it on a test scene with kitbash3d assets as well but cant share due to licensing.
I can link to a zip with the tps demo setup but its large and the changes which I made to the scene are listed above.
The text was updated successfully, but these errors were encountered: