Technical Technique: Rivers on an Incline

For today’s update I thought I’d write a little tutorial on creating sloped water surfaces in the Electron toolset. The basic tools provided allow for one flat elevation of water per megatile (4×4 tile). You can have different elevations of water, but can only change elevation at tile boundaries, and you couldn’t have water on an incline. Neverwinter Nights 2 can handle inclined water, however. It just doesn’t come with the tools to do it by default.

Basically, NWN2 stores the water plane in exactly the same format as it stores terrain. The toolset cannot edit the water surface to the same degree, so what we’re going to do is shape the terrain to match what we’d like the water surface to look like, and copy those values over. Afterwards, we’ll change the shape of the terrain so that it doesn’t perfectly coincide with our water.

For this tutorial I will be using Tanita’s Watermill, a wonderful little plugin for the NWN2 toolset. The included read-me does a nice job of explaining how to set up the plugin, and even gives a nice explanation of how water and terrain work in the Electron engine. Much of what I’m going to cover here is also covered there, but I prefer to demonstrate with a practical example, and not just screw around in the toolset for a bit.

We start with our exterior area. I’ve gone ahead and filled it with a snowy texture for the hell of it, but you can use whatever you want at this point. The Watermill plugin uses textures to denote the areas of terrain we want to match our water to, so there’s no point texturing anything quite yet, as we’ll just have to redo it later.River1Here, I’ve gone ahead and given basic shape to the area. My plan is to have a steep, rapidly flowing creek join a winding stream which follows a cliff side. Using a texture at 100% pressure with the outer portion of the brush set to 0, I’ve painted the path of both the stream and the creek. I chose one of the blight textures as they stand out, and I’m not planning on actually using them for the area.River2If you look carefully, you’ll note that each major curve in the stream takes places along one of the thick black lines, the borders to the megatiles. I’ve done this because while the game will support multiple elevations within one megatile, it doesn’t support different ripple patterns, which we’ll use to determine the direction the water appears to flow.

Using the Select Terrain mode, I’ve replaced our original blight texture with a different texture in each megatile, such that each texture outlines water that will be flowing in a specific direction. You’ll note that these areas don’t have to be contiguous, as shown with the two separate parallel patches of the sea foam green texture..River3

Next, I’ve fired up the WaterMill plugin and selected one of our blight textures. Pressing the right facing arrow creates a watermap perfectly contiguous with our texture. I’ve set the ripple flow rate and direction below such that this portion of the stream flows directly east. River4After saving our watermap and exiting, you can see that water has appeared over our blight texture. At this point in time, the water surface and the terrain surface lie perfectly on top of each other, which can create some nasty clipping issues. Later on we’ll lower the terrain to create a riverbed in the center, and raise it to create shores at the edge. River5I went back to the plugin and set separate flow rates and directions for the remaining textures. Just as textures are stretched and skewed over steep terrain, the water’s ripple effects appear to be accelerated down steep slopes. Nevertheless, I’ve given the creek a slightly faster flow rate than the stream.

It’s important to note that once you’ve converted a texture into a watermap, that watermap is saved regardless of what you do to the terrain or texture back in the toolset. This allows us to use textures to delineate our water, then scrap them and make the map look pretty and setting appropriate afterwards. River6The completed stream complex is nearly done, save for the rather hideous shades of green marking the riverbed. River7I’ve gone ahead and tiled the whole map with our snow texture again to remove the ugly green. Our watermaps are still saved in case we accidentally mess up, and we can always restore the water to this exact state by reopening the plugin and exporting the watermaps again.

Generally it’s a good idea to paint wider paths for your rivers than you want to end up with. You’ll end up narrowing the stream when you raise the terrain at the edges to create a riverbank. River8With the water set, it’s time to turn the rest of the area into a picturesque winter scene. I’ve retextured most of the map, added placeables and some snow effects, and generally tidied things up. If you look to the top left, you’ll see that I’ve made the area slightly longer. Since it would have been nearly impossible to realign the terrain with the existing portion of the stream and seamlessly continue the water surface, I went ahead and made it a small waterfall to hide the break.River9I hope this tutorial was helpful and will encourage others to play around with pushing the toolset to its limits. Adding inclined water to your areas is a good way to set yourself apart from a lot of builders who simply don’t bother to go the extra mile, and it really gives you a lot more freedom when it comes to designing bodies of water. I hope you give it a shot, and I wish you good luck out there!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s