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

Feedback Unity and its horrible shadows

Discussion in 'General Graphics' started by ciorbyn, Dec 10, 2022.

  1. ciorbyn

    ciorbyn

    Joined:
    Oct 17, 2013
    Posts:
    138
    I would like to know why after years of development and various pipelines, when we use the point lights, the shadows of the objects are still completely detached from the base.

    This is the result with bias at 0:

    Standard

    Built-In pipeline_unity_shadows.png



    Urp

    Urp_Pipeline_unity_shadows.png
     
    Last edited: Dec 13, 2022
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    Welcome to real time rendering? They're not a solved problem for any engine. You can sometimes hide the problem in some cases using screen space shadows, but that won't catch 100% of the issues, and can be expensive. Raytracing can make those shadows perfect, but are even more expensive, and often add a lot of noise. Real time shadows are hard.

    Unity's shadows used to be much, much worse than they are today, so this is actually the "fixed" version.

    One option you can try is NGSS.
    https://assetstore.unity.com/packages/vfx/shaders/next-gen-soft-shadows-137380

    These add several new features to Unity's built in renderer shadows. But again, come with increased cost, or visual noise, or require some special handling to get the best results from.
     
  3. ciorbyn

    ciorbyn

    Joined:
    Oct 17, 2013
    Posts:
    138
    Now I don't want to raise the usual Unreal vs Unity controversy, but it seems to me that the shadows are clearly superior on the other Engines.

    This is the shadow in Unreal
    Specs : In both cases I'm using realtime rendering on Nvidia rtx 3080.
    Unreal shadows.png


    you can try it yourself if you want.
     
    Last edited: Dec 13, 2022
  4. echu33

    echu33

    Joined:
    Oct 30, 2020
    Posts:
    62
    man you are comparing shadows between engines that target different device by default.
    URP and BuiltIn are mobile first from the beginning. While unreal targeting PC/console by default.
    The implmentation are different, the cost of performance are different.(and of course your nice 3080 can handle much demadning one with ease)

    If you really want to have nice shadow you can try HDRP .you can try it yourself if you want.
     
    imblue4d likes this.
  5. ciorbyn

    ciorbyn

    Joined:
    Oct 17, 2013
    Posts:
    138
    Sorry admit I made a wrong comparison!
    However, although HDRP achieves a better effect, it is still unsatisfactory.

    Now I don't know why if I set the quality to ultra the shadow completely disappears but I still remember that some empty corner is always visible (albeit better).

    HDRP

    Unity hdrp Shadows.png
     
    Last edited: Dec 13, 2022
  6. echu33

    echu33

    Joined:
    Oct 30, 2020
    Posts:
    62
    Some parameters need to be tweak(but it’s fairly simple) in hdrp in order to get good shadow for you.


    This video made by Pierre is probably the best first guide for HDRP setup.
    check the 38:36 part of shadow setup. You can still get really good looking shadow.

    I can understand the whole process is more complicated than using Unreal. Where eveyrthing looks good out of box. But this is pretty much the Unity experience at current state.......in order to get good result. The users need to put some exta effort.
     
    Last edited: Dec 14, 2022
  7. ciorbyn

    ciorbyn

    Joined:
    Oct 17, 2013
    Posts:
    138
    Regards the directional light there are no problems ( after the various necessary settings ) either in Built In and URP.
    In this discussion in fact I refer to the "point light".

    With the "point light" in my opinion we are still far from having a good result.

    Setting the contact shadows instead you get the coverage of the contact angle, but with a very ugly irregular edge.

     
    Last edited: Dec 14, 2022