TERRATECH BLOGS

Skydome & Day and Night transitions 

By Jason Howard, posted 1st March 2016

Since getting back after Christmas, Chris (the Lead Coder) and I have been trying out some new Skydome VFX. Many months ago we switched the game over to having a day and night cycle, but in the process we lost a lot of detail in the sky. The old skydome used a 2D cube map with planets and clouds in it, but with the sky changing colour dynamically this was no longer possible so everything went away except for the sun.

Day & Night

The new day and night cycle uses gradients to control the colour of various components of the skydome.

These are set up for each of the Biomes so that the Grasslands, Desert, Mountains and the Salt Flats can all have different ambient lighting and sky.

Chris has set up the colours to be controlled by gradient ramps in the Biome Data so that the artist can vary the colours over the course of the day rather than simple blending between a colour for day and a colour for night.

As well as having the lighting changing over the course of the TerraTech day it also means that we can create wonderful "Golden Hour" effects during dusk and dawn.

Sun

There is now a sun in the sky and though we had a sun before the light now uses scattering to create haze and atmospheric perspective effects.

This uses techniques called Rayleigh & Mei scattering, but you'd have to talk to Chris about that if you wanted to know how it works. I just play with the sliders until it looks pretty ;)

Clouds

There are now clouds in the skydome. These are dynamic based on a wind speed parameter and cast shadows over the ground. In time Chris and I hope to be able to add weather which will change the density and colour of the clouds.

Moon

As well as a sun there is a moon that rises and sets too. The moon has its own season so as time goes by its rising and setting will go out of synch with the sun.

Planets

Chris and I have also added some planets to the skydome. These are not quite as functional as the moon and the sun, but there are geometry that is lit by the sun and we're planning to have a little more fun with them if we get some time.

Stars

There are now stars at night too.

Fog

Chris also found some time to look at the fog settings which has reduced the amount of geometry that can be seen drawing in as you explore the world or TerraTech.

...and that's it for now. Depending on how things go this year we hope to add randomisation to the planets, adding more variety to them and also try and add weather. Still we’re happy to have the skydome back to looking a little more interesting! ;)