Dark Cave in a Lit Environment

Hello everyone. I building an environment that has a cave which I would like it to be completely dark; And for this i am using the HDRP pipe line.

First I have created a Global Volume with the following settings:

7996032--1027743--upload_2022-3-26_13-58-8.png

Then I created the Sun: a Directional Light with the following settings

Then I created a Local Volume for the cave and now I am stuck.

I can not figure how to make the cave completely dark. What is the best way to make the cave completely dark? Can someone guide me?

This is going to be uber difficult if you are planing to do it using real time lighting.

Your cave is not dark because you have ambient light.

Volumes works when your camera is inside not when the object is inside.
This is why for real time light it is actually quite difficult to do it.

With baked lighting it is easier, you put light probes everywhere and bake the light.
If you are lucky and you have successfully baked, you will not have specular lighting and you will have leaking light probes probably :wink:

I have placed Light Probes everywhere.

7996059--1027770--upload_2022-3-26_14-29-52.png

This is the result inside the cave

7996059--1027773--upload_2022-3-26_14-30-4.png

It is still very bright inside. Is there anything else I can do?

Did you place reflection probes inside?

@Momissi Search for lightmap and light probes tutorial. It’s not that simple unfortunately.

It’s not the problem with reflection probes, this is ambient light problem.
If OP want to have darkness right now he can set ambient light to black.
The shadow will be completely black, so the cave.

Yes I have also added two reflection probes
7996107--1027776--upload_2022-3-26_14-51-49.png

Shall I get rid of them?

But by setting the Ambient light black i wont have any transition right?

As I said problem is that volumes are for camera not for object.

Example:
You set ambient to black for volume inside cave.
You set ambient to some light for outside profile.

When camera is outside and you look into the cave the cave will have bright ambient light.
When you stand inside the cave and look outside the outside will have ambient set to black.

Ok; I have set the So do you suggest me to overdrive the visual Environment Component for the Cave?
7996191--1027794--upload_2022-3-26_15-37-29.png

I suggest you do lightmap and ditch ambient light generated by Volume.

Or completely dismiss the idea of going through light to dark places seamlessly when using real time lighting. (so no caves basements etc. until you accept that moving from light to dark will be unrealistic.

Sorry just to make sure that i understand: I generate the lightmaps with my ambient light on - i ditch the ambient light (my directional light → so i do not have real time lighting) right?

I’m not a specialist on lightmaps, you would have to do some tutorial/docks.

But generally when you bake lightmaps you should not bake ambient light, the ambient should be calculated by light bouncing and hemisphere.

Hey u can use the new adaptive probe volume system or u can use SSGI with reflection probes setup

Hey, you should study the HDRP scene template (created via the Unity Hub 3), and follow the in-editor tutorial for it. In room 2 and 3, there are good examples of “cave-like” lighting, with light maps, local exposure volumes, reflection probes, and physically-based lighting.

As a reminder, Light probes are mainly meant for small and/or dynamic objects, not really for large static structures. For optimal results, you should use light maps. We are also adding a more refined version of Adaptive Probe Volumes (APVs) in Unity 2022.2, but I’d suggest you familiarize yourself first with light maps.

1 Like

Seems like you have encountered the same problem as we had:

Reflections probes are not the issue here. The Sky(box) is affecting the enclosed areas somehow.
Its like a global light which is applied to every object in the scene, even if its in complete darkness.
Its not even baked global illumination, just “reflected” sky light whch is is obscured by objects.
One workaround is to disable the Sky Reflections in the HDRP settings (look at #2 Post the last image).
Its not a proper solution, but it should do the trick.

1 Like

There is also a (paid) plugin on the Asset Store, called Upgen Lighting HDRP (https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/upgen-lighting-hdrp-169744), which worked quite well for me so far. It has “negative lights”, with which one could achieve a dark cave look like that…

use ambient occlusion? this works without any volumes and lets you look from a bright ouside into a dark inside.

1 Like