Search Unity

creating a truly dark cave

Discussion in 'General Discussion' started by gweebco, May 28, 2023.

  1. gweebco

    gweebco

    Joined:
    May 17, 2021
    Posts:
    20
    Hi there. I have created a cave (in HDRP) and i want it to be dark in there but partially illuminatedby point lights. problem is because i have a directinal light its never completely dark inside the cave. how can i get around this? thanks.
     
  2. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    trigger box for when you are far enough inside, set the directional light intensity to 0. (maybe you need to lerp it over a few seconds)
     
  3. gweebco

    gweebco

    Joined:
    May 17, 2021
    Posts:
    20
    trigger box? you mean a volume box? i tried using a volume box and reducing the exposure but it was hard to blend everything.
     
  4. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    it could be a gameobject that does a half space test.
    http://www.miguelcasillas.com/?p=43

    Doesn't really matter exactly what it is, just that you deliberately put a thing in the level that when report will player has entered, and then it will adjust the light.

    What does "blend everything" mean? What trouble did you have? By exposure are you talking about post process? I am talking about reduce just that one light. Don't want to mess with post process without first handling the lights.

    I think of scene lighting kind of like sculpting, or even drawing. The main lights are your major forms, and post processing is details. You can use it to accentuate what is already there but the main forms have to be correct first. In this case you are specifically having issue with this one light so it makes sense to attack it directly, not try to cover it up with any other methods (especially a method that will effect all other lights).

    Pictures or videos and description of exactly what you tried and where it failed is all necessary to solve the problem.
     
    Last edited: May 28, 2023
  5. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    There are a few parts to this: ambient and direct lighting, each of which have diffuse and specular components.

    For ambient diffuse, I suggest checking out Ambient Light Volumes or whatever they're called now.

    For ambient specular, you're likely to get some ambient reflections "leaking" inside by default. Reflection Probes are the way to address this. That's because if there aren't any probes influencing a pixel it'll fall back to the default, which I'm pretty sure is the skybox.

    For direct lighting, either your outdoor directional light will need to cast shadows (which you probably want anyway), or you'll need light layers enabled and to have your interiors on a layer not effected by that light.