Water Tutorial

(Redirected from Advice on Creating Water)
Jump to: navigation, search


He beginner.png

To create a river, see River tutorial.

Water is made within the game by creating a water node, sizing it, setting its type (river/ocean/etc) and adjusting its properties.

Note: The original version of HeroBlade used mirrors to emulate water reflection. The current version of HeroBlade uses "cubemaps" to emulate two kinds of water reflection. The term "mirror" is still used, however, to indicate a water's Type.

A simple water node, with the Width/Depth/Height tool Bounds.png activated.


Water Type

Examples of each of the types of water in the same tropical setting.



Well done!

Ocean Water is Confusing

Ocean water is designed to be low impact. By default it has a wave texture, and an old opaque dark blue cube map associated with it, which we of course expect you to change. But some developers have still become confused about what it takes to make nice looking water.

The simple explanation is that the side color of the lighting scheme, plus the texture for the ocean waves, plus the shader for the water, plus the diffuse color of the water, plus the opacity of the water, plus the cube map and its color (if the water color alpha is set below 1), all combine for the outcome of the over all color of ocean water. Which is very low impact, and designed to cover a large area.

Our implementation is realistic, and looks great with great cube maps and color and lighting choices. But if you don't have a working cube map in place, many strange things will happen, and the default cubemap is obviously not the one you'll want to use in your shipping product. You can of course also customize the shaders and textures associated with the water to make it do different things, but we don't recommend it to teams without relatively knowledgeable engineers or artists.

Here we whipped up a little cliff side island scene, used the default example HeroEngine Logo Cubemap, it's just 6 colored boxes in the center of white backgrounds, attached it to the water, set the water color to a light cyan and then took some screenshots with various color alpha settings, and water opacity settings, both looking into the light, and some looking into the side light. You can see that even with a strange multi-colored cubemap, I can can achieve some great looking and different styles.


Engine Level Textures

You are welcome to modify any of the default engine shader textures.
For instance: /Render/ShaderTextures/water_ocean_waves.dds. It's an eight-layer cube map used for water displacement. The RGB channels are a normal map and the A channel is used for wave height. The layers are simply stepped through linearly according to WaveSpeed * .5 * clock

See also

Personal tools