I don't know how they did the water/thinder in this game as there are alot of different approaches to something like this, but it looks like there is a combination of shadows( from the boat ) and refraction from air to water, and it's perfectly possible to implement these two effects using DirectX 9.
The relection/refraction
This can easily be made with snell's law(
More info on Snell's law ) using a HLSL pixelshader.
What you need to have in order to implement reflection and refraction is a cubemap around the water that will be used as a lookup texture for both reflection and refraction. Render the scene( except for the reflective object, the water in this case ) into this cubemap texture, and in the shader, use the view vector and surface normal vector as two lookup vectors from the cubemap, in order to compute the reflection and refraction( see snell's law ) color.
The cubemap must inclue these six versions of the rendered scene: One rendered from the reflection object to the sky, another to the bottom of the ocean, an other forwarc, backwards, left and right.
Thunder shot
There are many ways to create thunder. One way is to use a few animated textures and render them like an animation. Say you have 10 different texture that creates one thunder shot animation, render these in a plane that range from the shooter to the target. Use alpha to blend the thunder with the environment.
An other way is to generate lines/tubes, that form a thunder, from the shooter and ending up at the target. To make this look better, you can also apply glow on the lines so they look more alive. The tubes can also have a random effect so they are generated differently each frame, making them move trough the air.
If you want the tubes reflected in the ocean, remember to draw them into the cubemap as well, making the reflection vector hit the lighting in some spots.
This is a very general answer, and if you want to implement this I can assist you with this. Just send me a mail or visit
my blog.
Petri Wilhelmsen
Dark Codex Studios
Blog |
Twitter Microsoft XNA/DirectX MVP