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

URP -> Shadows look horrible

Discussion in 'Universal Render Pipeline' started by CortiWins, Jan 23, 2021.

  1. CortiWins

    CortiWins

    Joined:
    Sep 24, 2018
    Posts:
    150
    I updated from legacy to URP.

    Default Settings:
    upload_2021-1-23_11-59-43.png

    Maxed out settings:
    upload_2021-1-23_12-0-8.png

    It looks bad. I set all stuff to max, i followed youtube-"fixes" for bad shadows, it still looks really bad.
    Is this just what URP is or can it do better?
     
  2. CortiWins

    CortiWins

    Joined:
    Sep 24, 2018
    Posts:
    150
    Update: Created a new URP Projekt, just to see what it looks like on "high quality"
    upload_2021-1-23_12-20-13.png
    Oh damn it.
     
  3. MrPaparoz

    MrPaparoz

    Joined:
    Apr 14, 2018
    Posts:
    157
    Change Normal Bias in Shadow Settings in RenderPipeline asset to 0. That should fix it.
     
    mattkudo likes this.
  4. CortiWins

    CortiWins

    Joined:
    Sep 24, 2018
    Posts:
    150
    Thanks! I tried, but it doesnt.
     
  5. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    642
    If you've got soft shadows enabled, you should get better results than that. But they need enabling both on the light source and on the URP pipeline asset:

    Have you just missed this checkbox?:

    upload_2021-1-23_13-28-55.png

    (AFAIK mobile platforms use simpler/cheaper shadow filtering though. Not sure if this is visible in the editor when in iOS/Android mode, or just on device)
     
    mattkudo and CortiWins like this.
  6. CortiWins

    CortiWins

    Joined:
    Sep 24, 2018
    Posts:
    150
    Hey, i tried. It gets the same blocky line with softened edges. It still looks really bad.

    Even a standard new URP project looks bad.
     
    TheFloatingSheep likes this.
  7. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    642
    The default construction site scene you get when you create a new URP project should have soft shadows enabled and looking pretty good. From there you can turn the shadow resolution up another notch and fiddle with the cascade distances+biases
     
  8. CortiWins

    CortiWins

    Joined:
    Sep 24, 2018
    Posts:
    150
    I don't know if the construction scene used baked lighting, i just know that one cube doing a shadow on a different cube looks pretty bad on the best settings possible.

    Not only bad, but bugged, broken. I mean look at the screenshots. Thats not 2020 "low quality", that would have been considered ugly in 2005.
     
  9. Sky77

    Sky77

    Joined:
    Jan 30, 2014
    Posts:
    171
    There's definitely something wrong in your URP setup. To me it looks like you have a low shadow map resolution.
    Also, make sure you're modifying the settings on the right URP Assets.
     
  10. LordCafe

    LordCafe

    Joined:
    Aug 26, 2015
    Posts:
    35
    It's 2022 and i still have the same problem... does someone know how to fix? have already max settings on the engine... cranked up almost every single possible shadow quality settings and looks preety bad.
     
  11. Slashbot64

    Slashbot64

    Joined:
    Jun 15, 2020
    Posts:
    313
    BIRP + Next-Gen Soft-Shadows..it's a few years old and still doing a better job... Frankly I don't think URP is going to get better at anything anytime soon.
     
  12. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,623
    1 - First you need to understand that URP is for low/mid end hardware. Mostly phones and handhelds like switch or low poly games.

    2 - Realtime shadows are very demanding (something that almost nobody knows) so, for low/mid hardware is not useful to have pixel perfect realtime shadows

    3 - ...But you can achieve great shadows even for urp, do not forget to check the "shadow resolution" options in your pipeline asset > rendering

    4 - do you really need 4096+ resolution for realtime shadows for your objects in a URP project? Really?

    5 - Are you sure you can not use baked lightmaps?

    6 - If you need more than that (which i really doubt) you can work with a HDRP project but you will need to work really hard on performance.

    Check this video :)
     
    Last edited: Sep 26, 2022
    mattkudo likes this.
  13. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    The problem isn't the resolution, it's the prehistoric shadow filtering.

    TBH, the shadows in built-in are also ugly, but at least there are 3rd party assets for solving that.
     
    tryano1 likes this.
  14. Ryuuguu

    Ryuuguu

    Joined:
    Apr 14, 2007
    Posts:
    391
    This under 2-minute video shows how to solve lots of this I am not saying they will be gorgeous but at least smooth without light shining through. It is not my video. Also, check the top comment about setting normal bias slightly above 0 maybe 0.1
     
  15. alfredbaudisch

    alfredbaudisch

    Joined:
    Dec 13, 2010
    Posts:
    45
    This video is the only thing that helps fixing the shadows! Thanks!
     
  16. Amaligom78

    Amaligom78

    Joined:
    Jan 31, 2020
    Posts:
    1
    So I adjusted the Cascade Value and got sharper shadows. Hope this helps.
     

    Attached Files:

  17. SympaK

    SympaK

    Joined:
    Apr 14, 2010
    Posts:
    134
    The settings fix look from 3 years ago! Something more actual?
     
  18. Slashbot64

    Slashbot64

    Joined:
    Jun 15, 2020
    Posts:
    313
    well a year later and URP is still barely anything good about it
     
  19. CortiWins

    CortiWins

    Joined:
    Sep 24, 2018
    Posts:
    150
    It's not like we are expecting Unreal Engine 5 level of graphics for URP.

    Recently in research about UI elements, i came across screenshots from UT2003 which is UnrealEngine 2.
    And to be honest, it's shadows looks fine. Not amazing by todays standard, not impressive by any means, but not ugly.
    I would take 2003 quality shadows.
     
  20. Thygrrr

    Thygrrr

    Joined:
    Sep 23, 2013
    Posts:
    699
    Unity really needs to add a screen space blur pass to it's shadows. O3DE and Godot do this to fantastic effect.
     
    Lars-Steenhoff likes this.
  21. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,623
    angular diameter?
     
  22. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    The problem you are facing is regarding the shadow draw distance(the smaller the draw distance/max distance the better the shadows are), Unity atm can't handle shadows at high distances. Many games that use unity made their own solution for this type of need.
    https://learning.unity3d.jp/7260/



    Also note that if you target mobile platfroms the shadows will look that ugly, idk why but they are ugly when you are going for mobile.
     
  23. SympaK

    SympaK

    Joined:
    Apr 14, 2010
    Posts:
    134
    Looks great.
     
  24. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    SympaK likes this.
  25. SympaK

    SympaK

    Joined:
    Apr 14, 2010
    Posts:
    134
  26. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    This is how the shadows are supposed to look with this settings on windows platfrom.
    upload_2023-12-28_14-30-17.png
     
  27. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    I will finnish my replacement for armedunity and unity froums by the time they start to think about adding this type of features to urp =))
     
    SympaK likes this.
  28. SympaK

    SympaK

    Joined:
    Apr 14, 2010
    Posts:
    134
    I agree: they are still stopped at understanding the on-exit standby.
     
  29. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    425
    Hey, you don't need any asset. This is URP. Consider that the viewport doesn't have AA. It really depends on how you want to cascade the shadows, and some perspectives like top view are more difficult to cascade properly. Remember that URP is built to be performant rather than to look perfect. Also, having graphics for mobile that look like HDRP is not an easy task for any engine. I don't think this is an issue at all. The Ambient Occlusion could be better, and I would love to have Screen Space reflections. But the shadows don't even have a softening in this image and they still look pretty decent. Also, shadows are some of the most expensive things out there.
    shadows.jpg
     
    Last edited: Dec 29, 2023
    tmonestudio and SympaK like this.
  30. SympaK

    SympaK

    Joined:
    Apr 14, 2010
    Posts:
    134
    What settings did you applied?
     
  31. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    425
    Here is the set up for the result on the image.
    What you should focus is in the shadows cascades.
    Usually you're not going to need this much detail. To give an example, I've recently seen that an Unreal Engine's game of 2023, Hogwarts Legacy, with good quality settings, has shadows that are way less defined than this. This is because when you use soft shadows (wich are more common) you can give away with less detail.
    Another thing to keep in mind is that, if you're not working with real life units (say, a person beign roughly around ~1,80 meters), the settings that you see here (or in a tutorial) will change.
    URP shadows cascades.jpg
     
    Last edited: Jan 2, 2024
    SympaK likes this.
  32. SympaK

    SympaK

    Joined:
    Apr 14, 2010
    Posts:
    134
    great