Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

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,793
    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,793
    HDRI can also cast shadows but not from HDRI sun light. Only ambient shadows.
     
    Amitgp likes this.
  6. Vicktorviggo11

    Vicktorviggo11

    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:
    125
    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.