Thursday, 28 June 2012

Dynamic Sky Sphere

I guess this started out as a bit of a toy. Using my old skybox code, I thought it would be a good idea to have the shader manage the lighting of the sky, you know have like a nice sun rise/set, have the color of the sky slowly change over time. But as I was using a box it meant that you got some corners in the sky, now I have done some things in my youth that have altered my perception of the world around me, but nothing ever put corners in the sky.. So I thought about using a sphere, so I built one in Blender3D and UV'd it as a sphere so I would get a nice set of tex-coords.

As you can see from the screen shots I am also passing the lighting position to the terrain shader as the time passes. I have also added a point light calculation to the terrain shader so you can see where you are going in the dark.

This is going to be an on going project of mine, at the moment there is no "Sun" in the sky sphere and I want to add weather to it (clouds etc..), it may well be out side my technical capability, but I wont know until I try :)

In my next post I will describe the shader as it currently stands. As ever your comments are welcome.

Here are a few shots to be getting on with.. (notice the time of day in the top left hand corner of each shot)

No comments:

Post a Comment