Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Broken shadows

Discussion in 'Editor & General Support' started by Polak149, Aug 24, 2015.

  1. Polak149

    Polak149

    Joined:
    Aug 28, 2013
    Posts:
    20
    Hello.

    Recently I have encountered problem with shadows, cast by my objects. Shadows are not solid, and sometimes whole parts are missing (see screens below)! Switching cast shadow mode from On to Two Sided in Object's Mesh apparently fixes the problem, but weird dots are still presents and to be honest, i'm worried about performance when using two sided shadows, where it shouldn't be needed.

    Here are screens that will show what i'm talking about.

    When cast mode is switch to On:

    When cast mode is switch to Two Sided:

    Weird dots, present on both modes:


    Anyone have an idea what is going on, and how to achieve solid, good looking shadows in On mode?
     
  2. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    You can avoid two sided shadows simply by closing the other invisible side of the cliff. If you can see through geometry, it won't cast shadow from that side. Just place your camera to the other side of the cliff and you can directly see the area that has no shadow.

    The artifacts can be eliminated by adjusting the bias values in the directional light.
     
  3. Polak149

    Polak149

    Joined:
    Aug 28, 2013
    Posts:
    20
    Thank you for fast replay. Indeed adjusting the bias value fixed the problem with artifacts and thanks to your suggestions i noticed that my cliff is not closed from behind, so in this model, two sided shadow is required.

    Thank you again ^^.