Editor Lightmaps look nothing like Runtime lightmaps

I resorted to baking directly in Playcanvas as it seemed like quicker iteration times and far less complicated than external software however, although I am almost happy with my editor tests, when I run the game it looks nothing like the editor.
The lightmaps are set to not be affected by the skybox or ambient but as you can see the two are wildly different. Is this expected? Any ideas how to solve?

Not sure what the problem could be but looks like a bug.
Engine v1 or v2?
Try to strip out as much as possible from the scene to see what breaks it … some light type? Shadow type?

Engine V2. Most of the lights are omnis with the following settings. Does shadows seting matter that much for lightmaps if they arent runtime shadows?



You can see that even in the editor screenshot some parts using exactly the same material appear pure white in the editor.

Some shadow settings matter, as they’re used for baking of the light.
Any warnings in the console when you launch it? Try with debug engine please.

I found something. I had other lights as children in a disabled entity which had their Affect Lightmapped attribute checked. Although these seemingly werent noticeable in the editor I guess there must be a different bake happening somewhere which includes ALL lights with that parameter (disabled or not).
Could that be the case here?
Once I switched off Affect Lightmapped in these other disabled lights the runtime version looks MUCH closer now although I am still left with the following anomalies…

It seems that hidden/disabled objects are affecting the bake (but only seen during runtime)
For example if I set these disabled objects to NOT affect lightmaps (Cast lightmap shadows = false) the runtime lightmaps look fine. (Note…they ALWAYS look fine in the editor after auto bake)

are those objects permanently hidden at runtime, or do you hide them from script or similar?

Yeah, it just looks like a bug. If you’re not running it with debug, try using debug and vice versa. The game I made would make the player fall through the floor slowly if I didn’t use debug.

During runtime those objects (can) get enabled by script if the player performs certain actions. Its basically that different parts of the level that get enabled/disabled depending on how the player interacts.

At the start of the game they (the objects parent node) are simply disabled in the editor.

1 Like

I tried to replicate this but for me it seems to work. I started with the empty project (plane & cube), set up baking. Added omni light that is baking as well. Then I added another cube, tried to disable the entity, the render component, also tried model component, and in both Editor and launcher it all works fine.

Are you able to put together a simple repro like this?