**** The included fx_step_splash.mdl interferes with the current NWN fancywater shader in EE. When fancywater is enabled, you will probably see white squares emitted on water surfaces from any character crossing water. You can either remove all instances of my custom fx_step_splash.mdl from the included hacks (to allow fancywater to take over), or disable fancywater in the game options (to retain this custom water). ****
This is a modification of Soren's normal and spec mapped basic shader (fslit_nm.shd). I've added a portion of Sherincall's bumpyshiny water shader (fs_water.shd).
Click for Youtube video (version 0.8)
Like Soren's shaders, this one picks up the sun direction (with approximate solar normal of [-0.5, -0.5, -0.75] ). When you walk into the sun, the water will take on additional specular and diffuse flare. Unlike Soren's shaders, I've also given the waves some color when you walk opposite the sun. Instead of lightness, I've applied a bit of darkness to simulate away-waves.
Most of the wave work is being done by a single new wave function, and the rest is just a modification to Soren's lighting functions. The new function picks up wind events just like Sherincall's water.
The package (which is just a zip, not a hak) contains the new water fragment shader, and a copy of the standard vertex shader. I've included my Granitelands 2 water texture, normal map, and spec map, along with a MTR file which calls on the new shaders.
The package also contains a new footstep_splash model which has a longer 4 second duration and "explodes" multiple times. This creates the needed wind event which pushes the water surface as you walk through the water. This is the modification that really makes Sherincall's wind-driven water functionality come alive.
The footstep model can also double as a wind placeable if you add it to placeables.2da, or even as a visual effect with customizable duration. This will let you mimic wind events at any duration.
The purpose of this package is to show users how water can be animated using the new shaders, and without actually using the bumpyshiny water feature in the Advanced Options menu.
I highly suggest applying the texture to a watery thing you're working on, then plop the shaders in your development folder. Play with the customizable constants at the top of the script to make bigger waves, or modify tint mixing.
Inside the fragment shader script are a bunch of contants at the top of the code. You can change these all you want. They're well documented as to what they do to the visuals. I've also included a screenshot here of the customizable constants.
Keep in mind that if you stray too far out of the provided notes and suggestions, you're going to crash the shader script, and maybe do a hard crash on the game engine. Such has happened many times while I was writing this script.
I've tried using MTR files to simply replace existing vanilla water textures, but it doesn't work that way. So to use this in vanilla tilesets you'll have to make some fake empty TXI files to undo the animations and other TXI effects.
As mentioned, this is not a replacement for the standard water shader. Instead, this is called via MTR material files (see included MTR file). This shader lets you make any texture into a fluid.
Have fun!
Revision Log
v 0.10:
v 0.8:
Attachment | Size |
---|---|
![]() | 255.06 KB |
![]() | 254.57 KB |
![]() | 253.39 KB |
I did some more testing with this today trying to use this shader as a replacement for water in original content zones. The specular value of the zones is set too differently for the water to work the same as in my own zones, and so the sun brightness never gets picked up by the water surface. Otherwise it does work as a replacement.
This means that all the water tiles of the various original content tilesets would need to be rebuilt with a different color scheme, or another shader be built specifically to overrule the water surface properties.
very nice!!!