Howto:Regional texturing: Difference between revisions

Jump to navigation Jump to search
Random vegetation update: 1) create subsection for random vegetation. 2) add: info on tree effect (and texture sheets): using the <tree-effect> property in materials XML files, using different effects for texture sheets with different number of deciduous and evergreen trees.
m (→‎Related content: Minor link fix)
(Random vegetation update: 1) create subsection for random vegetation. 2) add: info on tree effect (and texture sheets): using the <tree-effect> property in materials XML files, using different effects for texture sheets with different number of deciduous and evergreen trees.)
Line 161: Line 161:
Inside the <material> tag, it is also possible to declare random vegetation, random buildings or random objects. The difference is that the former two are supported by dedicated shaders which makes their rendering rather optimized, whereas random objects are normal 3d models without dedicated optimization. In general, random vegetation or buildings can hence be drawn in much higher numbers.
Inside the <material> tag, it is also possible to declare random vegetation, random buildings or random objects. The difference is that the former two are supported by dedicated shaders which makes their rendering rather optimized, whereas random objects are normal 3d models without dedicated optimization. In general, random vegetation or buildings can hence be drawn in much higher numbers.


The detailed syntax to generate random trees, buildings and objects is beyond the scope of this article, it is explained in the technical specifications of the materials definition in [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/Docs/README.materials README.materials]
==== Random vegetation ====
The detailed syntax to generate random trees, buildings and objects is beyond the scope of this article, it is explained in the technical specifications of the materials definition in [https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/Docs/README.materials README.materials].


Texture sheets with rows of different vegetation types are used for tree rendering. A tree texture sheet might contain different types of trees in a forest, or different types of bushes in scrubland. Textures for each trees or plants are created by extracting them from a suitable photo. See [[Howto:Create textures from photos]] .
===== Deciduous and evergreen vegetation =====
There are different tree effects for different types of vegetation in a texture sheet. Flightgear supports an autumn effect for types of vegetation with leaves that gradually become yellow or red and drop off in autumn - {{Wikipedia|Deciduous|deciduous}} vegetation. Vegetation whose leaves do not fall off is called {{Wikipedia|Evergreen|evergreen}} vegetation. Most tropical vegetation, and vegetation that originates in warmer climates, are evergreens. There is some deciduous vegetation in warmer climates that drop leaves in the dry season. The vast majority of {{Wikipedia|Conifers|conifers}} are also deciduous although there are some confiers whose leaves fall off and change colour. Texture sheets can have a mixture of deciduous and evergreen vegetation. As of March 2021,  deciduous vegetation is placed first in each row, followed by evergreen vegetation.
Some materials parameters (see README.materials for the rest):
<code>tree-effect</code>: the vegetation effect to use. See below.
<code>tree-varieties</code> : The number of different trees (plants) defined in the tree-texture row (i.e. horizontally). (default: 1)
Tree (vegetation) effects and the number of deciduous plants:
* <code>tree.eff</code> : '''0''' - use this when all trees are evergreens
* <code>tree-european-deciduous.eff:</code> '''8  -''' typically used when all trees 8 are deciduous. It can also be used in a mixed texture sheet with more than 8 plants
* <code>tree-european-mixed</code> : '''4''' - used for texture sheets with a mixture of deciduous and evergreen plants. e.g. 4 decidious plants followed by 4 evergreen plants
=== Objects ===
The object placement can be made non-random by specifying an <b>object mask</b> (i.e. an additional texture that tells how objects are placed). This allows to place trees on a specific part of the base layer texture if that part shows trees. The green channel mask is used for random vegetation placement, the blue channel for buildings and lights. and the red channel controls the rotation of buildings (0.0 is North, 0.5is South). Fractional colour values can be used to give a probability of placement.
The object placement can be made non-random by specifying an <b>object mask</b> (i.e. an additional texture that tells how objects are placed). This allows to place trees on a specific part of the base layer texture if that part shows trees. The green channel mask is used for random vegetation placement, the blue channel for buildings and lights. and the red channel controls the rotation of buildings (0.0 is North, 0.5is South). Fractional colour values can be used to give a probability of placement.


1,746

edits

Navigation menu