Using the Autogen annotator

Embed Size (px)

Citation preview

  • 8/12/2019 Using the Autogen annotator

    1/29

  • 8/12/2019 Using the Autogen annotator

    2/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 2

    Contents

    Using the Autogen Annotator ................................................................ 1Introduction ........................................................................................ 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

  • 8/12/2019 Using the Autogen annotator

    3/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 3

    The Autogen Annotator

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

    You can switch from one tool to the other. These two programs work together: theAutogen Configuration Editor allows you to choose the specific Autogen objectdesired, and the Annotator lets you draw the location of the object on the texture.

  • 8/12/2019 Using the Autogen annotator

    4/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 4

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

  • 8/12/2019 Using the Autogen annotator

    5/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 5

    In the Control Strip, you can choose the type of Autogen element that you wish toadd to the texture, and once you have selected the specific variant of that elementin 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.

  • 8/12/2019 Using the Autogen annotator

    6/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 6

    The Autogen Configuration Editor

    The Autogen Configuration Editor is a powerful utility for modifying the defaultAutogen 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 customtextures. To do so, you must load the Autogen file containing the various objectdefinitions 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, thedefinitions of all vegetation types

    2. Extrusions.xml-- the definitions for polyline buildings3. RoofDescriptions.xml-- the definitions for normal Autogen buildings

    All these files are located in the Autogen source xmlfolder of the Autogen SDKdirectory.

  • 8/12/2019 Using the Autogen annotator

    7/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 7

    To begin, you must first load one of the description files. For example, this is whatyou might see when loading the AutogenDescriptions.xml file:

    There are various windows that are not relevant to this explanation, and youshould only refer to the Vegetation Groupings window.

  • 8/12/2019 Using the Autogen annotator

    8/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 8

    There are two different categories: Groupings and Regionalizations. Each onecontains the specific Autogen vegetation types that you can select for use in theAnnotator.

    Here is one of those headings when expanded:

  • 8/12/2019 Using the Autogen annotator

    9/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 9

    You can select any of the vegetation types from the Groupings or Regionalizationsheadings. To select a vegetation type, simply click on it as follows:

  • 8/12/2019 Using the Autogen annotator

    10/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 10

    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 theirrelative weights (please note that these values are not percentages). Each of thetree types is also composed of different variants and you can see those variantsand their relative weights by expanding each tree type. This should let you

  • 8/12/2019 Using the Autogen annotator

    11/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 11

    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, youmust highlight the principal vegetation type as shown above.

  • 8/12/2019 Using the Autogen annotator

    12/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 12

    Adding Annotations to a GroundTexture

    Vegetation

    Once you have selected the desired vegetation type in the Autogen ConfigurationEditor, you must switch back to the Autogen Annotator.

    Of course, you must load your custom textures in the Annotator through the Filemenu:

  • 8/12/2019 Using the Autogen annotator

    13/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 13

    You can use the Control Strip buttons to pan and zoom in the texture. Or, if youprefer, use the mouse wheel to zoom, and pan by pressing and dragging themouse.

    Next to the Vegetation buttons you will see the "Set GUID" button. If you havecorrectly selected the vegetation type in the Editor, clicking on this button willdetermine the specific vegetation to be added:

  • 8/12/2019 Using the Autogen annotator

    14/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 14

    There are two distinct vegetation shapes that you can use to add trees to thetexture:

    1. Vegetation -- this is the old-style rectangular shape. It can be any sizedesired;

    2. Polygon Region -- with this you can draw any irregular polygon of yourchoice.To draw the old-style rectangular tree areas, click on the Vegetation button orpress the keyboard equivalent -- "V". Then, click on the texture to draw the

    rectangle:

  • 8/12/2019 Using the Autogen annotator

    15/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 15

    To draw the new Polygon Region vegetation area, click on the button or press thekeyboard equivalent -- "I". Then, click on the texture to draw the irregularpolygon:

  • 8/12/2019 Using the Autogen annotator

    16/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 16

    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 ofthe 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 thevegetation polygon to a precision of about 1 meter. Changing the value to 2048

  • 8/12/2019 Using the Autogen annotator

    17/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 17

    will result in precision of about 0.5 meters. However, increasing this value maypotentially impact performance, as the greater precision will require more memoryand processor resources.

  • 8/12/2019 Using the Autogen annotator

    18/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 18

    Buildings

    There are different types of Autogen buildings: row houses, normal buildings andpolyline buildings.

    Row Houses

    To draw a row house, you do not need to set a specific GUID; row houses will usethe Autogen texture sheet for that region. Just click on the Row Houses button, orselect the keyboard equivalent -- "R". Then, click to draw one of the sides of thebuilding:

  • 8/12/2019 Using the Autogen annotator

    19/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 19

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

  • 8/12/2019 Using the Autogen annotator

    20/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 20

    Normal Buildings

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

  • 8/12/2019 Using the Autogen annotator

    21/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 21

    Select the desired roof type by clicking on it, then switch back to the Annotatortool.

    Press the "Set GUID" button next to the Building button to define the selectedtype. Then, to draw the building, click on the Building button, or use the keyboardequivalent -- "B". Click to draw one side of the building, then click and drag todefine its depth:

  • 8/12/2019 Using the Autogen annotator

    22/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 22

    You can define certain properties of this type of building and of Row Houses in theAnnotator Properties Window. Go the the File menu and select Properties:

  • 8/12/2019 Using the Autogen annotator

    23/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 23

    By varying the sliders, you can set the relative weight of the number of floors forthe buildings. For example, the following settings indicate that mostly six to eightfloor 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 texturesheet for normal buildings and for row houses. The texture sheets are documentedin the Autogen SDK, and if you create a specific texture sheet for your customground, you can indicate this in the Properties window.

    Polyline Buildings

  • 8/12/2019 Using the Autogen annotator

    24/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 24

    The new polyline buildings can have more complex shapes than the normalrectangular buildings. Typically, these buildings have central courtyards.

    To draw polyline buildings, you should switch back to the Autogen ConfigurationEditor and open the Extrusions.xml file:

    Select the desired polyline building type by clicking on it, then switch back to theAnnotator tool.

  • 8/12/2019 Using the Autogen annotator

    25/29

  • 8/12/2019 Using the Autogen annotator

    26/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 26

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

  • 8/12/2019 Using the Autogen annotator

    27/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 27

    Choose one of the menu options to finish drawing the polyline building, then dragoutwards to define the depth of the building. Generally, you will have to drag inthe direction of the last closed side of the building in order to determine its depth:

  • 8/12/2019 Using the Autogen annotator

    28/29

    Copyright 2008, Microsoft Corporation. All Rights Reserved 28

    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 aGUID from an xml definition file. Simply select the type of object in the ControlStrip, click on the Library button, or select its keyboard equivalent "L", and click todraw the object:

  • 8/12/2019 Using the Autogen annotator

    29/29

    Copyright 2008 Microsoft Corporation All Rights Reserved 29

    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 andselect Save.

    The Autogen Annotator will create Autogen annotation files in the texture folder ofthe 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 inthe scenery folder with the bgl. Please note that Autogen will not display if theannotation files are in that folder., You must therefore create a texture folder andensure that the annotation files are moved there.