Vous êtes sur la page 1sur 29

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

Copyright 2008, Microsoft Corporation. All Rights Reserved

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

Copyright 2008, Microsoft Corporation. All Rights Reserved

The Autogen Annotator


When first run, the Autogen Annotator (Annotator.exe) will open an Annotation window, and then immediately afterwards the Autogen Configuration Editor:

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.

Copyright 2008, Microsoft Corporation. All Rights Reserved

One of the main parts of the Annotator is the Control Strip:

Copyright 2008, Microsoft Corporation. All Rights Reserved

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.

Copyright 2008, Microsoft Corporation. All Rights Reserved

The Autogen Configuration Editor


The Autogen Configuration Editor is a powerful utility for modifying the default Autogen definition files. Very few people will change the definitions of Autogen files, so the use of the Editor for that purpose is not covered in this document. The most common use of the Editor is in placing specific objects on custom textures. To do so, you must load the Autogen file containing the various object definitions into the Autogen Configuration Editor. These are the relevant files for use with the Autogen Configuration Editor: 1. AutogenDescriptions.xml -- this file contains, among other things, the definitions of all vegetation types 2. Extrusions.xml -- the definitions for polyline buildings 3. RoofDescriptions.xml -- the definitions for normal Autogen buildings All these files are located in the Autogen source xml folder of the Autogen SDK directory.

Copyright 2008, Microsoft Corporation. All Rights Reserved

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.

Copyright 2008, Microsoft Corporation. All Rights Reserved

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:

Copyright 2008, Microsoft Corporation. All Rights Reserved

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:

Copyright 2008, Microsoft Corporation. All Rights Reserved

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.

Copyright 2008, Microsoft Corporation. All Rights Reserved

11

Adding Annotations to a Ground Texture


Vegetation
Once you have selected the desired vegetation type in the Autogen Configuration Editor, you must switch back to the Autogen Annotator. Of course, you must load your custom textures in the Annotator through the File menu:

Copyright 2008, Microsoft Corporation. All Rights Reserved

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:

Copyright 2008, Microsoft Corporation. All Rights Reserved

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:

Copyright 2008, Microsoft Corporation. All Rights Reserved

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:

Copyright 2008, Microsoft Corporation. All Rights Reserved

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.

Copyright 2008, Microsoft Corporation. All Rights Reserved

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:

Copyright 2008, Microsoft Corporation. All Rights Reserved

18

Once you have determined the orientation and length of the building, click and drag to define the width:

Copyright 2008, Microsoft Corporation. All Rights Reserved

19

Normal Buildings
To draw normal Autogen buildings, you should switch back to the Autogen Configuration Editor and open the RoofDescriptions.xml file:

Copyright 2008, Microsoft Corporation. All Rights Reserved

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:

Copyright 2008, Microsoft Corporation. All Rights Reserved

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:

Copyright 2008, Microsoft Corporation. All Rights Reserved

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.

Copyright 2008, Microsoft Corporation. All Rights Reserved

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:

Copyright 2008, Microsoft Corporation. All Rights Reserved

25

To finish drawing it, right-click to bring up the menu options:

Copyright 2008, Microsoft Corporation. All Rights Reserved

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:

Copyright 2008, Microsoft Corporation. All Rights Reserved

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:

Copyright 2008, Microsoft Corporation. All Rights Reserved

28

Saving the Annotations


Up to this point, we have drawn the various types of object annotations, but they must be saved in order to display in the simulation. Go the the File menu and select Save. The Autogen Annotator will create Autogen annotation files in the texture folder of the location of your custom ground. They will look something like: 011222030211102an.agn IMPORTANT: If there is no texture folder, the annotation files will be placed in the scenery folder with the bgl. Please note that Autogen will not display if the annotation files are in that folder., You must therefore create a texture folder and ensure that the annotation files are moved there.

Copyright 2008, Microsoft Corporation. All Rights Reserved

29

Vous aimerez peut-être aussi