XNA Creators Club Online
Page 1 of 1 (4 items)
Sort Posts: Previous Next

Shadow trouble

Last post 08/11/2009 0:02 by mtnPhil. 3 replies.
  • 07/11/2009 22:04

    Shadow trouble

    I am having trouble with shadow mapping. When the camera gets too close to the shadow it starts to disappear. I don't have much experience with shadow mapping but i think it has to do with depth. The cameras far plane is setup using the models bounding radius making me think it has to do with depth. Here is a pic, hope it helps.

    http://photos-g.ak.fbcdn.net/hphotos-ak-snc3/hs009.snc3/11654_104774606200199_100000029795138_127738_3533694_n.jpg
  • 07/11/2009 22:19 In reply to

    Re: Shadow trouble

    It's hard to tell exactly what's going on in your picture.  To me, it looks like a piece of the shadow is missing under the "curved tower" object.  Is that what we're supposed to be seeing?  The other curved towers are circled because the shadows are ok there?  And when you move the camera back, the curved tower at the front regains its shadow?

    Does shadowmap itself look ok?
  • 07/11/2009 22:58 In reply to

    Re: Shadow trouble

    The shadow disappears when ever i get close to it. It also disappears if i rotate the camera at a certain angle.

    Here you can see a hole in the shadow that should not be there.

    http://photos-f.ak.fbcdn.net/hphotos-ak-snc3/hs029.snc3/11654_104775736200086_100000029795138_127762_6660925_n.jpg

    This one is just totally messed up.

    http://photos-d.ak.fbcdn.net/hphotos-ak-snc3/hs029.snc3/11654_104775809533412_100000029795138_127763_6416893_n.jpg 
  • 08/11/2009 0:02 In reply to

    Re: Shadow trouble

    Hmm... hard to say.

    If you just look at the shadow map (draw it on the screen, or look at it in PIX), is there a problem with it?

    You should also be able to use PIX to debug the pixels that are improperly lit, and see where the calculations are going wrong.

    Other than that problem, your shadows/lighting look nice.  Just curious, what are you using to blur the shadow edges?
Page 1 of 1 (4 items) Previous Next