Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Realtime soft shadow problems.

Discussion in 'Unity 5 Pre-order Beta' started by kurylo3d, Nov 13, 2014.

  1. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    I never tried these out yet, but at least in unity 5 im using a directional light with soft shadows... i get weird "tearing" issues in them that move around based on where my camera is moving. Here is 2 screenshots.. one with hard shadows which look fine and one with soft... hard_shadows.jpg soft_shadows.jpg
     
  2. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Looks like cascade splits to me.
    I heard they were looking at making it blend better between cascades so the "split" is smoothed out more.

    EDIT: Oh wait, looks like you're using the old style of soft shadows? Have you tried enabling PCF?
     
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Not sure cascaded shadows is even a good engine choice these days.
     
  4. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    I'm not sure why it wouldn't be a good engine choice?? Care to elaborate on that?
     
  5. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Well there's signed distance shadows now. So you can keep pretty much all you need in a single texture and render, while it degrades really well (for similar reasons SDF fonts render so well).

    Plus typically when you're not using cascaded shadows, your resolution uber sucks when it goes into the distance. This gracefully degrades instead, mostly as a side effect.

    I think a certain other engine does it, but when you get to the distance it just splats shadow instead. I'd have to look into it. Cascade is what Unity offers though.
     
    Last edited: Nov 13, 2014
  6. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Well, first I tried adjusting cascade distnaces .. no effect..
    I tried turning off the cascades completely rather then 2x or 4x... tried it all.. no effect on any of them.
    I tried PCF, but problem with that is it does not create any soft shadows... its pretty much just another hard edge shadow, maybe a slight blur to it. Looks good for that i guess, but i want soft shadows.

    Any ideas? I am using unity 5s new deferred renderer.
     
  7. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Is this a bug ? espeacially since i adjusting cascade settings does nothing.
     
  8. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You using directional light?
     
  9. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    yes
     
  10. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Isn't that the shadow cascade effect? CMIIW bigger distance per cascade blurier the shadow will be, and more noticable the cascade split area will be. you might want to set the zero and first cascade distance bit tighter to reduce that.
    I got a best result with my settings, btw the shadow distance also affect the shadow looks
    Shadows.PNG
     
    chrismarch likes this.
  11. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    And thats with PCF? I will have to give that a try later tonight.
     
  12. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    If your PCF shadows are too sharp, try increasing the overall shadow distance considerably.
     
  13. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Alright after relaunching unity.. whatever the reason.. the bug is gone.. it just isnt there and doesnt happen anymore. I changed nothing. Clearly this was some sort of bug for that session.