Search Unity

Shadow under camera

Discussion in 'Global Illumination' started by douglassophies, Jul 25, 2019.

  1. douglassophies

    douglassophies

    Joined:
    Jun 17, 2012
    Posts:
    141
    As i move my camera, the light/shadow moves with it. See short video for example:


    My camera is orthographic set at a constant 30 on the Y axis for an old school Baldurs Gate style isometric feel. Directional light is NOT attached.

    Increasing my shadow distance in the quality settings gets rid of shadows, but ALL of them. The camera shadow is one of the last to go so this is not really a solution.

    I found these similar posts from awhile ago but nothing helped:

    https://answers.unity.com/questions/635839/camera-casting-shadow-or-something.html

    https://answers.unity.com/questions/473125/i-see-a-big-circle-shadow-under-main-camera.html

    https://forum.unity.com/threads/camera-is-casting-a-weird-shadow-across-the-scene.472256/

    I posted on Answers but no luck:
    https://answers.unity.com/questions...mera.html?childToView=1650286#comment-1650286
     
  2. douglassophies

    douglassophies

    Joined:
    Jun 17, 2012
    Posts:
    141
    Enlighten does not have this issue.
    Progressive both GPU and CPU have it.
     
  3. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    From the looks of it, your shadow cascades settings need to be adjusted. Go to Project Settings > Quality and try adjusting the cascade count, cascade split, and shadow distance settings. Verify those settings using Shadow Cascade debug mode in the Scene view afterwards.

    You could also try using Distance Shadowmask lighting mode, which will allow your realtime shadows to blend into baked shadows when shadow distance limit has been reached - https://docs.unity3d.com/Manual/LightMode-Mixed-DistanceShadowmask.html
     
    Westland likes this.
  4. douglassophies

    douglassophies

    Joined:
    Jun 17, 2012
    Posts:
    141
    Thanks for the suggestion. I ended up setting my directional 'sun' light to have a bias of 0.1 which solved it. I am a little puzzled as i have an older version of the game from an older Unity where i had this working without the bias set.
    I tried setting it back and playing with the cascade settings but to no avail. The distance settings do work.. but my removing all shadow so that is no use. However, i am happy now as i understand the only issue with bias removing too much shadow where there should be shadow but that does not seem to be the case.
     
  5. marck_ozz

    marck_ozz

    Joined:
    Nov 30, 2018
    Posts:
    107
    I haved the same problem in my project but in my case I was using HDRP. it result that (at leat in my case) that circle wasn't becouse the camera casting shadow but for the lack of shadow configuration. You can find information in here:

    https://docs.unity3d.com/Packages/c...gh-definition@5.8/manual/Shadows-in-HDRP.html

    I fixed the problem changing the "Maximun distance" of shadows in the "Scene Settings" from 500 to 2000.

    You can add "Scene Settings" by
    Menu:
    Game Object:
    Rendering:
    Scene Setting.

    Plus, playing with this scene configuration really add a high quallity graphics view to the game.
     

    Attached Files:

  6. Jerry_Davis

    Jerry_Davis

    Joined:
    Jan 29, 2022
    Posts:
    5
    adjust the bias setting of light shadow, will fix it. that is my solution
     
  7. jack_107

    jack_107

    Joined:
    May 21, 2016
    Posts:
    7
    Oh great I just need to go to Menu. Ill go right to that menu now that definitely exists and is called menu perfect thanks for awesome forum entry