Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

directional light shines thru objects that is not at 0.0.0

Discussion in 'Global Illumination' started by Fressno, Sep 8, 2019.

  1. Fressno

    Fressno

    Joined:
    Mar 31, 2015
    Posts:
    114
    as the title says, something odd is happening.
    this is what should happen.
    The object is at 0.0.0

    but this happens instead
    object is at 0.0.4


    I have volumetric fog, one direction light coming from where its shining thru.
    the model has a material made in unity for now.
    i have deffered switched on.
    but the funny thing is that its solid until goes further back into the fog.
    but i cant remove the fog cus thats what i want to use.
    any suggestions?
     
  2. uy3d

    uy3d

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    98
    Your shadow distance may be too short. An easy way to verify that is to move the camera closer to the object. If at some point the shadow starts fading in, then you need to increase the shadow distance.
     
  3. Fressno

    Fressno

    Joined:
    Mar 31, 2015
    Posts:
    114
    thanx for the answer. but what shadow distance do you mean?
    inte the post process shadow override?
    or the directional light shadow?
    and yes, as i said in the main question, i moved the object closer in the Z axis and got it as i wanted it to be.
    the solution you say works in perspective mode, not in orthographic view sad to say.
     
    Last edited: Sep 9, 2019
  4. uy3d

    uy3d

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    98
    That depends on which render pipeline you use. For builtin, the shadow value is a global setting found under the Quality section.
     
  5. Fressno

    Fressno

    Joined:
    Mar 31, 2015
    Posts:
    114
    im using the HDRP.
     
  6. Fressno

    Fressno

    Joined:
    Mar 31, 2015
    Posts:
    114
    now this happens.
    you see the slider? and its on screenspace -overlay. this shoudnt happen right?
    screenspace overlay out itself always at the front right?
    im using the Unity 2019.3 beta.

    dont mind the green ship. i made it that way just to be able to track it better visually =)
     
  7. uy3d

    uy3d

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    98
    For HDRP the shadow distance settings should be in the volume settings for your scene that you need to set up.

    The background bleeding through your UI is an unrelated issue. Please try the dedicated HDRP forum for that.