Red skies at night skybox BGE

Back again with another question :slight_smile:

So I have this sky box.
Now there is a red colouring the skies between night and day.
In the scene i’ve set up the sun rotates and the sky changes accordingly.
The setup it is in right now the colouring stays between night and day.
But actually it should only be visible from camera perspective when the sun goes down.

How should I implement that?
Checking the resources on the forum right know about skyboxes and their setup and how they do it.
But i’ve done this research earlier and the problem is, in my setup i have a round world and you can walk around it.
It’s not stationary and not only viewed from one perspective!

Blend
Skybox.blend (489 KB)

I’ve set it up so you can move the sun by left click mouse movement. it’s a bit buggy but I don’t have time!
Camera is stationary!

Here’s an idea,
use a background scene!

I don’t like your idea!

I am a noob at nodes (basically 0 knowledge of them), but you can have code checking whether or not the sun is a certain height, separate the skybox material and make it look like the whole skybox is actually a whole object, then, constantly just fade in and fade out the red separate mesh when the sun goes down.

I’ve been thinking of doing it with a hud overlay or the way you described. But i’m fairly new to python so this will take me a long time to complete. And I’m first gonna check if it isn’t ok like it is when i get my timing right.

And the method you described is good IF!
You account the position of the player Cause it is from viewpoint of the player that the sun goes down.

It’s getting a lot more complex then what i had in mind :stuck_out_tongue:

Oh ok. Would it still be too much/too inefficient if you fade in/out a mesh which covers the red part (or red texture) when the distance between the sun and player is greater than a certain value (the sun is directly below the player?) You could use a near sensor which executes animation code if this is a possible solution for you.

I was also wondering - are you planning to orient the sun and moon to the player’s world location? If you have the sun rotate only at a certain degree, then the player could walk around the world and see the actual boundary between day sky and night sky. But also, it would be weird to have the sun “orient itself” to the player.

Then again, you could make the world large enough with bounds so that the player does not see that part, and perhaps have the fading effect between night and day prolonged.

Well actually i’m not sure anymore on how I want it :frowning:
I’ve heard so much feedback. I knew I wanted a cartoony low polygon look.

But working with the round planet and skies rotating around it, I want a certain degree of credibility,
in the system that drives my game!

The concept was to have planets (earthlike) to be game levels. and let them get bigger as the player advanced.
Where you have real small planets early and real big ones late game.

Now I want it to be somewhat more realistic then it is.
But I know it’s going to be a real chore to do all those calculations, browsing trough resources.
Writing complex scripts, for something that started as a real simple idea.

I’m going to close this thread for know and give it some thought.

Probably I’ll do my research and go on with it, till the point I realise it’s much to complex to get my head round.
Then i’ll start something new, but still I got a good feeling with the idea and really like to work it out.

The day night cycle is 24min so that’s pretty long but in a 1min you can walk around the planet and have seen night and day.
And like you say the part where it changes from night to day.

it would be weird to have the sun “orient itself” to the player

Yeah thats completely it I don’t want to create this strange feel by ignoring those obvious normalities.

Anyways I got some feedback that gave me something to think about, more thoroughly then I intended.