Home Technical Talk

Shadowsmaps - What are they?

polycounter lvl 12
Offline / Send Message
Ace-Angel polycounter lvl 12
Heya peeps,

I'm not sure which category I should file this question under, but here goes nothing.

Quick question, what are shadowmaps?

I have been reading up on some papers, and alot of them mention on how for 'realistic' looking models in terms of shaders, looks, etc need to relay more information FROM the shadowmaps rather then the Lambert, and that apparently, most models and games, which use lambert are 'wrong' since they are too 'perfect' in terms on how they cut the light in half directly, especially on curved surfaces.

Which got me thinking since I thought shadowmaps are another name for AO or Lightmaps, but apparently they're not?

Also, this raises another question for me, are Lambert terms wrong in general since they don't exist in nature as I read? Would this mean that a half lambert with an exponent control be more 'natural'?

Also, what is the capital of Norway?

Cheers!

Replies

  • Stromberg90
    Options
    Offline / Send Message
    Stromberg90 polycounter lvl 11
    I only know about shadow maps from lights and I think that is where the shadows are saved to a image, than it's then projected from the light onto the scene like a decal.
    (You might be talking about something else)

    Lambert can be useful I think, but say I was doing a realistic rendering I would never use it(Long since I did that though)

    The two things above I don't really know enough about to answer correctly, but the capital of Norway is Oslo ;)
  • ahtiandr
    Options
    Offline / Send Message
    ahtiandr polycounter lvl 12
    If you want to get real realism by that I mean real light calculations in 3d then you should use special shaders like mia material in maya.

    "The mia_material primarily attempts to be physically accurate"...

    you can read more here about mia material and what it does :
    http://wiki.bk.tudelft.nl/toi-pedia/MIA_Material_-_Background_Information

    Max arch viz materials should be the equivalent
  • gray
    Options
    Offline / Send Message
    Ace-Angel wrote: »
    Heya peeps,

    Quick question, what are shadowmaps?

    Also, what is the capital of Norway?

    what are shadow maps you say? :poly122: you dare speak such blaspheme! :)

    well i'm not sure how technical you want to get. and i'm not sure how accurate i can get depending on how technical you want to get... but shadow maps form what i understand are basically a depth buffer image taken from the point of view of a non-physical light source into the 3d scene. like a spot light which is just a point in space that shades each object individually without ray casting. what ever is occluded from the point of view of the light does not receive a light contribution in the final rendered image. so if there is one light in a scene the occluded areas would be black.

    shadow maps were a technique used before raytracing was fast enough to light scenes for films. and i suppose it is blazing fast to use in real time rendering, alto i have no experience with implementing something like that. its a map that can be saved to disk just like you can save a z-buffer image to disk.

    AO and Light maps are definitely different from shadow maps. i'm not sure what graphics papers your reading but i assume that perhaps they mean that if you had lights with shadow maps in a scene then the diffuse shading would look more realistic then if you had the same lights without shadow maps. ie, the occluded areas would be darker and look more natural. that's just a guess tho.

    also congratulations on reading graphics research papers :thumbup: regardless of what they are about. keeping up with research gives you a giant imaginary hammer to clobber your foes with...

    and to answer your second question the capital of norway is is a very small half man half fish creature that lives in a slightly oblong magnetic sphere on the tip of the eiffel tower.
  • Adam L. Gray
    Options
    Offline / Send Message
    Ace-Angel wrote: »
    Also, what is the capital of Norway?

    I know this, Africa! Yurrs, winrar to me! :poly122:

    On a more serious though still low on competence note, as I don't know that much about tech stuff and shaders in general:

    All I know, is that there are multiple ways to render AO, but that it's basically shadows rendered based on angles and whatnot, lol. Light-tracer in max seems to cast rays and act more like normal ray-traced shadows though, bombarding with light from all directions. It can also include bounces and bounce-colour. With the addition of course that it creates shadows where surfaces meet and bend at an angle.

    Lightmaps, like the ones in UDK however seems not to only store shadows, but also light direction from what I managed to figure out myself so far.

    As for the term shadow-map in general, I always thought of that as a collection of different shadow-maps (AO and Lightmaps for example). But as you mention, there might be more to it. That being said, it wouldn't be very surprising if it has different meanings to different people.
  • gray
    Options
    Offline / Send Message
    @Adam L. Gray

    unfortunately no. shadow maps are a distinct well defined entity. they are not open to your interpretation. they are distinct from other lighting and shadowing models. a lack of information will not change that. there are many sources where you can find explanations of what shadow maps are and how to use them.
  • iniside
    Options
    Offline / Send Message
    iniside polycounter lvl 6
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    I only know about shadow maps from lights and I think that is where the shadows are saved to a image, than it's then projected from the light onto the scene like a decal.
    (You might be talking about something else)

    Lambert can be useful I think, but say I was doing a realistic rendering I would never use it(Long since I did that though)

    The two things above I don't really know enough about to answer correctly, but the capital of Norway is Oslo ;)
    Interesting, so in theory, Lambert is helping you cover the 'buffer' issues on curved models so that the shadows look smooth, hence why in theory, Lambert is the simplest hack?

    At least, that's what I hope I understood.
    ahtiandr wrote: »
    If you want to get real realism by that I mean real light calculations in 3d then you should use special shaders like mia material in maya.

    "The mia_material primarily attempts to be physically accurate"...

    you can read more here about mia material and what it does :
    http://wiki.bk.tudelft.nl/toi-pedia/MIA_Material_-_Background_Information

    Max arch viz materials should be the equivalent
    Interesting,

    PEEP! It seems like Oren Nayar is what most consider also to be 'physically' correct, but since Oren is based upon the Lambert math, this bring back Lambert into the play vs. the shadows by themselves.
    gray wrote: »
    what are shadow maps you say? :poly122: you dare speak such blaspheme! :)

    well i'm not sure how technical you want to get. and i'm not sure how accurate i can get depending on how technical you want to get... but shadow maps form what i understand are basically a depth buffer image taken from the point of view of a non-physical light source into the 3d scene. like a spot light which is just a point in space that shades each object individually without ray casting. what ever is occluded from the point of view of the light does not receive a light contribution in the final rendered image. so if there is one light in a scene the occluded areas would be black.

    shadow maps were a technique used before raytracing was fast enough to light scenes for films. and i suppose it is blazing fast to use in real time rendering, alto i have no experience with implementing something like that. its a map that can be saved to disk just like you can save a z-buffer image to disk.

    AO and Light maps are definitely different from shadow maps. i'm not sure what graphics papers your reading but i assume that perhaps they mean that if you had lights with shadow maps in a scene then the diffuse shading would look more realistic then if you had the same lights without shadow maps. ie, the occluded areas would be darker and look more natural. that's just a guess tho.

    also congratulations on reading graphics research papers :thumbup: regardless of what they are about. keeping up with research gives you a giant imaginary hammer to clobber your foes with...

    and to answer your second question the capital of norway is is a very small half man half fish creature that lives in a slightly oblong magnetic sphere on the tip of the eiffel tower.

    Ah, that explains some hefty stuff, and from what I gathered at this point, they can be real-time, but this confuses me even more, why refer to them as 'maps'? Is there a reason, especially for RT stuff?
    I know this, Africa! Yurrs, winrar to me! :poly122:

    On a more serious though still low on competence note, as I don't know that much about tech stuff and shaders in general:

    All I know, is that there are multiple ways to render AO, but that it's basically shadows rendered based on angles and whatnot, lol. Light-tracer in max seems to cast rays and act more like normal ray-traced shadows though, bombarding with light from all directions. It can also include bounces and bounce-colour. With the addition of course that it creates shadows where surfaces meet and bend at an angle.

    Lightmaps, like the ones in UDK however seems not to only store shadows, but also light direction from what I managed to figure out myself so far.

    As for the term shadow-map in general, I always thought of that as a collection of different shadow-maps (AO and Lightmaps for example). But as you mention, there might be more to it. That being said, it wouldn't be very surprising if it has different meanings to different people.

    Yep, I guess you can say we both have the same issue, certain terms don't make sense anymore in this day and age, especially with RT stuff when you think about it, so I guess reading Shadowmaps for me is like calling Ketchup Catchup, pending on your background, one of them won't make sense.
    gray wrote: »
    @Adam L. Gray

    unfortunately no. shadow maps are a distinct well defined entity. they are not open to your interpretation. they are distinct from other lighting and shadowing models. a lack of information will not change that. there are many sources where you can find explanations of what shadow maps are and how to use them.

    Well, as I said to Gray, it's a problem of 'background' more then anything, unless you plan on spending time on looking up the how and where the terms comes from, you can very easily fall into a pit that will make you waste months of your life.

    I'm not saying Shadowmaps don't have the proper meaning defined over the years, I just wish people in their papers would define it more properly on both variables of it being process-bakes, RT OR Screen-Buffered.

    I can vouch that several 'big' name companies in their white papers called AO, Lightmaps, and even SSAO as 'Shadowmaps', under the same header, which is what confused me in the first place about all of this.
    iniside wrote: »

    I did, but alot of the stuff in there is lacking information about RT stuff with examples for noobs like, the 'temple' example serves it purpose, but after reading the rest of the article after a while, I come back to the images, and say 'Wait, this doesn't make sense...'

    If you guys have much easier 'noob' reading stuff for people like, please by all means keep posting!
  • gray
    Options
    Offline / Send Message
    Ace-Angel wrote: »

    1)
    why refer to them as 'maps'? Is there a reason, especially for RT stuff?

    2)
    Well, as I said to Gray, it's a problem of 'background' more then anything, unless you plan on spending time on looking up the how and where the terms comes from, you can very easily fall into a pit that will make you waste months of your life.

    3)
    I'm not saying Shadowmaps don't have the proper meaning defined over the years, I just wish people in their papers would define it more properly on both variables of it being process-bakes, RT OR Screen-Buffered.

    4)
    I can vouch that several 'big' name companies in their white papers called AO, Lightmaps, and even SSAO as 'Shadowmaps', under the same header, which is what confused me in the first place about all of this.

    1)
    they were originally stored on disk in files like any other map so i guess it was a natural name. it is assumed that most developers know that the term 'buffer' and map are interchangeable. so its not an issue to use those terms interchangeably. the algorithms in RT are generally the same as non-RT.

    2)
    i agree that you will be lost if you don't take the time to learn what a techniques is before you start using the term. you will not understand everything in most research. but little by little you move ahead and figure things out. it never really stops i have a huge list of graphics stuff i want to read about when i get the time. the more you read the better your "background" gets.

    3)
    at this point there are lots of ways to make shadows in a render and bake shadows into textures. so it can be confusing. but i'm fairly sure that there would be a 'citation' to another graphics paper explaining a concept that is not explained in detail. there should be a numbered references section at the end of the paper poly133.gif its like a web. eventually you trace ideas through the references of papers. thats why they put them there!

    4)
    you need to distinguish the technique of generating shadow maps from a more general intuitive notion of a texture map that holds baked shadow information for an object.

    while you can probably call a texture map that holds baked shadow information literally a shadow map in a non technical setting because its a simple term to use i doubt that anyone would confuse the map itself and the technique to generate the map. or assume that the different methods of baking shadows are the same. in the case of shadow maps you can use them to create shadows in a render and bake shadows. i guess the use of the term can be confusing if you don't technicality know what a shadow map is. i would call baked maps 'baked shadows'. they will eventually be added to the diffuse texture so in the end a 'baked shadow map' is just a temp map.

    you can use lights with shadow map shadows, lights with ray traced shadows, and the shading technique of ambient occlusion which is not a light source at all to generate texture maps that hold baked shadow information for an object. since you are trying to figure out these techniques, reading papers and such you should probably distinguish all of these techniques and understand to some extent what they are. that way you will know by the context what the term 'shadow map' is referring to.
  • Gestalt
    Options
    Offline / Send Message
    Gestalt polycounter lvl 11
    I think you may be mixing up cast shadows and the shading of the surface based on the surface's properties (reflectance model like oren nayar).
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    Wow this thread is all over the place. shadow mapping is not light mapping/baking.

    A shadow map is just a depth map of a scene from the perspective of a light. when you render a pixel you translate the world space point into the view space of the light. sample the map at the x,y values and then compare the z against the sampled pixel value. if the point is at a greater depth than the pixel then its in shadow.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Gestalt wrote: »
    I think you may be mixing up cast shadows and the shading of the surface based on the surface's properties (reflectance model like oren nayar).

    So the two aren't reliant on each other, correct? Each one does it own thing.
    r_fletch_r wrote: »
    Wow this thread is all over the place. shadow mapping is not light mapping/baking.

    A shadow map is just a depth map of a scene from the perspective of a light. when you render a pixel you translate the world space point into the view space of the light. sample the map at the x,y values and then compare the z against the sampled pixel value. if the point is at a greater depth than the pixel then its in shadow.

    Coolio and much kudos mate!
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    Ace-Angel wrote: »
    So the two aren't reliant on each other, correct? Each one does it own thing.



    Coolio and much kudos mate!

    No worries, you should read the wikipedia article it describes it all quite well.

    and yeah the lambert equation and shadow mapping are separate.
  • Ashaman73
    Options
    Offline / Send Message
    Ashaman73 polycounter lvl 6
    r_fletch_r wrote: »
    Wow this thread is all over the place. shadow mapping is not light mapping/baking.
    Hehe, this was my first thought too.

    I think that much of the confusion comes from times of static shadow calculations. What is now known as light maps was although called shadow maps sometimes in the past. In fact it is just a texture which will be used to darken a surface.

    But as r_fletch_r stated, today the term shadowmap is clearly definied and is the defacto standard in RT (game) rendering (exotic: shadow volumes used i.e. in DOOM3).

    One disadvantage of shadowmapping are the aliasing artifacts (i.e. shadow acne). There are lot of variation of shadowmapping to get rid of them, a simple solution is to fade out the shadow when the surface normals differs too much from the light direction. And this can be archieved by using the lambert term (dotProduct(n,l) ). But it is only one hack, there are a lot more available. :)
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    People also seem to be confused by the term shadowmaps being used for pre-baked lighting and realtime lighting. They both aim to achieve the same thing, just with different methods, the shadowmaps hold slightly different information in each case.
Sign In or Register to comment.