You are on page 1of 10

Flight Simulator X Autogen File Format

First draft
March 2009

Compiled by Paavo Pihelgas


Contents

I Preface.......................................................................................................................................................3
II Mandatory Sections.............................................................................................................................4
File Header..............................................................................................................................................................4
Version Information.............................................................................................................................................4
Height Profile..........................................................................................................................................................4
III Optional Sections................................................................................................................................5
Custom Texture Sheet.........................................................................................................................................5
Vegetation Polygons.............................................................................................................................................5
Vegetation Regions...............................................................................................................................................6
Generic Buildings..................................................................................................................................................6
Polyline Buildings.................................................................................................................................................7
Library Objects......................................................................................................................................................8
IV Additional Notes................................................................................................................................10

You are free to share and adapt contents of this document, as long as you attribute the
authors and distribute the resulting work only under the same, similar or a compatible
license.

____________________________________________________________________________________________________________
FSX Autogen File Format 2
I Preface
Among many other features, Flight Simulator 2002 introduced Autogen system. It's name is
derived from „automatically generated scenery“. For the first time, the whole terrain was co-
vered with vegetation and buildings, greatly improving the flying experience.

Full coverage was achieved by creating metadata file (so-called „Autogen file“ with .agn ex-
tension) for every texture used to render ground textures. Those metadata files carry informa-
tion about building and vegetation placement for a specific the texture sheet.

In Software Development Kit, Microsoft offers a tool – Autogen Annotator – for creating
Autogen files. Its features and functionality are probably more than enough for most uses, but
power users may need more flexibility. This document is aimed at them.

The following pages describe the Autogen file format of Microsoft's Flight Simulator X.

____________________________________________________________________________________________________________
FSX Autogen File Format 3
II Mandatory Sections

1 File Header
Offset Length Format Description
0 4 char[4] Section identifier, always „RIFF“
4 4 int Size of the remaining file
8 4 char[4] Autogen identifier, always „AGNX“

2 Version Information
Offset Length Format Description
0 4 char[4] Section identifier, always „VERS“
4 4 int Size of the remaining records in current section (4)
8 4 int Version, always 13107

3 Height Profile
Offset Length Format Description
0 4 char[4] Section identifier, always „GBDD“
4 4 int Size of the remaining records in current section (16)
8 4 int Percentage of 1-2 floor buildings
12 4 int Percentage of 3-5 floor buildings
16 4 int Percentage of 6-8 floor buildings
20 4 int Percentage of 9-12 floor buildings

Remarks:
• Height profile is used by Generic Buildings only.
• Valid values for percentages are from 0 (0%) to 20 (100%).

____________________________________________________________________________________________________________
FSX Autogen File Format 4
III Optional Sections

1 Custom Texture Sheet


Offset Length Format Description
0 4 char[4] Section identifier, always „GBTE“
4 4 int Size of the remaining records in current section
8 variable string Texture name (without the extension)

Remarks:
• Custom texture sheet is used by Generic Buildings only.

2 Vegetation Polygons
Offset Length Format Description
0 4 char[4] Section identifier, always „PREG“
4 4 int Size of the remaining records in current section
8 ... ... Vegetation polygon subrecords

For every group of polygons with a common GUID:


Offset Length Format Description
0 4 char[4] Subrecord identifier, always „PRDE“
4 4 int Size of the remaining records in current section
8 16 GUID GUID of the vegetation type
24 ... ... Polygons

For each polygon:


Offset Length Format Description
0 4 int Number of points
4 ... ... Points

For each point:


Offset Length Format Description
0 4 float X coordinate in the LOD13 cell
4 4 float Y coordinate in the LOD13 cell

____________________________________________________________________________________________________________
FSX Autogen File Format 5
Remarks:
• Valid values for coordinates are from 0.0 to 1.0.
• Upper left corner is at (0.0; 0.0) and lower right corner is at (1.0; 1.0).

3 Vegetation Regions
Offset Length Format Description
0 4 char[4] Section identifier, always „VGRG“
4 4 int Size of the remaining records in current section
8 ... ... Vegetation region subrecords

For every group of regions with a common GUID:


Offset Length Format Description
0 4 char[4] Subrecord identifier, always „VGRE“
4 4 int Size of the remaining records in current section
8 16 GUID GUID of the vegetation type
24 ... ... Regions

For each region:


Offset Length Format Description
0 4 float X coordinate of the NW point in the LOD13 cell
4 4 float Y coordinate of the NW point in the LOD13 cell
8 4 float Width
12 4 float Height

Remarks:
• Valid values for coordinates from -0.5 to 0.5.
• Upper left corner is at (-0.5; -0.5) and lower right corner is at (0.5; 0.5).
• Valid values for width and height are from -1 to 1 (1 = the whole span of the cell).

4 Generic Buildings
Offset Length Format Description
0 4 char[4] Section identifier, always „GBLD“
4 4 int Size of the remaining records in current section
8 ... ... Generic building subrecords

____________________________________________________________________________________________________________
FSX Autogen File Format 6
For every group of Generic Buildings with a common GUID:
Offset Length Format Description
0 4 char[4] Subrecord identifier, always „GBLR“
4 4 int Size of the remaining records in current section
8 16 GUID GUID of the vegetation type
24 ... ... Buildings

For each Generic Building:


Offset Length Format Description
0 4 float X coordinate of the first point of front side
4 4 float Y coordinate of the first point of front side
8 4 float X vector to the second point of front side
12 4 float Y vector to the second point of front side
16 4 float X coordinate of the third point
20 4 float Y coordinate of the third point

Remarks:
• Valid values for coordinates from -0.5 to 0.5.
• Upper left corner is at (-0.5; -0.5) and lower right corner is at (0.5; 0.5).
• Valid values for width and height are from -1 to 1 (1 = the whole span of the cell).
• Default roofs („Default Autogen 1 roof“) are used if roof type GUID is empty.

5 Polyline Buildings
Offset Length Format Description
0 4 char[4] Section identifier, always „PBLD“
4 4 int Size of the remaining records in current section
8 ... ... Vegetation polygon subrecords

For every group of Polyline Buildings with a common GUID:


Offset Length Format Description
0 4 char[4] Subrecord identifier, always „PBDE“
4 4 int Size of the remaining records in current section
8 16 GUID GUID of the Polyline Building type
24 ... ... Polyline Buildings

____________________________________________________________________________________________________________
FSX Autogen File Format 7
For each Polyline Building:
Offset Length Format Description
0 4 bool Connect endpoints
4 4 int Number of points
8 4 float Building width
12 ... ... Points

Remarks:
• Valid values for building width are from 0.0 to 1.0, where 1.0 is LOD13 cell edge length.

For each point:


Offset Length Format Description
0 4 float X coordinate in the LOD13 cell
4 4 float Y coordinate in the LOD13 cell

Remarks:
• Valid values for coordinates are from 0.0 to 1.0.
• Upper left corner is at (0.0; 0.0) and lower right corner is at (1.0; 1.0).

6 Library Objects
Offset Length Format Description
0 4 char[4] Section identifier, always „AGN2“
4 4 int Size of the remaining records in current section
8 ... ... Library object subrecords

For every group of Library Objects with a common GUID:


Offset Length Format Description
0 4 char[4] Subrecord identifier, always „A2GE“
4 4 int Size of the remaining records in current section
8 16 GUID GUID of the library object
24 ... ... Library objects

For each library object:


Offset Length Format Description
0 4 float X coordinate of the first point of front side
4 4 float Y coordinate of the first point of front side
8 4 float X vector to the second point of front side

____________________________________________________________________________________________________________
FSX Autogen File Format 8
12 4 float Y vector to the second point of front side
16 4 float X coordinate of the third point
20 4 float Y coordinate of the third point

Remarks:
• Valid range of coordinates is from -0.5 to 0.5.
• Upper left corner is at (-0.5; -0.5) and lower right corner is at (0.5; 0.5).
• Valid range of vectors is from 0.0 to 1.0. Vector (1.0; 0.0) aligns face with x-axis.

____________________________________________________________________________________________________________
FSX Autogen File Format 9
IV Additional Notes
• All Autogen files created with Annotator tool have a specific property in Polyline Build-
ings set to 1. During the research, it was discovered that this parameter controls if be-
ginning and end of a building are connected. This previously unknown feature widens
the use of Polyline Buildings.

____________________________________________________________________________________________________________
FSX Autogen File Format 10

You might also like