Soil blending operators
We'll detail here the soil blending operators. We have started looking at these operators earlier in that book, here: The atlas layer. There are three clickable blending operator boxes in a soil's bar, for:
- Color blending
- Reflectance blending
- Density blending
The bar itself contains the same operators as those detailed in The atlas layer:
Each blending operator modifies the combination between the value 'under' the soil and the source soil value. Below is an example for the color blending operators with each operator:
The reference soil is on the leftside of the image. On dragging a new soil over it (with a mask applied, which is not shown here), we get the default REPLACE mode. In that case, the output color is the color of the incoming soil that replaces any other previous color, in areas where the mask is valid for that soil. Similarly we have the ADD, SUBTRACT, MIX and OVERLAY operators. Each operator has an 'amount' parameter in 0-100. The blending that occurs is detailed below:
- REPLACE: final_color = new_soil_color * amount.
- ADD: final_color = new_soil_color * amount + current_soil_color. This is a component wise color addition that can quickly saturate to white if the amount is too high.
- SUBTRACT: final_color = current_soil_color - new_soil_color * amount. Simple subtraction operation. Can lead to unwanted colors quite quickly if the amount is too high. In that example, the new soil has a reddish tint and subtracting component wise let a blue result.
- MIX: final_color = new_soil_color * amount + current_soil_color * ( 1 - amount ). At 100% amount, the mix is like a REPLACE. At 0% amount, the MIX don't mix anything and the new soil's color is not visible.
- OVERLAY: final_color = ( new_soil_color - mean_new_soil_color ) * amount + current_soil_color. The OVERLAY adds an amount of the difference of the new_soil_color with its mean color. Practically, this means that areas of new soil that are brighter than the average will enhance the color of the current_soil_color while areas that are darker than the average will darken the color of the current_soil_color.
The same formula mechanics go for the reflectance and the density. Elevation mapping is OVERLAY and can't be changed to enforce the first soil influence as the shaping soil layer. Ambient occlusion mapping is OVERLAY too so that we can get a coherent terrain ambient occlusion with many overlapping layers.
Secondary soils | Density modifiers |