I spent hours today working on this water material.  I thought it was going to be a great idea:  Instead of going into a separate 3D modeling program to make every separate river, lake, and waterfall in the game, painting the flow around every bolder, and then importing the model, I could just make a material in UDK that could do everything for me.

What you see there is a translucent animated water material, placed into a landscape material, that switches to an animated 3D projection waterfall texture when the normal hits a certain threshold. And the water material has different terrain layers that are just different panners attached to the same texture, so you can paint the direction you want the water flow. I switched back and forth between the water landscape and a land landscape to get the two to fit together.  And you might think from this first little experiment that we’re off to a good start. Well, we’re not. This breaks so much stuff that I’ve had to reinstall UDK twice, and I’m not going to try it again.

First off, I learned that you can’t paint a translucent material onto a landscape. You can paint an opaque material, and then make it translucent later, but if you try to paint a translucent material on to begin with, you’ll crash the editor. And if you have a sobel edge detection post process, then things really get messed up. UDK now does something strange with my DefaultSystemSettings.ini’s bAllowSeparateTranslucency, and I get an ugly black outline around fireflies, candle flames, and other glowing particles. If I turn off bAllowSeparateTranslucency, then I get an ugly black line through them when they cross over the place where a line would be behind them. And having a sobel edge detection on also screws with the landscape brush, which becomes a thick black smudge. And for some reason, if I PIE while landscape tool is up, then it looks OK, but if I turn off the landscape tool, then I think the landscape’s LOD gets all screwed up:



I think all these problems are just bugs in UDK, or maybe I’m just trying to make UDK do something it wasn’t supposed to do.  Well anyway, I guess I can call this an interesting experiment, but I don’t think I’ll be able to use any of it in the game.