I know, it sound wierd, but i want my game to have a day-night cycle, that would be EXACTLY the same as the real one. You look out of window, its night, you look to game, its night.
I dont know if only rotating directional light is enough to get a great effect…
Thanks for help
You would likely do a little more than just a rotating directional light.
I’ve never done this sort of thing before, but here’s how my brain approaches it at a quick glance.
Rotating lights as you said, but ensuring the colour, intensity and direction reflect the changes of the day/night cycle, so the day light might fade in intensity towards the end of the day, whilst another light starts ramping up from the other direction this light would be a colder blue light (or other depending on your scene).
You would also likely want to consider shifting the ambient colour, or skybox would want to somehow transition from a day to night scene as well.
There are all sorts of other things you may wish to do like shifting a more night appropriate ambient sounds etc. But it really depends on what game you’re making, the style, etc.
Hi there,
Just wondering what maths/code would I write to make this all work?
My game has planets and I want to make one of them a real world time.
Thanks.