Can't bake lightmaps

Hi everyone, new here, just run into Flax last week and enjoying it very much!

First question:
I have the “Bake lightmaps” command greyed out in the Tool menu.
I set Graphics Settings > Post Processing > Global Illumination > Mode to None (but I also tried the other two, just in case).
What am I missing?

Could you post a screenshot? The only time I get that button grayed out is when the lightmaps are already baking.

We have some docs about lightmapping here: Lightmapping | Flax Documentation

Hi, thanks for answering!
Here’s the screenshot.
As you can see: I set Scene Static Flag to “Lightmap” and it recursively applied it to all the objects in the hierarchy (nice!).
The test room and the Suzanne head have their own Lightmap UV. The knight doesn’t have one (i get that skinned models can’t have one, right?). There’s also that Sphere in the right corner, a Basic Model grabbed from the Toolbox panel. I don’t know if these primitives come with a Lightmap UV.
Anyway, the editor didn’t warn me about missing UVs, so I guess it should bake anyway and apply the lightmaps wherever it can, so only on object that do have a LighmapUV, right?
Is there some other flag I should check out?

Hmm. Maybe create a new scene and see if you can bake lightmaps in it? I also see that you have the option to bake scene data still available. Maybe if you try that, it’ll bake the lightmaps.

As for the UVs, GI, etc., I can bake lightmaps without touching any of that, and it still works. I’m unable to reproduce your issue.

What you mean by this?

Above the Bake lightmaps button, there’s a button to bake scene data.

No luck.
Also another strange behaviour: I can’t see the SDF being generated (in the debug view the geometry is just the same as the original) even thou the size and filesize are reported.
I have a clue: something is wrong in my pc configuration, maybe graphics drivers not up-to-date? Notice thou that the requirements are fulfilled.
I think so because also the tech demo doesn’t work as expected, with no GI showing up while, as a proof, Flax is working fine on my pc at the office.

While I’m here asking: are there any recommendations for exporting geometry? File formats, vertex count, triangulation, non-manifold, etc…?

Hello, I am also confused about baking lightmap, I setup a simple scene with a floor and a cube and 2 point lights (one blue and one red) and I set all lights and objects with lightmaps flags, it seems to do something with my rtx4060 during baking however the lightmaps are all gray with no shadows or anything or tinted light , am I missing something ?

Dunno.
For me it turned out that my home GPU card doesn’t meet the requirement for Baking lightmaps and also for showing realtime SDF global illumination. (IIRC gpu must be RTX)
For such a nice tidy engine, I found those requirements too limiting. At least if it was possible to bake with CUDA or good old CPU…

I am running a rtx4060 12GB so I don’t think the graphic card is an issue, also I can run locally StableDiffusion so my CUDA drivers are up to date, whatever I choose compress mipmaps or not, I am getting those 3 gray textures which are counting for 1 lightmap according the logfile, so can someone help and advise on what could be wrong?

I am pasting my logfile after pressing the bake lightmap button

[ 00:06:00.109 ]: [Info] Changing editor state from FlaxEditor.States.EditingSceneState to FlaxEditor.States.BuildingLightingState
[ 00:06:00.109 ]: [Info] Thread ‘GI Baking’ ID=0x2edc started with priority Normal
[ 00:06:00.109 ]: [Info] Start building lightmaps…
[ 00:06:00.110 ]: [Info] Lightmaps baking step CacheEntries time: 32400s
[ 00:06:00.117 ]: [Info] Scene ‘Scene’ quality: 10
[ 00:06:00.117 ]: [Info] Lightmaps baking step Initialize time: 0s
[ 00:06:00.137 ]: [Info] Lightmaps baking step CacheEntries time: 0s
[ 00:06:00.158 ]: [Info] Lightmaps baking step GenerateLightmapCharts time: 0s
[ 00:06:00.158 ]: [Info] Scene ‘Scene’: building 1 lightmap(s) (2 chart(s) to bake)…
[ 00:06:00.178 ]: [Info] Lightmaps baking step PackLightmapCharts time: 0s
[ 00:06:00.205 ]: [Info] Lightmaps baking step UpdateLightmapsCollection time: 0s
[ 00:06:00.226 ]: [Info] Lightmaps baking step UpdateEntries time: 0s
[ 00:06:00.309 ]: [Info] Rendering 1690 hemispheres in 1 bounce(s) (merged: 1792)
[ 00:06:00.312 ]: [Info] Lightmaps baking step GenerateHemispheresCache time: 0s
[ 00:06:00.554 ]: [Info] Saving assets cache to ‘D:\flax/projects/MyProject2/Cache/AssetsCache.dat’, entries: 169
[ 00:06:00.852 ]: [Info] Importing texture from ‘’. Options: Type: HdrRGBA, IsAtlas: false, NeverStream: false, IndependentChannels: true, sRGB: false, GenerateMipMaps: true, FlipY: false, Scale: 1, MaxSize: 8192, Resize: 8192, PreserveAlphaCoverage: false, PreserveAlphaCoverageReference: false, SizeX: 0.5, SizeY: 1024
[ 00:06:01.579 ]: [Info] Texture imported in 727 ms
[ 00:06:01.579 ]: [Info] Creating package at ‘C:\Users/xpuser3/AppData/Local/Temp/c1d2f529-4218-8f50-17e3-88a4b6630c77/72174d924b2e24b3ebd3a0b47e4c6dad.flax’. Silent Mode: false
[ 00:06:01.597 ]: [Info] Reloading asset FlaxEngine.Texture, 95685d6e440f7f66346cf99daaf6add2, D:\flax/projects/MyProject2/Content/SceneData/Scene/Lightmaps/Lightmap00-0.flax
[ 00:06:01.599 ]: [Info] Asset ‘D:\flax/projects/MyProject2/Content/SceneData/Scene/Lightmaps/Lightmap00-0.flax’ imported in 0.75s! ID: 95685d6e440f7f66346cf99daaf6add2, TypeName: FlaxEngine.Texture, Chunks Count: 11
[ 00:06:01.599 ]: [Info] Importing texture from ‘’. Options: Type: HdrRGBA, IsAtlas: false, NeverStream: false, IndependentChannels: true, sRGB: false, GenerateMipMaps: true, FlipY: false, Scale: 1, MaxSize: 8192, Resize: 8192, PreserveAlphaCoverage: false, PreserveAlphaCoverageReference: false, SizeX: 0.5, SizeY: 1024
[ 00:06:02.327 ]: [Info] Texture imported in 728 ms
[ 00:06:02.328 ]: [Info] Creating package at ‘C:\Users/xpuser3/AppData/Local/Temp/c1d2f529-4218-8f50-17e3-88a4b6630c77/7ca180c74f1f0d894ba4498e0a174689.flax’. Silent Mode: false
[ 00:06:02.344 ]: [Info] Reloading asset FlaxEngine.Texture, 4f8916024a33ce6006c954a9b482789f, D:\flax/projects/MyProject2/Content/SceneData/Scene/Lightmaps/Lightmap00-1.flax
[ 00:06:02.345 ]: [Info] Asset ‘D:\flax/projects/MyProject2/Content/SceneData/Scene/Lightmaps/Lightmap00-1.flax’ imported in 0.75s! ID: 4f8916024a33ce6006c954a9b482789f, TypeName: FlaxEngine.Texture, Chunks Count: 11
[ 00:06:02.345 ]: [Info] Importing texture from ‘’. Options: Type: HdrRGBA, IsAtlas: false, NeverStream: false, IndependentChannels: true, sRGB: false, GenerateMipMaps: true, FlipY: false, Scale: 1, MaxSize: 8192, Resize: 8192, PreserveAlphaCoverage: false, PreserveAlphaCoverageReference: false, SizeX: 0.5, SizeY: 1024
[ 00:06:03.070 ]: [Info] Texture imported in 725 ms
[ 00:06:03.070 ]: [Info] Creating package at ‘C:\Users/xpuser3/AppData/Local/Temp/c1d2f529-4218-8f50-17e3-88a4b6630c77/a3d0a8944870fc4360ebf6bdd95772dc.flax’. Silent Mode: false
[ 00:06:03.088 ]: [Info] Reloading asset FlaxEngine.Texture, bee6d3fe4a5f49e2a8561abc0c55654b, D:\flax/projects/MyProject2/Content/SceneData/Scene/Lightmaps/Lightmap00-2.flax
[ 00:06:03.089 ]: [Info] Asset ‘D:\flax/projects/MyProject2/Content/SceneData/Scene/Lightmaps/Lightmap00-2.flax’ imported in 0.74s! ID: bee6d3fe4a5f49e2a8561abc0c55654b, TypeName: FlaxEngine.Texture, Chunks Count: 11
[ 00:06:03.090 ]: [Info] Building lightmap finished! Time: 2s, Lightmaps: 1, Entries: 2, Hemicubes rendered: 1690
[ 00:06:03.090 ]: [Info] Lightmaps baking step RenderHemispheres time: 3s
[ 00:06:03.092 ]: [Info] Thread ‘GI Baking’ ID=0x2edc exits with code 0
[ 00:06:03.092 ]: [Info] Changing editor state from FlaxEditor.States.BuildingLightingState to FlaxEditor.States.EditingSceneState

Lightmaps in Flax are missing some functionalities such as shadow, ao, and direct lighting baking. They contain only indirect lighting (as GI) which usually is very diffuse. We should improve lightmaps tool at some point to be up to the with the current graphics tech capabilities in games.

1 Like

I see , hope to see also a way to have occluders and occludees, like available on UNITY, for optimization and draw geometries that can only be seen depending on the position and orientation of the camera, so far I cannot see such of feature in the engine however I am not sure if there is such of optimization already in the engine behind the scene :slight_smile:

Oooh i was wondering why lightmap seems odd. Also it seems sky occlussion also not calculated isn’t?

Yes, lightmapping from the documentation seems to show some screenshots with shadows and very saturated direct light baking as far as I can guess so naturally I was expecting to see such of similar lightmaps when I tried…so at the moment, I guess the shadow flags to LIGHTMAP / STATIC does not really do anything, right?

Say do you have a roadmap of what kind feature the lightmap baking system will have?

Some Flax Humor…Have not had to bake the lightmaps yet but once I did.

image

:rofl: :rofl: :rofl:

1.7.6 this is constantly happening. To be honest since the GI update I have not had to bake lightmaps until now that I am seeing oddities in the terrain rendering and was wondering if it was a lightmap bug. Still not sure what it is.