Unity 4 lightmap + normal map

In the Unity 4 tech blog it says :

I think technique mentioned above is talking about Directional Lightmapping… is it not? If so , this has been in Unity since 3.5x and it is something that is not new for Unity 4.

If this is not the same technique , then I am not sure where and what it is exactly.

It seems like when it says normal map is “considered” when baking the lightmap, resulting baked maps should be somewhat different than previous 3.5 version if used properly. So far I don’t know where to look for this magic option.

Please correct me if I am wrong.

Anyone?:face_with_spiral_eyes:

No, it’s separate from Directional Lightmaps.

It means that the normal maps are exported to Beast and Beast interprets them properly as per-pixel normal direction. It will always happen, as long as your material has a normalmap slot called _BumpMap, like all the normal-mapped built-in shaders do. So if the lightmap’s resolution is high enough, you will see lighter and darker areas depending on how the normal is pointing relative to all incoming light.

Of course if your lightmap resolution isn’t very high compared to the detail in the normal map, so e.g. one lightmap texel covers 4 bumps in the normal map - you won’t see any variation there, because one lightmap texel can’t show that.

Admittedly it’s a very small addition to lightmapping - I’m not sure why it got it’s own paragraph.

Directional Lightmaps are a different beast, so to speak. They store the dominant light incoming direction, so it’s possible to shade with a per-pixel normalmap at render time, not at bake time. Here, even if one lightmap texel covers several bumps in the normalmap, it will still be possible to shade them darker or brighter relative to the light, because we have stored where the light came from at this lightmap texel.

is this the same thing? Does unity know that the shader with normal map is already baked into the lightmap, so we see only the information from the light map, or the combination of the material (with diffuse + normal) + the light map?

1 Like

Hi MiamiNoire,

a light is either baked or not, so it won’t contribute double.
(In case of an auto-light only the bouncelight is baked. )