News / Reflective water by Kegetys

Reflective water by Kegetys

Marcel warned us about really REALLY radical video. Radical in the context of OFP history. This is godlike Kegetys’s work! It is really unbelievable! This video presents the great effect - objects reflections on the water surface!!! WOOOOOOOOOW! (Quoting Feer: “It is done by intercepting Direct3D COM object calls, basically same method how people create wallhack cheats etc. in games.”)

More technical details by Kegetys posted in Official Forum:

Well, as feer said, it works as being kindof a “proxy” between Direct3D and OFP, doing various things of its own in between. Fraps for example works somewhat alike. Originally it started as an idea on how to get OFP to use trilinear instead of bilinear filtering, and now it does many more things (I have been working on it with feersum for a few weeks now).
The reflections, with full settings (terrain & objects reflected) are somewhat “heavy”, especially on Radeon based cards which seem to dislike frequent switches in render targets. It runs quite well on my GF4 Ti4200 though, and there are some methods to optimize it but implementing those is a bit difficult and will propably take time… Basically it intercepts the drawing of terrain and/or objects and draws them inverted into a texture, which is then used when drawing water as a projected texture with environmental bumpmapping. So everything seen in the reflections needs to be renderd twice, and it doesn’t actually use any pixel shaders at all (Even OFP default ones are disabled while drawing the reflections as clipping planes don’t seem to want to cooperate with them for some reason). There’s some other things to do too, like getting the sky reflected which is going to be quite tricky also.
The dll does a bunch of other things too, like it can force the use of trilinear filtering, it can remove the “black & white” night pixelshader, adjust the mipmap LODbias, display FPS, and apply “postprocessing” pixelshader effects. In theory anything “graphical” is possible, but implementing even some simple things can be very difficult. The only thing the dll “sees” is an endless stream of triangles and Direct3D commands passing through and it needs to analyze those in real time.
Making mirrors would also be possible in theory, but those would also require another pass with everything redrawn and implementing the mirror face detection could be quite tricky.

Report, or contribute

A broken download, a missing picture, an article that reads wrong. Also a file the archive does not have and you do, or an idea for what it should hold next.

The site is open source, so a fix can arrive as a pull request as readily as a message.