Problem with Instanced Static Mesh lighting in 4.6 preview

Instanced Static Meshes are not lighted correctly when Directional Light is switched to “Static” and Lightmaps are rebuild.

Result seem to be a bit random but can be reproduced in map attached bellow. Also please find a screenshot bellow. There are 3 cubes in an editor view. 2 of them are being normal StaticMeshActors and one cube is a part of Foliage. You should see that instanced cube is bluish instead of grayish in “Detailed Lighting” view mode.

Map attached contains cube used in Foliage with simple custom material. It seem that changing material color (from red to green) will affect the light computed by Lightmass.

[link text][1]

Thanks Esidar, your repro was very helpful!

The engine needs to rescale all of the lighting coefficient data for all instances so they’re in a consistent range, but it seems like we apply the scale to the instances but do not save overall scale range for use when rendering.

I’m going to try to get this fix into 4.6, although it may be too late as we have a release candidate.

BTW if you’re using source code, the fix is here.

Got it! Thanks for the help.