Shadow Map Questions


#1

Hi guys,

I’ve recently been trying to look in depth at various kinds of mapping used in game engines and I have some questions about shadow maps. Originally I thought these were the maps that had shadows baked into them but I realized that those were light maps which are used for static lighting. What are the six shadow maps in a material editor then? Are these somehow reserved for a particular light in game? Do these correspond to +x -x +y etc orthographic views somehow? If you are baking on shadows from these orthographic views, why not just do it via a light map? My current understanding of shadow mapping is that a scene is basically rendered from a lights point of view as to tell what objects will have that light’s light shown upon it. This process would run every time a frame was rendered out as to allow for lights to move around and objects to move etc. This is why I am confused as to why you can actually assign images to these sections. Can someone please clear up this topic for me?

Thank you in advance :slight_smile:


#2

Your understanding is pretty much spot on.

I’ve always assumed the 6 shadow maps in Lighting are reserved for doing a combined lighting / shadow pass, rather than the traditional lighting, then darken area’s that are in shadow. This combined approach has many advantages:

  • more accurate spectacular highlights,
  • I believe better handling of colored lights and shadows,
  • more accurate blacks.
  • multiple shadows blend nicely,
  • no double darkening of shadowed surfaces

This is because when rendering an area of the material that is not lit, the shader will output mostly no color information, which is more correct than rendering the material as lit, then applying a layer of darkening (the shadow pass) over the top.

… I did some work on this a while ago, my version does what I think Lighting does: Shadows casted on unlit polygons