Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Please help me to fix this shadow error!!!

Discussion in 'General Graphics' started by GCSoftworks, Sep 21, 2020.

  1. GCSoftworks

    GCSoftworks

    Joined:
    Apr 23, 2020
    Posts:
    2
    I have a steel barrel export from Blender, in blender it get same shadow error in Eevee render but i fix that by increase contact shadow distance of light source. I put it into Unity and have same problem, I don't know how to fix that, please help me fix and explain why happen, thanks!!!??? Screenshot (6).jpg
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    This is a common issue with shadow maps and shadow bias. Too little bias and you get shadow acne. Too much bias and you get peter panning, aka light leaking. For thin surfaces, it's possible to have both shadow acne and light leaks.

    Eevee has the same problems because it is based on the same techniques used by real time game engine renderers. If you read the documentation on Eevee's contact shadow setting, it even describes this exact issue, and contact shadows' limitations.
    Unity's built in renderer doesn't ship with support for contact shadows, though the newer HDRP rendering pipeline does. There are also assets on the store and elsewhere that add contact shadow support, at least for some light types.

    For example NGSS:
    https://assetstore.unity.com/packages/vfx/shaders/next-gen-soft-shadows-137380

    Or this free example from a prolific Unity employee.
    https://github.com/keijiro/ContactShadows
     
  3. GCSoftworks

    GCSoftworks

    Joined:
    Apr 23, 2020
    Posts:
    2
    Thankyou so much, i'll try that and get back soon, i try to find contact shadows in Unity but no lucky for me, tutorials on youtube don't explain clearly !