Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Stephan Reiter, posted on May 30, 2003




Image Description, by Stephan Reiter



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]

 
Archive Notice: This content is archived, and commenting is no longer active. It is here for reference purposes. This content was added on an older version of flipcode, before the site closed in 2005.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.