Help with WorldEnvironment and light for interiors and exteriors

Godot Version



Hey all, I’ve been using Godot for 2D for a while now, and recently decided to try 3D to learn how things work. I’ve been able to build some stuff, map and player controller, but I’ve encountered some problems with the lights. Let me explain:

My map has 2 levels, a surface area and an underground area. The idea is that the surface should be illuminated naturally by daylight and underground area needs to be pitch black except for some directional lights or players flashlights.

I’ll attach some photos (a photo, because as new user can only upload one, oops) below to show what happens, but basically, if I enable Ambiance light, the underground level becomes illuminated and if I remove it, the shadowy parts on the surface become too dark.

is there a way to have the best of both worlds? I’ve tried some settings but it’s always too dark on the surface or too light for underground. Thank you!

edit: also, I wasn’t sure under what topic to ask this, I choose Help, sorry if it was not the best.

Let me add a gif of it, just because I’m proud of my first 3D toy project.

A simple solution would be to create a trigger between the two worlds (a staircase to the underground) .
When you enter the underground the ambient is switched off or set as it should be and when you go out of the underground the ambient is set to the normal settings.

I see what you mean and thank you for your answer! I thought of that and other solutions, like making outside nighttime and add some streetlights for illumination, but the point of this project is to learn how to use the engine for 3D and if possible, I’d like to be able to get the effect I was commenting.
Also, if I may explain a little bit more, in the path of learning, I wanted to use this map to add some items for the players, a simple puzzle (to learn how to create item interactions), a couple of different enemies (to learn AI and pathfinding on 3D) and finally add a simple multiplayer feature, to finally have some simple coop mission. The solution you offer I guess it could be done by changing the ambient for the player who goes underground and not for the ones staying on the surface, but I don’t know if that’s the proper way to do it.
Again, I appreciate your response, but I’ll try to find a way to tackle this problem rather than going around to avoid addressing the issue. If I can’t find any other way, I’ll try your solution for sure! Thank you!

I’m interested in a good solution aswell.

The only thing that I found so far was to enable global illumination, but it is very demanding. But the result was what I wanted. :smiley:

I was able to get close to the solution by using SSAO and SDFGI, but still I’m getting some weird glitches. Still, quite an advance!

outside is pretty solid and inside is dark, like I wanted, but when looking deep in the dark some lights can be seen, they disappear when you get close to them. I now need to discover what is causing that!

this is how it looks now (used some auto-exposure for the players cam too)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.