Howto:Editing tile textures and materials: Difference between revisions

Jump to navigation Jump to search
Added first draft of some detailed texture image construction methods.
(Added first draft of some detailed texture image construction methods.)
Line 1: Line 1:
{{WIP}}
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.


Line 14: Line 15:
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 a new material ==
Creating a material requires producing a series of square images (textures), typically of dimensions 1024x1024 pixels. These images are then processed to remove objects and to reduce tiling. The following sections describe one approach to doing this.
=== Image sources ===
Texture images should reflect the way the land looks from above, so a typical starting source is an aerial photograph or orthophoto, such as those shown by OpenStreetMaps when editing. Note that very few areas license these images in a way that is compatible with FlightGear use. One jurisdiction that does release aerial photos with a license compatible with FlightGear is the NSW state government in Australia. A screenshot of an area of NSW taken directly from OSM is used in the following example - conveniently a scale is provided by OSM that is useful for working out how many pixels of the screenshot correspond to the desired distance on the ground (images not yet included).
In general two screenshots of overlapping areas will be necessary to form a full square of the required dimensions.
=== Creating the initial image ===
All steps are described using the free GIMP application. Similar tools are available in other image editors.
* Open one screenshot and enlarge the image size to some larger, square dimension than the final size
* Cut and paste the second screenshot into place so that the meeting point matches up
* Select a suitable region of the exact size in pixels
* Use the clone tool to erase unnecessary objects with other parts of the image
* Crop to the selection
=== Further manipulations ===
* The GIMP "make seamless" tool will create a tile that has no sharp edges at the cost of smearing parts of the tile internally
* Adjusting the blue colour level down will remove the blue tinge that appears in photos taken at some height
* Adjusting all colour levels using a reference image (not necessarily an orthophoto) can remove various colour distortions
A set of texture images (basic + overlay + hires) prepared in this way will be ready for testing in FlightGear. Note the hires texture is notionally 4 times higher resolution than the normal textures.
=== Advanced manipulations ===
If vegetation is sparse the ground colour variation for the vegetated areas (forest and scrub) can be matched with neighbouring grassland and vegetated areas as follows:
* Add a transparent ("alpha") layer to the vegetation image
* Select ground areas by colour and clear them. The GIMP checkerboard pattern will show through. Do this repeatedly until only vegetation remains.
* Add a non-vegetated image as a lower layer
* Output the merged images to create the vegetated tile
* Use the non-vegetated image for e.g. grassland or other neighbouring area
Because the position on the image is calculated identically for all textures, the variation in ground colour will remain smooth as landcovers are transitioned. This effect is best when vegetation is sparse, as less of the vegetated areas will be cut off at the borders.
=== Checking in FlightGear ===
Fly at 40,000 ft above land rendered with the new set of textures (basic + overlay + hires). If tiling is apparent, it might be reduced by finding areas of the texture that draw the eye (e.g. a dark area with a distinctive shape) and breaking them up using the clone tool.
== Creating Object Masks ==
== Creating Object Masks ==


29

edits

Navigation menu