SceneSwitcher and baked lightmaps

I’m using SceneSwitcher.ts to change scenes. When I cycle between scenes the first time, the light maps look correct. But the second and subsequent times the scenes are loaded, the light maps look very wrong as you see in my picture. Is there a way to ensure light maps are applied correctly?

Original Post on Discord

by user 420944948767227905

Hi, which engine version does this happen with?

That would definitely be a bug

1.1.6

by user 420944948767227905

1.1.6 is hopefully not the engine version - we are currently on 3.7.6-beta ^^

Ah that’s what you asked for last time. 3.7.3-exp. I’ll upgrade and see if it fixes it

by user 420944948767227905

Nope still does it!

by user 420944948767227905

Can you send a bug report with this scene?

You can remove some of the heavier objects too (like the characters)

Here’s a link to the bug report https://drive.google.com/file/d/1QvVgS-NT3QvBHw_9PKcsAk02gHm0FsDJ/view?usp=drive_link

by user 420944948767227905

Out of curiousity: have you tried using the bug report uploader ?

To reproduce, put it in a SceneSwitcher.ts like this:

by user 420944948767227905

You need another scene to switch between of course, but it can be any scene (or the same one duplicated)

by user 420944948767227905

I have used the bug report uploader, but I’m not sure if you are getting them @marcel :cactus: or if it’s easy to link them to the conversations on this forum

by user 420944948767227905

I can’t use it now because I’m in a rural area for my holidays and the internet is very poor.

by user 420944948767227905

Ah i see. If you use it for uploading it’ll automatically create a ticket on our side and attaches the zip - that’s why I’m asking :slightly_smiling_face: I’ll take a look at this tomorrow

Thanks @marcel :cactus: !

by user 420944948767227905

Another issue I noticed with SceneSwitcher is that if you launch the main scene containing SceneSwitcher via the play button it doesn’t detect any changes in linked scenes. I need to trigger a full build.

by user 420944948767227905

I also wondered if my workflow of having ExportInfo in child scenes was correct - we need to be able to test individual scenes as well as all of them together. The example doesn’t have any Needle-specific stuff like ExportInfo in the child scenes.

by user 420944948767227905

The workaround with an extra ExportInfo is a valid way to go yes. You don’t need to have any GltfObject in the subscenes as well - perhaps that’s also why the lightmaps are breaking if all referenced scenes have a GltfObject with the same name (just a guess tho). I’ll take a look at this now