Disclaimer: I am not a texture artist. Source textures have been acquired through (somewhat) nefarious means and the shaders should only be judged from a technical standpoint. Default starting instructions are 51 for the base pass, 38 for Point lights, and 51 for vert shaders just to get a single diffuse map to display. Numbers shown in the node graphs arent really as high as they seem.
These shaders were created in UDK since it supports all the neat bells and whistles an artist could ask for, and it's free.
With the exception of finding out how to make parallax and displacement maps work, all of this is freeform development, no tutorials were used. I have had previous experience with maya's hypershade, so the concepts were familiar.
My first shader experiment in UDK, this stuff is fun! The shader consists of Diffuse+Height+Normal maps of water waves and a "Landscape" that can be any thing that can generate a heightmap. Think riverbed, aqueduct, forming ice, volcano+lava, spreading alien moss etc.
- Occluding heightmaps: Only the highest of the maps at a specific pixel will show its diffuse/normal.
- Soft Transition: The border between water and wall is a soft, tuneable gradient. The "Soft if" network turns two heightmaps into a grayscale map with opposing values. This can then be multiplied, biased and clamped to generate a mask for lerping other texture maps. This network is also a few drawcalls faster than the built in "If" node, and this shader would require 3 If nodes to do the same job with harsher edges.
- Tuneable water height: Water has exposed numbers for wave height and overall water level. Hooked up properly a dry riverbed could flood by increasing a single value or panning a ramp texture.
- Color/texture shift based on depth of water from surface: The effect in these movies is subtly darkening the diffuse, but deep areas can be made any color/tint desired. This is faked using the difference between heightmaps, and is not a raytrace to see how far a pixel goes into the water volume.
- Refracting Landscape+Parallax height: Everything underwater is faked, so parallax was used to give the floor an illusion of height, then further perturbed by the water's normal map alpha height.
- Water ripples perturbed by Landscape: This is very subtle, and could be improved with a properly mastered texture. The examples show a low-rez blurred copy of the height map that push the water's normals away slightly. UDK doesn't provide a default way to blur a texture, but with a custom blur/mip lookup node this extra map could be removed as well. A texture can even be mastered to curve around the obstacles and create wakes if the water only flows in a single known direction.
- Wet Edges: This could be done with another muliply pass against the "dry" landscape texture using a time-delayed water mask.
- Specular maps: Currently the shader has flat specular being affected by normal maps. A simple lerp hooked up to the individual spec maps and the existing mask is all that's needed.
- Texture optimization: If textures were custom created this shader would only need 2xdiffuse+alpha and 2xnormal+alpha to do everything seen here. 4 texture lookups instead of the listed 6.
- Anisotropic reflection on water: More important in an ocean than a tiny pool of endlessly flowing water, but still missing. Could be multiplied into the water's spec map once it's added.
- Ripple refraction improvements: Another graph could be made that would make the ripple offset map flow outward, further selling the displacement.
Download Alt Viewpoint