Howto:Editing tile textures and materials: Difference between revisions

Jump to navigation Jump to search
m
Small cleanup
m (add howto category tag)
m (Small cleanup)
Line 1: Line 1:
=Introduction=
The [[FlightGear]] [[scenery]] is displayed on the screen by rendering each of the triangles that makes up the surface with a texture, and placing random trees and objects on the surface. This Howto describes how to change the appearance of the scenery by modifying the texture, and configuring the objects that appear.


The FlightGear scenery is displayed on the screen by rendering each of the triangles that makes up the surface with a texture, and placing random trees and objects on the surface.  This Howto describes how to change the appearance of the scenery by modifying the texture, and configuring the objects that appear.
Each triangle has a defined "material", the landclass assigned to it by the scenery building process. The mapping of that material to a set of textures and objects is defined in the <tt>materials.xml</tt> file, found under the Materials/ directory.
 
Each triangle has a defined "material", the landclass assigned to it by the scenery building process. The mapping of that material to a set of textures and objects is defined in the materials.xml file, found under the Materials directory.


Currently there are two sets of materials you can use - the default set (defined in Materials/default/materials.xml), and a DDS set that takes advantage of pre-generated mipmaps of the dds texture format (defined in Materials/dds/materials.xml).  Both of these make used of fragments of xml found under Materials/base/.
Currently there are two sets of materials you can use - the default set (defined in Materials/default/materials.xml), and a DDS set that takes advantage of pre-generated mipmaps of the dds texture format (defined in Materials/dds/materials.xml).  Both of these make used of fragments of xml found under Materials/base/.


=Basic configuration=
== Basic configuration ==


Definitions of the various XML tags can be found in Docs/README.materials.
Definitions of the various XML tags can be found in Docs/README.materials.


=Creating Object Masks=
== Creating Object Masks ==


Object masks allow you to define where on the surface of the material random vegetation and buildings should be placed, relative to the texture itself.  The object mask works by using the 3 colors (red, blue and green) to define whether a tree or building may be placed at a given location, and the rotation of the building. The colors are used as follows:
Object masks allow you to define where on the surface of the material random vegetation and buildings should be placed, relative to the texture itself.  The object mask works by using the 3 colors (red, blue and green) to define whether a tree or building may be placed at a given location, and the rotation of the building. The colors are used as follows:
- Red defines the Rotation of a building
* Red defines the Rotation of a building
- Blue defines whether a random building can be placed at the location
* Blue defines whether a random building can be placed at the location
- Green defines whether random vegetation can be placed at the location.
* Green defines whether random vegetation can be placed at the location.


The process to create an object mask and configure materials.xml to use it is straightforward.
The process to create an object mask and configure materials.xml to use it is straightforward.


# First, we need to identify the texture you want to edit.
# First, we need to identify the texture you want to edit.

Navigation menu