Saturday, January 30, 2010

Projected Grid Water

This is the implementation of water using projected grid. It has both refraction and reflection. Also, it gives better detail up close and also has smooth and good water displacement. Noise textures are created and animated to create height map. It allows to simulate various water waves type: from near flat water to large waves ocean. Combine with atmospheric scattering and we have some nice ocean scene. The implementation is based on Claes Johnson's paper.

Some screenshots:




And here is it in action:

- For large view: follow this link

- Watch it here:



* Demo breakdown:

- Deferred shading is used to achieve better and faster rendering than forward rendering. Lighting calculation was done in camera space and optimized using stencil masking.

- Atmospheric scattering was computed based on pre-computed textures: transmittance, irradiance, and inscatter. It has multiple scattering for realistic color.

- Noise textures were created and animated over time. They then were used to create heightmap for the water grid. Heightmap then was used to generate normal map that can be lookup in the shader for water grid.

- Water grid was projected using a 2nd camera with some elevation from the original camera. The 2nd camera projection was built based on the main camera's frustum.

- Sun scattering color was blend with terrain texture to create realistic color with respect to sun position during the day.

- SSAO was added for more realism and give a sense of depth for the scene.

Atmospheric Scattering

This is the implementation of atmospheric scattering. It has multiple scattering as well as ground scattering for terrain. It is based on the paper of Eric Brunton. Here is a couples of screenshot:





And this is it in action:

- For large view: follow this link

- Watch it here:



* Demo breakdown:

- Deferred shading is used to achieve better and faster rendering than forward rendering. Lighting calculation was done in camera space and optimized using stencil masking.

- Atmospheric scattering was computed based on pre-computed textures: transmittance, irradiance, and inscatter. It has multiple scattering for more realistic color.

- Sun scattering color was blend with terrain texture to create realistic color with respect to sun position during the day.

- SSAO was added for more realism and give a sense of depth for the scene.

SSAO

SSAO has been a standard graphic technique for a while now in almost every games. Therefore, I thought I should put up my implementation of SSAO. This is based on the implementation of Arkano over at Gamedev.net. Thanks for the amazing job Arkano.

A couple of screenshots:

Tuesday, January 12, 2010

A post after so long!

This is just a post to revive the blog :). In the past few months, I revamped the demo and implemented deferred shading instead of the traditional forward rendering. I also clean up my code and organize them for better readability and maintenance.

Currently I'm working on implementing multiple atmospheric scattering from Eric Brunton's paper. I will post a video soon. Until then, take care.