Secondary soils

Secondary soils are added to refine the first level soil, which lacks of details due to its size and global terrain shaping role. Photogrammetry generated soils are doing the job pretty well and add a lot of realism to the generated terrains. We'll first focus on how these soils can be limited to some regions on the terrain. Secondary soils are added by dragging them from the soil window into the main view (see Designing a first terrain for details).

Masking a soil

Let's try to add a secondary soil, on that region of a first level mountain side soil:

Assuming that we have defined a mask C in our first level soil that represents the region where we wish to see our rocks, the masking operation is simply performed by dragging the mask icon onto one of the slots of the mask area:

This'll restrict the region of the terrain where the soil is applied. The mask can be visualized too by selecting the 'mask' entry in the display mode dropdown of the main interface. That way we see the weighting factor that'll be applied to the soil.

Note that the color distortion is not applied to masks.

We can also use the first soil slope information to generate roughly the same mask. Doing so we can save the need for a mask image and use that entry for another purpose. So let's select the slope instead of using the 'mask C' entry:

By default the slope don't match our selection criteria we had before using 'mask C'. So let's profile our slope. Click on the profile button just above the mask entry that has received the slope:

This'll open up the profile box:

Then, we can define a slope profile that can look like 'mask C':

Using the slope instead of a texture mask can save some memory, as masks entries are full sized texture images, so for a typical 4k x 4k landscape, the CPU memory cost is about 16 Mb per mask. Then, slope based masks are accurate and are not based on the first soil resolution, so whenever possible, it might be a good idea to use them.

Defining complex masks

As we can see in the mask box of a soil, we have 4 different mask entries that can be used:

The combination of these masking operations is ( mask0 (op) mask1 ) (op) ( mask2 (op) mask3 ), where mask0-3 are the masked entries that can each be profiled, and (op) indicates the combination operator used between masks.

We also have an 'outer mask region' control in the mask source box:

To detail the behavior of this small check box, let's consider the example below. We map a rock texture (SUB_Ground_Stone) onto a first level soil (EU_2_Terrain), using a mask entry 'maskF' that contains a kind of middle slope area. The mask area is a bit profiled to make it steeper:

Now let's assume that we want some grassy soil to be mapped everywhere else and that we want this grassy soil to connect with our rock image. We can get this by using an inverse mask for the grassy soil (we drag the mask icon from SUB_Ground_Stone into a mask slot of SUB_Grassy_Ground and invert its profile curve):

We can clearly see that the connection between the two soils is far from being ideal. Ideally, we would see our grassy soil to go in between our rocks. To achieve this, we'll use a mask defined in the SUB_Ground_Stones rock texture:

Fine, if we use that map, we can set these white areas in between our rocks to be in the mask we want for the grassy soil. So let's do this: we can see, the 'maskA' of the SUB_Ground_Stones soil gets limited by the own mask used to apply SUB_Ground_Stones. This is normal: we have set our rock map to be in a given area, so all the output it produces are limited to that area. The schema below details this behavior:

So we have part of what we wanted: to see the grassy soil 'invade' our rocky soil in between the large stones that compose it, but it's limited to the area of that soil. We can now press the 'outer mask region' button that'll have the masks generated by SUB_Ground_Stones extended outside of the own masking area of that soil:

When this 'outer mask' button gets pressed, all masks generated by a given soil are set to white outside of the own soil mask region. If not pressed (which is the default), all masks generated by a given soil are limited to that soil own masking region.