Terrain / Grass Materials - Tracks

Firstly please take note of the following pages:

This guide mostly focuses on using the new Terrain shader rather than explaining the legacy shader. However various items such as texture resolutions and settings will carry over to both.

The Terrain shader allows us to have upto 4 albedo roughness maps and two normal maps. These can be setup in many different combinations since we can specify the UVW uniquely for each, however in most cases, we would just use them with 4 uniformly tiling maps, and use a blend of the two normal maps for each albedo.

Albedos

Let's take a look at the real life albedo values for different terrain surfaces


Linear

sRGB

Black soil, dry0.15107
Bare soil0.17114
Grey soil, dry0.25-0.3136-147
Dry clay soil0.15-0.35107-158
Dry sandy soil0.25-0.45135-177
Tall Wild Grass0.16-0.18110-116
Short Green Grass0.2-0.25122-136
Dry sand0.4168
Yellow clay0.16110
Rock0.3-0.4147-168

In practice we find that we need to use slightly darker values than those found in real life. With grass this makes some kind of sense since it has all kinds of occlusion going on in reality. 

Roughness

Due to specular damping, the roughness values do not have a great effect on grass / terrain materials. Typically we would keep them quite rough around the region of 0.7 to 0.9 though.

Texture Setup

Remember for performance it is very important to optimize the resolutions of your textures. Below is a guide for texture resolutions. These are a base guide. 

Note that in general any surfaces that are far outside the track barriers should always be scaled down if not reusing maps inside the barriers. In some cases it is best to have a second outside the barriers material which less densely tiled uvw

Map

Max Resolution

Recommended UV

Notes

Albedo

Generic tile: 2048x2048

WorldPlanar * 0.25

Generally we cap grass textures to 2k x 2k. This is due to the fact we have 4 of them and they are often tiled quite densely.

It is strongly recommended to vary the UVW scale slightly for each albedo to reduce visible tiling artefacts. (i.e. 0.237, 0.243, 0.25 & 0.257 as the scale settings)

Pattern Map2048x2048WorldPlanar * 0.072

This map has two linear channels used to overlay details onto the albedo blending. Usually this is a uniform tiling texture that we limit to 2k x 2k.

It has less dense tiling than the albedo maps typically.

Mix Spec2048x2048

WorldPlanar * 0.157

WorldPlanar * 0.007

We would expect there to be one map shared on all materials in a scene. Note it is constructed by sampling the texture twice at different UVW scales.
Normal Maps2048x2048

WorldPlanar * 0.1437

WorldPlanar * 0.1732

When we have two normal maps we setup one to be for drier ground, and another to be for healthy grass. Once again we limit these to 2k x 2k.

When using two normal maps, make sure they use different UVW.

SplatterDepends on scene sizePlanar mapping on entire terrain usually.At Le Mans a single 8k x 4k map was used for all surfaces. At Portland we used a single 4k x 2k map for the main terrain area. It is recommended to make sure the mapping is as tight as possible.

Material Setup

Here are some notes in general about Terrain material setup.

Specular

On Terrain materials the Specular should be greatly dampened. This can be done via the Specular scalar in Material Adjust. Or via the values used in the green channel of the MixSpecular map. It is recommended that the overall damping be in the range of 25 to 50%.

Pattern Settings

The Pattern Map has two channels which can be blended by Vertex Alpha. If you just want random blending tick "Pattern Random Blend". This is enabled by default.

The strength of the Pattern effect can be controlled via "PatternStrength" under the Terrain Parameters area. It is recommended to author a map that uses the full range of the texture and scale down the strength here. With our own made maps we typically use around 0.5 here. However you should dial in the effect so that it causes subtle variation and is not creating effects with strong contrast.

Normal Map Settings

The terrain shader allows to to set the blend of the two normal maps used for each albedo map, as well as the intensity. Typically one normal map should be setup for normal grass, and another for dry grass or ground. Take care to use logical values here based on the characteristics of the albedo maps, as well as slightly different values for each albedo map to reduce tiling repetition.

Translucency

Translucency settings allow some light to leak through the albedo maps when looking directly at the sun. This mostly has an effect when the sun is low in the sky.

The recommended settings here are a Power of 2 and Scale of 2. And then use the individual Albedo scalar values to tune the effect for each albedo map. The more grass and the greener the grass the stronger the recommended setting.

As such recommend values are:

  • Dry ground ~0.2
  • Dry grass ~0.5
  • Normally saturated grass ~0.8 
  • Very saturated grass 1.0

Blend Settings

The albedo maps blend using the mix map and via the "MixMapBias" value in the Terrain Parameters section. It is recommended to use a value of 0.25 here.

A higher or lower value will drastically effect the blending between maps, making the blend softer or stronger but also effecting the prominence of different maps.