This paper presents a method for blending any number of detail
texture maps over a base map, for example when rendering terrains,
based on the color of the base map. A color is assigned to each
detail map instead of using a mask texture and the detail maps are
blended over the base map based on the 'distance' of that color
from the color of the base map at each fragment.
The images below were created using a base map as well as four detail maps for soil, grass, sparse grass and asphalt. All terrain shading (including the road) is done with detail map blending.
The images below demonstrate the dependence of the blending transition sharpness on the resolution of the base map due to per-pixel evaluation of mixing weights. The lower row shows the terrain shaded with the base map directly while in the upper row the base map has been blended with 4 detail maps. From the left to the right the resolution of the base map is 2048×2048, 1024×1024 and 512×512 pixels respectively. While the resolution of the blended detail maps drops with the base map in the sense that the areas dominated by different detail maps tend to grow larger as the resolution of the base map drops, the transitions themselves are unaffected.
|2048×2048 px (0.625 m) resolution||1024×1024 px (1.25 m) resolution||512×512 px (2.5 m) resolution|
This set of images demonstrate the effect of the power parameter, which essentially controls the sharpness of the transitions between areas covered by different detail maps. The power is lowered from left to write making the mixing of the detail maps blurred and undefined.
|power = 5||power = 1.2||power = 0.6|
These screenshots show the variation in the result possible simply by changing the colors assigned to each detail map. Note that since the same resources are used this allows providing multiple `skins' for the same terrain by providing multiple sets of color configurations. These can be changed on the fly or even animated.
|A barren landscape,||lush meadows,||and something in-between|
The image below was generated by using a weighting function that assigns a weight of one to the detail map with the smallest distance and zero to all other resulting in a sharp cel-like effect. Using a function with more quantization steps should yield better results.
|A cel-shaded landscape|
These videos have been captured from Slipstream, a vehicle simulator, where this method has been employed. The first video features a low power setting and blurred mixing while for the second the power was raised considerably resulting in sharper detail map transitions. For the third video the colors assigned to grass and soil where morphed towards each other over the period of a minute resulting in morphing of the landscape. Note that the soil and grass blend into each other in a complex way instead of a simple fading transition. Again more experimentation could probably yield much better results.