Search Unity

Weird Shadows in URP

Discussion in 'Universal Render Pipeline' started by Zaddo, Nov 27, 2020.

  1. Zaddo

    Zaddo

    Joined:
    May 19, 2012
    Posts:
    78
    I have weird shadows appearing in URP. I cannot work out where they come from or how to get rid of them. Turning off "Render Shadows" on the camera does stop this from occurring...

    I am lost, looks like a bug. A fix would be a life saver.



    upload_2020-11-28_9-25-55.png
     
    Last edited: Nov 27, 2020
  2. Matt-Cranktrain

    Matt-Cranktrain

    Joined:
    Sep 10, 2013
    Posts:
    129
    Zaddo likes this.
  3. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    Select your pipeline asset in Project window - take a look at your shadow distance and cascade settings. At first glance it just looks like your shadow distance is too low ?
    Edit: i.e. as if you can see up to 500 units away but your shadows are set to a distance of like 10
     
    Zaddo likes this.
  4. Zaddo

    Zaddo

    Joined:
    May 19, 2012
    Posts:
    78
    Thx for responding.

    I think it was something wrong with the terrain. I exported the height map and imported into a new terrain and this fixed the issue. I was using a tool from the asset store to generate the terrains from world data, it might have been something to do with how it generated the terrain.
     
  5. se

    se

    Joined:
    May 20, 2013
    Posts:
    46
    I just tried the URP for the first time (Unity 2021.3.10f1 LTS, Unmodified "3D (URP)" template) and have very similar shadow issues.It looks exactly like in OPs video. It seems to be related to the mesh size. Mine is about 100 by 100 units. Reducing it to 50 by 50 units does work for the most part, but I can still spot moving shadows. I can also "fix" it by setting "Near Plane" in the directional light's "Shadows" settings from 0.2 to about 3, but I'm sure this will cause other issues. The BRP seems to handle even the larger mesh perfectly fine with "Near Plane" at 0.2. Is this expected with URP or is there something I'm missing?
     
    bybiche likes this.