Preferred Usage Of UseLightmapAsShadowMap

Yo @Deltakosh and @sebavan… I need some advice on setting up the default usage of baked lightmaps from Unity exporter…

Basically material.useLightmapAsShadowmap… TRUE OR FALSE.

From my experiments… if set to false… the lightmap color is added to the base color in the shader… So in that case you have to setup the light.lightmapMode accordingly so that same lightmapped texture does get OVER colored.

If i set to true…its multiplied… so it looks like i have to set the scene.ambientColor = something like grey or white and if the material has a lightmapTexture on it… i set material.ambientColor = white … overriding what the material.ambientColor was before… probably black if you didnt change the material.ambientColor explicitly .

So whats the preferred way to use lightmaps and what is the best settings for scene.ambientColor and material.ambientColor when using lightmaps ???

Well your findings are correct :slight_smile:

To your question, you decide :slight_smile: There is not a one size fits all solution here

Well then i will probably go with UseLightmapAsShadowMap = true… That way there is LESS mucking around with light.lightmapMode

1 Like