PDA

View Full Version : Half life 2 water FX



McCLaw
03-01-2005, 01:58 PM
Hi All

I am trying to figure out how to get water looking the way it does in HL2.

The reflection is an issue... :?

http://www.sulaco.co.za/images/d1_canals_010010.jpg

The only way I can see to replicate this effect, is to generate a cubemap of the scene each frame, at the position of the camera.

This will work, but will be VERY slow, since the static scene will have to be rendered a minimum of 6 times each frame.

We currently have ALOT of FPS to burn, but I would rather not waste that on Just water.

Any ideas? :?: :?:

McCLaw
03-01-2005, 02:21 PM
On second thought, a stencil buffer type mirror would probably be better more efficient...

Paulius
03-01-2005, 03:43 PM
There is an article about doing a nice water effect at gamedev http://www.gamedev.net/reference/articles/article2138.asp

Clootie
03-01-2005, 09:57 PM
There is a presentation on ATI site how environments were done in HL2. basically they render cubemaps at fixed positions in world (made by level designers). As for water reflections - probably they are done with usual stencil trick: first render "over"-water, later render underwater at stencilled positions, apply postprocessing at underwater surface.