Need help setting up lighting

Hello.
Made an account to try and get some help from the community when it comes to setting up proper lighting.
I’m bad at level designing so i’m very confused about what i should do to achieve this.
What i need is day/night cycle, I already made a code to handle this. However, even though the directional light is set to realtime lighting, and Lighting settings don’t have Baked Lighting checked, the scene still does not become dark after the directional light is rotated under the world. The skybox does become dark though. I have to press “Build” every time so the scene actually applies, but why? Isn’t it supposed to be realtime ?
I also have no idea how to make certain places dark, like example if I enter, i don’t know, a shack for example. I want it to be pitch black inside, but the directional light seems to light it inside even if it’s supposed to be completely isloated from sun’s light. So can anyone direct me in what i need, and what i need to do?
Thanks in advance.

First, make sure your light is casting shadows. Rotating the directional light is only going to change your shadow directions, and will NOT simulate the earth going around the sun. I recommend lowering the intensity of the light to achieve a night-time effect.

Also, screenshots would be helpful :slight_smile:

There was something wrong in my main scene that i developed my game in. It was just overfilled with all kinds of things, months and months of development, and i gave up on it(gave up on that scene). Made a new scene, but it seems that reflections are ruining everything. I will need reflections of course, but why do they ruin the scene so much?
Here i’ll show the screenshots, but this however is with baked GI, and i don’t think that will work in my case since i’ll have day/night cycle? I have no idea haha, I just honestly have no idea. This is why i came here, I need to exactly know what settings i need to use, and what i need to do in my day/night cycling process in order to do this the correct way. I really want to get the best out of it, I need beautiful lighting, it’s part of the whole idea of the game i’m creating. So here, i built this prototype scene, and these are the differences:

https://s16.postimg.org/lv7r80kid/diff.png

Also, rotating directional light/sun’s light source under the world (simulating night) seems to give the correct night effect even with baked GI but without reflections only, but i still have to ask if that’s a good idea to have baked GI for day/night cycles?

Note: all that was changed on these screenshots is the Reflection Intensity in the lighting settings only.

Edit: Strange. Disabling baked GI and rebuilding makes no difference (or maybe there is but i just didn’t see it in this scene).

Edit 2: Okay changing my directional light Baking setting to Mixed with Baked GI enabled seemed to “make a difference”. The scene took some time to rebuild. But I do not see any difference at all, I don’t think it’s even worth it for most games. So alright, i figured out it’s not for me and my case, i’ll disable it (the baked GI).

Alright so this is where the problem I was expecting occurs. Look how incorrect the roof surface of this room i made looks when i have my reflections intensity on 0, and look how correct it looks when i have the intensity on 1:

The silver ball also helps seeing the difference…

And when i have no reflections, this also happens:

Look how dark the side of the room looks like…

So yeah. Only the actual interior of this room looks nice without reflections(i showed the screenshot in the previous reply), while surfaces that are extra exposed to sunlight look sooo bad. I have no idea what to do. I need reflections but they ruin the interiors.

If you want day night cycles, you need to use realtime (precompute) GI. And also for “proper” reflections, you need to set up reflection probes. Otherwise they reflect the skybox, no matter where they are.

Seriously, read the manual. For all its faults, it’s pretty decent at explaining these things.

The manual will not help me get the effect… Not to be rude but at least try to read the post and the update reply properly. Adding a reflection probe seemed to just make things worse. Now even when i turn the reflection intensity up, it’s like it’s still 0. Here:

And even if i got the probe working properly, i don’t see how it will fix it so the interiors stay realistically lit while the reflection intensity is high.

Well, in an a very dark interior (I notice you don’t have any form of GI in what you are showing me in your last post), reflections don’t have much to reflect do they?

So you tried precompute(realtime) GI, and placed reflection probes and you still don’t like the results? Why?

1 Like

Because how would I? Isn’t the silver ball supposed to be collecting skybox reflection when it’s on the roof of the room? And the way roof is lit just looks incorrect. It should have slight reflections from the sky, but it doesn’t.

Edit: Not to mention how the probe also made the interior look more unrealistic too
Edit 2: Or i don’t know, maybe it’s more realistic. But none of this changes the fact the roof is just not right.

Edit 3: Here’s the screenshot of how the interior looks like with the reflection probe:

I don’t know if that looks correct, but i’m fine with that. The problem is the roof now, and the silver ball, why is it not collecting the skybox reflection?

Edit 4: … Aaand also when I set up the night, the reflection is still there, and makes the interior lit…

Place a second probe for the roof then?

Did you set it to realtime? You should if you want the lighting to change so dramatically. All of this is info that is in the docs.

Hmm thanks that fixed the problem. I hope admins are fine with this post being continuous, I’m not over I have more questions. Now, let’s say i have for example a big map with a city in it, tons of building and each have their interiors and everything. How would I correctly organize my light probes, how many do i need?

And yes the probes are set to realtime, however when the directional light is rotated under, the reflections stay… A bug?

That’s a question of a much much bigger scope and I’ve never done anything that big, so I can’t exactly guess where the bottlenecks will be.

But, you would place as many as it makes sense, you will have active only those that are visible and near the player, you will probably need to update them via script when your lighting changes dramatically (some info here : Unity - Manual: Reflection Probe performance ), so that they don’t update all the time…

And getting precompute GI to work will be a challenge on a big scene.

Tweak the settings of the reflection probe (try lowering the blend distance and then tweak the shape of the box a bit).

2791965--202447--gismall.gif

I hate how it never looks like that good whenever i try to make a simple scene haha. I have no idea as of why… That gif looks absolutely gorgeous even though it’s so simple. And i can’t get the reflection probes to work with the cycle, they still act like they’re baked…

Okay, next to this problem with it acting like it’s baked, there’s another problem. In the interior, i made a room that is completely isolated from all the light. However, the reflections still make it lit, while by the logic, it should be pitch dark, look:

And this is how it looks like when i get rid of the reflection probes and turn the reflection intensity to high:

So yeah… I don’t know if these are bugs really, but it’s just frustrating. Can you send your project, or is there something simillar or asset store or something. A ready scene like that. I just want to make sure if it’s me or unity making the mistake.

Note: I will go to sleep now so i won’t be able to reply instantly.

It’s not a bug. Play with the reflection probes borders and placement. Try lowering its blend distance to 0.

There isn’t really a “blend distance” parameter

Edit1: Okay and let’s say i got the reflection probe working and the cycle works (it doesn’t but let’s say it does). How can mine compare to your beautiful scene? Just look at your gif and look at my scene:

That looks like a 15 years old engine compared to a modern engine… And you did nothing in the scene, you just made a room and placed 2 blocks inside it. I’m absolutely unsatisfied, something’s wrong and i’m not seeing what it is. Not to mention how the room that’s isolated from light is still lit because of the reflection probe…

Edit 2: Okay the reflection probes work properly in playtime. They didn’t work in the scene view when i rotated the sun though, they just kept reflecting when there’s no light. But i don’t mind that it’s probably supposed to be like that, what’s important is the playtime.

Edit 3: And wow I actually get 28 FPS on this scene with a sun rotating scrip… I mean the PC i’m currently stuck with is really bad, ultra low end, but that’s still ridiculous.

Edit 4: I still have problems with the isolated room. It still gets lit when there’s no light reaching into it, the reflection probes do this to it.

2792915--202537--blenddistance.jpg

Also play a bit with the material settings and maybe the indirect intensity.

I had the smoothness of the “room” material to be pretty high in mine and I also boosted the indirect intensity a bit. Other than that I didn’t do anything special.