Search Unity

Question How does HDRP Lighting work?

Discussion in 'High Definition Render Pipeline' started by mosestan2003, Mar 6, 2023.

  1. mosestan2003

    mosestan2003

    Joined:
    Aug 26, 2021
    Posts:
    1
    Let's say i used the HDRP template and probuilder to make a box with flipped normals. Now i would have a room. Delete all the sun and sky objects that were in the hierarchy by default and in theory, i should have a dark room. But, for some reason, the room seems to be lighted up by the sky or by some light source. Any ideas on how I can totally make the room dark?

    Also, emission textures don't quite work as intended too, in normal unity, i would see the light flooding the floors and such but here, i dont see anything. Its as if its not even in a room.
     
  2. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    657
    HRDP uses a default settings volume profile , provided you do not have one in your scene, for eg:

    Create a volume profile, and add it to your scene, make sure its global.

    Now, turn off everything , and with no visual environment, sky, lighting, it should be dark.

    If you have more questions - feel free to msg me on discord. JD#1539
     
  3. mgeorgedeveloper

    mgeorgedeveloper

    Joined:
    Jul 10, 2012
    Posts:
    324
    Broadly speaking, you have direct light (like your sun, some spotlights, whatever) and indirect light (like the sky environment / a.k.a. ambient light).

    In a real-time lighting environment, the interior and exterior of your room will be lit correctly in relation to direct light.

    But the interior and exterior will be lit equally by indirect light, and even receive sky reflections inside for smooth surfaces. This is because the ambient lighting system does not understand that your room has an "inside" and an "outside" - it just sees everything as a surface to receive ambient light.

    You will need to bake indirect light, or use something like ray-traced ambient occlusion, etc., to create realistic interiors.
     
  4. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    MrBigly and hjohnsen like this.