See what's going on with flipcode!




 


Submitted by , posted on 30 May 2003



Image Description, by


The two screenshots show the latest addition to my terrain engine: a dynamic sky with animated clouds. The sky gradient is computed from a list of colours, which includes information about the sky-colour in the north, east, south, west and at the top of the sky at any given hour. The colours are then interpolated 1) to find the colour for the current time 2) to get a smooth gradient for the whole sky. After the sky gradient has been rendered, I blend the sun as a billboard. Concerning the sun: it's not as simple as that. I've also included dynamic lightmapping into the engine, which computes terrain-lightmaps (including shadows! :-)) over several frames.

The clouds are then rendered using a technique I found in the ATI-cloud sample. Check the ati-website for more information; basically I translated the vertex- and pixel shaders into DirectX HLSL and tweaked them to suit my needs. And finally I add a glow around the sun to the scene if it is not occluded by mountains - a simple ray-check is the base for this.

Stephan



[prev]
Image of the Day Gallery
www.flipcode.com

[next]


 


Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.