17 November 2010

Source engine day/night cycle & dynamic weather

by biohazardpro

The position of the celestial bodies is dependent from season and clime. Right now the 2D skybox uses one texture with some overlays applied and a procedurally generated static mesh for stars.

All weather effects, daytime, clime and season are synced between client and server. Weather is randomly applied based on the current climate and the time of day can be read from the hosts computer.




Additional information:
The shadowmapping code is written from scratch and not based on Valves technique in any way. In my current build two shadowmaps at 3072² and 1024² are drawn to allow a shadow with a range of 10k units (the video just shows the former one though), all factors are variable and can be changed to the users liking.

During a second pass of the main view various information (worldspace normals, screenspace normals, depth, sky mask, sharpen mask) are drawn via MRTs to different textures at once to allow post processing effects like SSAO, DOF, edge detection and godrays. All screenspace effects can be individually toggled as well.

The weather effects include particle effects, fog, color correction and sounds, every weather routine can be assigned a weight to allow more variety. Particle effects are partially drawn in worldspace and a seperate view similar to how 3d skyboxes work.

No comments:

Post a Comment