Sky rendering trick

Lastly I worked on the rendering for my prototype. The tiles from kenney look quite nice, but that’s not yet a whole world. A world needs more depth, movement and life. That’s how I added a sky.

map1
An sad empty place

Adding clouds and a sky map was a good starting point. They move, rotate and an additive blending adds a nice touch when the overlap. The final trick is to add some transparency relative to the proximity of the camera : the closer, the more transparent. It gives the feeling of passing through the clouds without having headaches with volumetric stuff.

day
A bright cloudy day
@Override
public void act(float delta) {
super.act(delta);
updateCloudCount(); //Removes clouds gone too far, adds new ones

getColor().a = (zoom - minZoom) / (maxZoom - minZoom);
}

 

 

thinner_clouds
Clouds get thinner as we zoom in

 

Then a simple circular skymap that slowly rotate to handle the night/day cycle.

 

night
Now a cloudy night

And that’ll be it for today !

Leave a comment