Is Light Map is always used as Shadow-map compulsory???
I am actually looking for Light Maps only not shadow-maps… Could you show me one more example like what you explained above where Light Maps are used as Light Maps only but not as shadow-maps. And how to generate those light-maps …??? and how do they look like??
and is there any need that we need to use both shadowmaps and lightmaps together??
A light map is the opposite of a shadow map in how we multiply its value with the incident lighting on a surface to calculate how it is lit. While the dark (0) spots on a shadow map represents parts where we want our baked shadow to subtract (i believe it’s actually multiplied) from the lighting on the surface, the lit spots (1) on a lightmap represent where we want light added to the surface in addition to the incident light.
If we look at your original post:
we can see that when you use your baked map as a light map, the renderer brightens your object interpreting the white areas as lit, while used as a shadow map, the renderer darkens the areas based on how black the image is in the given area.
It sounds like you want to use baked lighting, and baked shadows in combination to simulate the complex lighting in your scene sourced from a series of windows, and the objects in scene that occlude that light.
My personal sugestion would be to use a lightmap to simulate the light in your scene, combined with an ambient occlusion map that will darken your floor where your other object’s shadows would fall.
I’m not too knowledable of a good workflow in Maya to generate these maps, but I’ll ping @PatrickRyan if he knows of a good workflow to generate both maps in Maya, or if there’s a better approach to combining baked lighting and shadows.
@AD_Kar, the issue with using a light map rather than a shadow map is that you really need to render HDR tones for the light map to be useful. A standard 8-bit image is fine for a shadow map, but for a light map, you never get any tones over 1.0. They do mix with the lighting in the scene, so the combination of light map plus punctual light can get you to a value over 1, but needing to rely on a punctual light to get your lightmaps brighter defeats the purpose of the light map, especially when using PBR materials.
I am going to point you to this thread which is a very interesting conversation about how to convert an .hdr light map (saved as an hdr from Maya) and converted to an RGBD format. There are a couple of playgrounds in the thread from @sebavan and @Evgeni_Popov that should give you some information about how to convert an HDR file to an RGBD and still get hdr values in your light maps.
You just need to make sure the light in the scene is actually rendering out HDR values (you can check the render in any image editor) and save your render as an .hdr (or an .exr which will need to be converted to an .hdr) and then use the playground in the thread to convert your image to an RGBD file so it can be loaded as a typical LDR file. This will give you the most control over the lighting in your scene from a high-quality ray-traced source.
This technique is something that I see a need for some investment in for the engine so what you are seeing in the thread is the beginning of the process. Hope this helps clear things up, and you will see the samples in that thread do a good job at illustrating the need for light maps to be HDR.