Skip to end of metadata
Go to start of metadata

 

Overview

Sections

The River Tool functions similarly to the Road Tool, but is preferable for setting up rivers as it contains several more, and very important, parameters needed for creating realistic looking rivers.


Uses for the River Tool

The River Tool is used to create rivers. The limitation of the River Tool is that it is essentially 2D. That means, it is difficult to create rivers that flow down mountains and not possible to create waterfalls with the River Tool. To create rivers that run downhill, it is best to use a series of rivers along with intermittent waterfalls. The careful use of particles is particularly important for this to look convincing. It is possible to create a flat river, and then rotate it slightly along the X axis, however, this should only be used to create a very slight incline.

For waterfalls, you can use particle effects, as well as use a DCC tool to create a waterfall. To do this, you need a simple geometry following your terrain geometry with a material that has Illum the Shader assigned to it, set to be a decal, and with a texture map with alpha channel in the diffuse slot with oscillation animation on it.

This tutorial shows you how to use the River Tool to set up a flat river and assign a water shader to it with the Sandbox Editor. In addition to this tutorial, please see the Particle Tutorial to learn how to add particle effects to a level. You can enhance a river by placing foam particle entities to make the effect of flowing water even more realistic.

Preparing the Terrain

In order to create a realistic looking terrain, it is important to first prepare the surrounding terrain for the river. To create a realistic river bed, make sure that the walls of the river are above the starting point of the river for the entire length of the river. Also, paint the bottom of the river a different texture than the surrounding area, particularly if the water will have translucent properties.

For more information on modifying and painting terrain, please see the respective tutorials.

Placing a River Entity

On the RollupBar select Objects -> Misc -> River. As with all of the tools in the Misc category, click to activate it.

Continue clicking to place a series of points that will make up the river. The more points you place, the greater the degree of control you will have over the general direction and curvature of your river.

Remember that the wider your river is, the farther apart your points should be to avoid clipping at sharp corners.

Don't worry about parts of the river disappearing in the terrain; you can adjust that later.

Assigning a Material

With the river selected, go to the RollupBar and click the MTL button that says <No Custom Material>

 

This opens the Material Editor where you can select a suitable material for the river.

Select the Materials/watervolumes/water_rapids material. This material has the WaterVolume shader assigned to it.

 

Icon

Make sure to select a material that that uses the Watervolume Shader, when applying a material to a river.

 

Also pay attention in the Material Editor to the Shader Params and Shader Generation Params settings. With these you can adjust the way your river looks.

When you're finished selecting the material and making any adjustments, press the Assign Item to Selected Objects button to assign the material to your river.

Now you can inspect your river and see how the assigned material looks in your level.

By default the river color will probably be too bright, try lowering the color:

Adjusting the River's Parameters

In addition to the Shader Parameters mentioned earlier (which you can adjust in the Material Editor), the River Tool entity also has parameters that you can adjust. With the River selector, go to the RollupBar.

In the River Params section, you can several settings for the river including how the material tiles, fog coloring, caustics settings and more.

Also, you will notice that the Speed parameter of the river can be adjusted here. This is the speed at which physicalized objects will float down the river; it doesn't affect the look of the river itself. The visual speed of the river is controlled in with the Flow Speed parameter in the Material Shader Params.

Property

Description

Width

The Width of the river. (Usually set much wider than the actual river width, as the visual river width is defined by its surrounding terrain.

BorderWidth

Only used for the Align Height Map function, this will make a smooth edge on the terrain geometry if the BorderWidth Value is higher than the Width value.

StepSize

Sets the distance between each step along the spline. Smaller value will increase the polycount used for the river surface, but will also smooth out corners.

ViewDistRadio

Specifies how far the river entity will be rendered.

TileLength

The Length of the River Texture. Tweak this in combination with StepSize to avoid stretching textures.

Depth

Specifies the Depth of the River.

Speed

Defines how fast physicalized objects will be moved along the river. Use negative values to move in the opposite direction.

FogDensity

Specifies how dense the fog appears. Larger number will result in "thicker" fog.

FogColor

Sets the fog color.

FogColorMultiplier

Defines how bright the fog color is.

FogColorAffectedBySun

If true, SunColor value set in the Time of Day will affect fog color of the river.

FogShadowing

If enabled, surface of river will receive shadows. You can control the shadow darkness, valid input 0-1.

Icon

r_FogShadowsWater needs to be set to '1' for this to function, which is currently only enabled on Very High Spec.
If you use VolFogShadows in Environment Panel, you lose control of shadow darkness (automatically set to full).
The benefit here is that the fog in the WaterVolume will receive volumetric shadows! See below for comparisons.

CapFogAtVolumeDepth

If false, fog will continue to render below the specified Depth of the river.

UScale

Sets the Texture tiling on the U Axis.

VScale

Sets the Texture tiling on the V Axis.

Caustics

See Water Volume Caustics for more information.

CausticIntensity

See Water Volume Caustics for more information.

CausticTiling

See Water Volume Caustics for more information.

CausticHeight

See Water Volume Caustics for more information.

Additional settings

Shape Editing

Edit button will allow to modify, adding (CTRL + click on a line) or deleting (double click on a point) of points on the line of the river shape.

Width

Sets the Width of the river per point along the spline.

Align Height Map

Will modify the terrain geometry based on the shape of the river and its border width parameter.

Editing Single Points

Editing single points in a river is exactly the same as editing points within a road and both objects have a number of similar options.

Click Edit in the Spline Parameters section.

 

You will now be able to control every key point on the river. You can change the X, Y, or Z positions separately, X and Y together, or move the key point on top of the terrain. For this, choose one of the axis lock modes in the task bar.

Unchecking Default Width will allow you to type in a specific width for the river at that point you've selected.

Results

Once you have everything set up, the river should flow gently. To enhance the look of the river, the ground material needs to be painted with an appropriate texture and some vegetation added.

To make the river flow down from a mountain to the ocean, the river shape needs to be rotated (use only small X values like 0.5 or 1).

 

  • No labels