Pages

Monday, July 20, 2009

Real-Time Water Rendering with Reflection and Refraction Demo


After a week of preparation, i am proud to present my first public tech demo "Real-Time Water Rendering with Reflection and Refraction". Built using the new and improved MageDx 3D graphics engine, the demo showcases the following graphical features:
  • Water rendering with reflection and refraction (obviously)
  • Atmospheric scattering
  • Parallel-split shadow mapping
  • High dynamic range lighting (using the Phong shading model)
  • Depth of field
  • Screen space motion blur
  • Screen space ambient occlusion
There are a couple of features that did not make it in due to time constraints (example: god rays, sub-surface scattering), i guess i just have to cover them in future demos then.

Download link: MageDx Water Demo (8.79MB)

[Controls]

W - Move forward
S - Move backward
A - Move Left
D - Move Right
Mouse - Look around
F11 - Take screenshot
1 - Toggles shadows on/off
2 - Toggles depth of field on/off
3 - Toggles screen space ambient occlusion on/off
4 - Toggles motion blur on/off
5 - Toggles day-night cycle on/off

NOTE : The demo requires a graphics card that supports shader model 3.0 and should run fine on both ATI and NVIDIA cards.
If you face any difficulty running the demo, make sure you have the latest DirectX runtime and video card drivers installed.
For those unable to run the demo, i have uploaded a short video footage below. Enjoy!


Monday, July 13, 2009

Bought a Nvidia 260GTX :) / Atmospheric scattering

Bought a Nvidia 260GTX :)
My old graphics card (a Nvidia 8800gts 320) died recently while trying to do a video capture. Poor card started to chew out weird colored pixels and never recovered. Since the warranty for the card has expired a long time ago, I decided to purchase a new one. The revised Nvidia 260GTX with its 216 shader cores, low power consumption on idle (when compared to ATI's equivalent offer the HD4870) and lower temperature on load are the deciding factors I bought one eventually. After testing out the card in a couple of games, I must say I am very impressed with the performance delivered. In fallout 3, I was able to max out the graphics settings at screen resolution of 1680x1050 and the game was still fully playable. In MageDx tech demo II, it doubled the frame rate I got with the 8800 gts 320, going from an average 50~60fps to an impressive 110~120fps. I would recommend this card to anyone looking for an upgrade but beware of the size of the card, measuring at 10.5 inches (26.7cm) long, this card is definitely not for those who has a small casing.

Atmospheric scattering
Over the weekend, I have added atmospheric scattering to MageDx. My implementation is based on the paper "Rendering outdoor light scattering in real time by Hoffman, N., Preetham, A.J.". Getting the sky to display correctly was pretty tricky, it took me quite a bit of time tweaking the rayleigh/mie parameters to get nice sky blue color shown in the screenshot below.

To see the full effect of atmospheric scattering, i recommend looking at the video i have uploaded below. The video shows a simple day-night cycle simulation complete with dynamic lighting and shadowing.


Thats it for now! Back to more coding...