How do I make a specific area dark?

I made a snowy level consisting of rocks and mountains and made in one of the areas of the level a small cave or a small room inside a mountain, but the problem is that this area which was supposed to be dark it remained lit just like the outside area, The sunlight enters the entire room as if there are no walls. How can I make this small room dark and the sunlight only enters through the door? I searched a lot and couldn’t find a solution to this problem other than some complicated suggestions that didn’t work

Use a moveable skylight and reduce it’s intensity.

It didn’t work, it affects the whole level not just the place I want it to be dark

Thing is, some light types are global and will light indoor areas. I’m following this question.

The problem is likely that either your skylight or sunlight don’t have “cast shadows” turned on, OR the roof of the cave does not cast a shadow. A roof can fail to cast a shadow if either it’s only turned inwards (single-sided triangles) with no separate outwards layer, OR if the mesh/asset in question is not marked as casting shadows.

If fixing those options doesn’t make it work for you, you’ll want to post a screen shot of the editor, somewhat zoomed out, showing the mouth/roof/innards of the cave, and the properties of that object opened in the property inspector, so someone else can perhaps figure out what’s going on.

cast shadows options is turned on by default, and I’m using megascans assets for the walls but I tried to surround it with external walls but this did not reduce the percentage of light entering the cave at all, it remained the same as if nothing changed

Problem solved, I followed a tutorial that has nothing to do with this issue specifically but in the end it solved it

1 Like

Can you please share how did you solve the problem?

Yes, nice of them to share, not… :wink:

You could put a localized post process around the area

I can desaturate part of the level with this

2 Likes

Yes i tried, but i did`t like the result. When i enter the cave it is light, but when leave the cave the world is dark

Can you elaborate, not quite sure what you mean.

If a cave is not dark enough, there are two main areas to focus on

  1. Make sure no light is leaking in

  2. Turn off auto exposure in the cave

I have an open world, i`m using dynamic direction light and the whole world is always illuminated(buildings, cave and so on). I need to made dark areas in caves.

It should automatically be dark in the cave, if you turn off auto exposure.

do i need to turn it off in post processing?

Yes. You can just put a normal PP volume in the cave with AE turned off ( or down ).

Watch out though, UE5 doesn’t work properly in this area yet.

At the moment, the only way you can get AE PP to affect the player seems to be, do it on the player camera.

It doesnt work, i wrote about it before, PP volume works only when youre in it

1 Like

If you want it to look dark from the outside, then you need what I outlined above, which does work

it’s a shame for you for not sharing the solution

1 Like

Maybe set scalability from low to medium that worked for me😁