Search Unity

Why a Skybox with custom HDRI doesn't produce shadows?

Discussion in 'Global Illumination' started by benjano, Jul 19, 2017.

  1. benjano

    benjano

    Joined:
    Dec 14, 2016
    Posts:
    6
    As the title says,
    I'd like to illuminate my environments with my custom HDRIs only, cause I get way better results.
    But when I delete the light that I use as a sun in the Lighting panel, shadows disappear.
    Is it possible?
    Thanks.
    Ben.
     
    DougRichardson likes this.
  2. Amitgp

    Amitgp

    Joined:
    Aug 18, 2014
    Posts:
    22
  3. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    You can only use HDRI as ambient light source. For sun you must use Directional lights
     
  4. Amitgp

    Amitgp

    Joined:
    Aug 18, 2014
    Posts:
    22
    Generally you would still need a light source that cast shadow, as far as I know a HDRI doesn't cast shadow. Some people know a technique but not out of the box.
     
  5. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    HDRI can also cast shadows but not from HDRI sun light. Only ambient shadows.
     
    Amitgp likes this.
  6. Vicktorviggo

    Vicktorviggo

    Joined:
    Jul 22, 2022
    Posts:
    5
    where should i place my directional lights and how far back
     
  7. bnmguy

    bnmguy

    Joined:
    Oct 31, 2020
    Posts:
    137
    The only thing that matters with directional lights is the direction. How far away it is won't make a difference. I usually leave mine at the default location.