Procedural texturing: Difference between revisions

Jump to navigation Jump to search
Line 119: Line 119:


The default value is zero, the parameter can range from 0 (dry) to 1 (very wet, lots of open water).
The default value is zero, the parameter can range from 0 (dry) to 1 (very wet, lots of open water).
==== The overlay texture ====
The overlay texture is a texture at a similar resolution level which is mixed with the base texture to achieve de-tiling or gradient effects. By default, it covers about 50% of the available scene. As for the base texture, the alpha channel of the overlay texture encodes color rotations in autumn.
[[File:overlay1.jpg|300px|center|The overlay Texture]]
The overlay texture can be used in two different modes or a mixture of them. The control parameter is <transition_model> - if this parameter is set to 0, the transition between base and overlay texture is determined by a noise function. If the parameter is set to 1, the slope of the terrain determines the transition and the overlay texture is only used on steep slopes. A setting of 0.5 uses a mixture of noise and slope information to drive the transition.
* declaration:
<texture-set>
  <texture>base_texture.png</texture>
  <texture n="12">overlay_texture.png</texture>
</texture-set>
The default texture selected is void.png which corresponds to no overlay texture.
* parameters:
<parameters>
  <transition_model>0.5</transition_model>
</parameters>
The default value is 0.5, the parameter can range from 0 (random transition) to 1 (gradient-driven transition).
==== The hires texture ====
The hires texture adds patches of a texture at much higher resolution into the mix, which both add to de-tiling and lead to a better experience of the scenery from close-up. The hires textured patches will however inevitably appear featureless from large distance and will show tiling themselves, so the amount of hires texture as well as the hires texture sheet itself must be designed carefully.
The areas covered by the hires texture will (partially to mask tiling of the hires patches) receive a stronger bumpmap and some distortion than the rest of the terrain by the shader.
As for the base texture, the alpha channel of the hires texture encodes color rotations in autumn.
[[File:overlay02.jpg|300px|center|The hires Texture]]
The parameter <hires_overlay_bias> controls the fraction of terrain covered by the hires texture patches - by default about 40% of the scene will be covered. Positive or negative biases can make the fraction arbitrarily small or large.
* declaration:
<texture-set>
  <texture>base_texture.png</texture>
  <texture n="11">hires_texture.png</texture>
  <texture n="12">overlay_texture.png</texture>
</texture-set>
The default texture selected is void.png which corresponds to no hires texture. The hires texture does not require the overlay texture to be declared.
* parameters:
<parameters>
  <hires_overlay_bias>0.0</hires_overlay_bias>
</parameters>
The default value is 0.0, the parameter can range from -0.5 (strong suppression of the hires overlay texture) to +0.5 (strong enhancement of the hires overlay texture).


=== Pixel color postprocessing ===
=== Pixel color postprocessing ===
1,360

edits

Navigation menu