Baked lights not visible in some meshes in shaded mode but vible in "Baked Lightmap" scene view

I have a strange issue trying to get a baked spotlight light to show on a mesh: it will not at all be displayed on that mesh on Game or Scene-Shaded whilst it displays fine in an adjacent mesh. At the same time if I check it in the “Baked Lightmap” Scene view, it looks fine on both meshes.

This happens both with Unity 2017 and 2018, in the Built-In/Standard Rendering Pipeline.

Here are two pictures to illustrate it:


This is the view as Scene-shaded. There inside hangar is one mesh, the outside of the space station is a different mesh.

The baked light is light-blue and you can see it on the right-hand wall and floor of the hangar but not at all outside.


This is the Scene-Baked Lightmap view. Here you can see that the light has been correctly baked in the lightmap for both meshes.

I’ve been looking everywhere for differences but couldn’t fine any. Both meshes share 2 materials, both materials using the Standard shader in a Metalic setup and in one mesh both of those Materials display the baked light correctly, whilst in the other neither will display it.

Here’s the config for both meshes:


The left one is for the inside area mesh, the other for the outside one.

You can see that they both share 2 out of 3 materials, and changing the StationCenterBeaconsMat.Game material on the outside to just use the Standard shader does not solve the problem.

Here’s the Lighting config:

The Lightmap UVs are generated by Unity and seem absolutely fine in the Lighting settings (and for both meshes only the UV0 comes with the model in the FBX, so UV1 is for certain created by Unity).

I’ve even went and examined in the Frame Debugger to see what goes down to to each shader in the render passes and I can’t really spot any major difference in terms of what gets passed to each shader (same textures, same shader flags).

I have, of course, done the whole Clear Baked Data and manual Generate Lighting (by the way, it works fine when realtime lighting is used) but to no avail.

I’ve pretty much exhausted all venues of investigation I can think of, so I need some help here…

Hello! This is interesting, the baked light should show up on the side of the hangar. Have you tried assigning a simple white material to the exterior and see if the issue reproduces? Perhaps the material that is currently assigned is to reflective, and thus your baked light is not showing up.

Also, could you try baking the scene with the progressive lightmapper? If all that fails, it would be nice to get our hands on the repro scene so that we could investigate.

If I put a Standard white material with white albedo and metallic 0 the lightmap shows fine

If I set metallic to 1 in that material, it doesn’t show at all, even with smoothness 0.

Looking with attention at the bits in the internal area were it shows, it seems to be showing on the non-metalic parts only (landing area paint, non-metalic glue between plates, non-emissive sides of the landing lights).

Using the Progressive Lightmapper gives the same results.

I went and added a Unity cube right next to the outside mesh with the white standard material and the behaviour is exactly the same:

  • It’s illuminated with realtime lighting
  • It’s illuminated via baked lightmap if metallic is anything up to 0.99
  • It’s not illuminated via baked lightmap if metallic is 1 (and in fact from around 0.99 up it starts loosing the lighting from the lightmap). Smoothness value here makes no difference.

I went ahead and created in Unity 2018 a clean test project with just a 3D cube, a camera and a spotlight and I get this exact same effect, even without a fancy skybox and with just clear flags to solid black in the camera and environment to have no skybox and ambient light pure black.

This should be very easy to create but let me know if you need this scene and I can share the project somewhere (it’s a 5MB zip so it won’t upload here).

1 Like