Search Unity

Shadows on small scale objects

Discussion in 'Global Illumination' started by radiowaves, Mar 8, 2021.

  1. radiowaves

    radiowaves

    Joined:
    Jan 20, 2017
    Posts:
    13
    I am working on a 3D card game.
    I wanted to do this as a simulation, this includes realistic scales. So the cards are 6x11cm, or 0.06x0.11 meters.
    But I can not get the shadows to look good on point light (I use only single one right now).
    I have set the shadow distance small. What am I missing?
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Getting accurate looking shadows for objects of such a small size is going to be a challenge. You would need to use a very high resolution shadowmap atlas, with a very small shadow distance (go as low as you possibly can). Also, disable all shadow cascades - your best chances of getting good results are by trying to fit everything in a single cascade.

    In your particular case, using screen space shadows might work. They will not suffer from the same limitations as conventional shadowmaps (though, they have their own set of limitations). In HDRP, this feature is natively integrated. For other render pipelines, you'd have to either develop your own solution, or use a third party plugin.
     
  3. radiowaves

    radiowaves

    Joined:
    Jan 20, 2017
    Posts:
    13
    Turning off the cascades helped. I am almost happy with the result now.
    However, working on such scales there are mighty bunch of other problems. This is not illumination topic, but there is a problem with an overlap of objects (quads): One quad Y-pos is -0.1147, other is -0.11, but their order on the screen is still random, jittering on top of each other.
     
  4. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    Doesn't this feature work with DXR shadows only? Enabling this option without ray-tracing will do nothing (which raises the question, why is it even there in DX11 mode, but that's for another topic), as far as I remember.
     
    Last edited: Mar 10, 2021
  5. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    That's only true for fully raytraced shadows. Screen space shadows do not have any special requirements, aside from needing to enable them in the HDRP asset.
     
  6. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    Can you elaborate on that please?
    What exactly will happen if I enable this option running DX11 mode?
    I don't see any visual changes so far.
     
    Last edited: Mar 10, 2021
  7. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Please address HDRP rendering-related questions in the HDRP sub-forum.