Using The Autogen Annotator
Using The Autogen Annotator
Luis Fliz-Tirado Applies to: Microsoft Flight Simulator Microsoft Flight Simulator Microsoft Flight Simulator Microsoft Flight Simulator Microsoft ESP SDK X X X X SDK SP1 SDK SP2 SDK Acceleration Pack SDK
Introduction
Autogen is a patented technology used to procedurally place default 3D objects throughout the simulated world, based on land class definitions and annotated textures. This technology is exposed to allow customization of the 3D models that are placed, as well as the textures and land class definitions that are used to define where and how these objects are placed. The Autogen Annotator tool can be found in the Autogen SDK (Software Development Kit) that ships with both the above referenced products. The SDK includes all reference documentation for the Annotator; this paper provides an introductory tutorial, and a useful visual reference of Autogen classes -- illustrating the basics for using the tools. Please consult the SDK documentation while reading this article. A reference document is also available to supplement this one, A Pictorial Guide to Autogen Objects, which is available through the following web sites: http://www.msdn.com/esp http://www.microsoft.com/esp http://www.fsinsider.com
Contents
Using the Autogen Annotator ................................................................ 1 Introduction ........................................................................................ 1 Contents ............................................................................................. 2 The Autogen Annotator......................................................................... 3 The Autogen Configuration Editor .......................................................... 6 Adding Annotations to a Ground Texture ............................................... 12 Vegetation ...................................................................................... 12 Buildings ......................................................................................... 18 Row Houses.................................................................................. 18 Normal Buildings ........................................................................... 20 Polyline Buildings .......................................................................... 23 Library Objects ................................................................................... 28 Saving the Annotations ....................................................................... 29
You can switch from one tool to the other. These two programs work together: the Autogen Configuration Editor allows you to choose the specific Autogen object desired, and the Annotator lets you draw the location of the object on the texture.
In the Control Strip, you can choose the type of Autogen element that you wish to add to the texture, and once you have selected the specific variant of that element in the Autogen Configuration Editor, you can indicate it here with the "Set GUID" button (GUID - Globally-Unique Identifier of the object), before drawing it on the texture. There are also buttons for choosing various functions such as Pan and Zoom -with their keyboard equivalents.
To begin, you must first load one of the description files. For example, this is what you might see when loading the AutogenDescriptions.xml file:
There are various windows that are not relevant to this explanation, and you should only refer to the Vegetation Groupings window.
There are two different categories: Groupings and Regionalizations. Each one contains the specific Autogen vegetation types that you can select for use in the Annotator. Here is one of those headings when expanded:
You can select any of the vegetation types from the Groupings or Regionalizations headings. To select a vegetation type, simply click on it as follows:
If you wish to see the contents of this vegetation type, expand it by clicking on the "+" sign:
The various trees that compose this vegetation type are indicated, along with their relative weights (please note that these values are not percentages). Each of the tree types is also composed of different variants and you can see those variants and their relative weights by expanding each tree type. This should let you Copyright 2008, Microsoft Corporation. All Rights Reserved 10
understand precisely the type of Autogen vegetation that you are choosing. Note that in order to select a valid Autogen GUID for the Autogen Annotator, you must highlight the principal vegetation type as shown above.
11
12
You can use the Control Strip buttons to pan and zoom in the texture. Or, if you prefer, use the mouse wheel to zoom, and pan by pressing and dragging the mouse. Next to the Vegetation buttons you will see the "Set GUID" button. If you have correctly selected the vegetation type in the Editor, clicking on this button will determine the specific vegetation to be added:
13
There are two distinct vegetation shapes that you can use to add trees to the texture: 1. Vegetation -- this is the old-style rectangular shape. It can be any size desired; 2. Polygon Region -- with this you can draw any irregular polygon of your choice. To draw the old-style rectangular tree areas, click on the Vegetation button or press the keyboard equivalent -- "V". Then, click on the texture to draw the rectangle:
14
To draw the new Polygon Region vegetation area, click on the button or press the keyboard equivalent -- "I". Then, click on the texture to draw the irregular polygon:
15
To close the polygon, you must right-click. This will display a menu:
Select one of the menu options to finish drawing the polygon. Please note that excessively complex polygons may not give the desired results. This is because the simulator samples the polygon to default blocks of 16 x 16 pixels. You can get greater precision by adding a key to the [TERRAIN] section of the configuration file (fsx.cfg or esp.cfg): IMAGE_PIXELS_FOR_AUTOGEN_POLYGONS=16 where 16 is the default value. By changing this to 1024, you will force the vegetation polygon to a precision of about 1 meter. Changing the value to 2048 Copyright 2008, Microsoft Corporation. All Rights Reserved 16
will result in precision of about 0.5 meters. However, increasing this value may potentially impact performance, as the greater precision will require more memory and processor resources.
17
Buildings
There are different types of Autogen buildings: row houses, normal buildings and polyline buildings.
Row Houses
To draw a row house, you do not need to set a specific GUID; row houses will use the Autogen texture sheet for that region. Just click on the Row Houses button, or select the keyboard equivalent -- "R". Then, click to draw one of the sides of the building:
18
Once you have determined the orientation and length of the building, click and drag to define the width:
19
Normal Buildings
To draw normal Autogen buildings, you should switch back to the Autogen Configuration Editor and open the RoofDescriptions.xml file:
20
Select the desired roof type by clicking on it, then switch back to the Annotator tool. Press the "Set GUID" button next to the Building button to define the selected type. Then, to draw the building, click on the Building button, or use the keyboard equivalent -- "B". Click to draw one side of the building, then click and drag to define its depth:
21
You can define certain properties of this type of building and of Row Houses in the Annotator Properties Window. Go the the File menu and select Properties:
22
By varying the sliders, you can set the relative weight of the number of floors for the buildings. For example, the following settings indicate that mostly six to eight floor buildings should appear, with a few three to five floor buildings:
The Properties window can also be used to indicate the use of a different texture sheet for normal buildings and for row houses. The texture sheets are documented in the Autogen SDK, and if you create a specific texture sheet for your custom ground, you can indicate this in the Properties window.
Polyline Buildings
Copyright 2008, Microsoft Corporation. All Rights Reserved 23
The new polyline buildings can have more complex shapes than the normal rectangular buildings. Typically, these buildings have central courtyards. To draw polyline buildings, you should switch back to the Autogen Configuration Editor and open the Extrusions.xml file:
Select the desired polyline building type by clicking on it, then switch back to the Annotator tool.
24
Press the "Set GUID" button next to the Polyline Building button to define the selected type. To draw this type of building, you must first draw the shape of the central courtyard, then drag outwards to define the depth of the building. First, select the Polyline Building button, or its keyboard equivalent -- "J". Then, click to draw the courtyard:
25
26
Choose one of the menu options to finish drawing the polyline building, then drag outwards to define the depth of the building. Generally, you will have to drag in the direction of the last closed side of the building in order to determine its depth:
27
Library Objects
The Autogen Annotator can place numerous and varied types of library objects. Generally, these objects have a fixed size, and they do not require the use of a GUID from an xml definition file. Simply select the type of object in the Control Strip, click on the Library button, or select its keyboard equivalent "L", and click to draw the object:
28
29