Procedural texturing: Difference between revisions

Jump to navigation Jump to search
Line 421: Line 421:


* <b>Landclass boundaries</b>: Procedural texturing can de-emphasize landclass boundaries. This happens for instance if a landclass uses both overlay and detail texture, and only the base texture is changed in the adjacent landclass. Since the noise is continuous across landclass boundaries, the change in base texture is masked by the continuous overlay components. However, procedural texturing can not remove the landclass seams, as a different texture mix is evaluated for every declared landclass.
* <b>Landclass boundaries</b>: Procedural texturing can de-emphasize landclass boundaries. This happens for instance if a landclass uses both overlay and detail texture, and only the base texture is changed in the adjacent landclass. Since the noise is continuous across landclass boundaries, the change in base texture is masked by the continuous overlay components. However, procedural texturing can not remove the landclass seams, as a different texture mix is evaluated for every declared landclass.
* <b>Tiling for non-natural landclasses</b>: The de-tiling strategies described above are based on mixing texture components using noise functions. This works fine for natural landclasses, but human-influenced landclasses like agriculture or urban terrain are not well described by Perlin noise, and de-tiling crop fields using noise functions does not yield plausible results. A suitable function producing for instance plausible agriculture pattern has yet to be found.


* <b>Detail averaging:</b> A problem arises when details are generated which are smaller than a pixel. In this case, the rendering engine does not average over many sub-pixels to determine the final color of the pixel but just takes one (few) samples. This means that a high contrast detailed structure of black and white is not averaged to a grey pixel but, dependent on the viewer position, either results in a black or a white pixel. The net result is a flickering Moire pattern which is visually very unpleasant (the same effect occurs when models get smaller than a pixel). In textures, the problem is solved by mipmapping - every 4 pixels are averaged to a single pixel on a coarse-grained version of the texture at texture loading time, and only the appropriate resolution level of the texture is referenced. To do the same thing in procedural texturing is very expensive (two resolution levels up one ends with 16 times the calculational effort for a pixel), so a viable strategy to remove the flickering patterns involves replacing noise by its <i>global</i> average (i.e. the 'all pixel' rather than '4 pixel' average, which is usually known for the noise function). The net result is that procedurally generated details tend to looks less grainy than true textures as soon as details get smaller than a single pixel, which is s subtle, but noticeable effect. In essence, this is similar to an antialiasing problem and could also be dealt with by generically sampling multiple sub-pixels at the expense of the increased performance cost.
* <b>Detail averaging:</b> A problem arises when details are generated which are smaller than a pixel. In this case, the rendering engine does not average over many sub-pixels to determine the final color of the pixel but just takes one (few) samples. This means that a high contrast detailed structure of black and white is not averaged to a grey pixel but, dependent on the viewer position, either results in a black or a white pixel. The net result is a flickering Moire pattern which is visually very unpleasant (the same effect occurs when models get smaller than a pixel). In textures, the problem is solved by mipmapping - every 4 pixels are averaged to a single pixel on a coarse-grained version of the texture at texture loading time, and only the appropriate resolution level of the texture is referenced. To do the same thing in procedural texturing is very expensive (two resolution levels up one ends with 16 times the calculational effort for a pixel), so a viable strategy to remove the flickering patterns involves replacing noise by its <i>global</i> average (i.e. the 'all pixel' rather than '4 pixel' average, which is usually known for the noise function). The net result is that procedurally generated details tend to looks less grainy than true textures as soon as details get smaller than a single pixel, which is s subtle, but noticeable effect. In essence, this is similar to an antialiasing problem and could also be dealt with by generically sampling multiple sub-pixels at the expense of the increased performance cost.
Line 432: Line 429:


* <b>Terrain tile boundaries</b>: Terrain is loaded in discrete chunks, so-called tiles. For technical reasons, the coordinate system used to address positions changes for each tile. In practice, this unfortunately implies that noise functions are discontinuous across tile boundaries, and this shows in more or less pronounced seams in the computed textures -> however this can be addressed by going from tile-based to FG world coordinates and using 3-d noise. Due to the large distances involved, small-scale noise becomes then numerically unstable, but noise wavelength above 250 m can safely be done in world coordinates, leading to appealing visuals both at large and small distance.
* <b>Terrain tile boundaries</b>: Terrain is loaded in discrete chunks, so-called tiles. For technical reasons, the coordinate system used to address positions changes for each tile. In practice, this unfortunately implies that noise functions are discontinuous across tile boundaries, and this shows in more or less pronounced seams in the computed textures -> however this can be addressed by going from tile-based to FG world coordinates and using 3-d noise. Due to the large distances involved, small-scale noise becomes then numerically unstable, but noise wavelength above 250 m can safely be done in world coordinates, leading to appealing visuals both at large and small distance.
* <b>Tiling for non-natural landclasses</b>: The de-tiling strategies described above are based on mixing texture components using noise functions. This works fine for natural landclasses, but human-influenced landclasses like agriculture or urban terrain are not well described by Perlin noise, and de-tiling crop fields using noise functions does not yield plausible results.This is now solved by domain noise.


== Further reading ==
== Further reading ==
1,360

edits

Navigation menu