AGN (FSX): Difference between revisions

From FSDeveloper Wiki
Jump to navigationJump to search
mNo edit summary
No edit summary
Line 15: Line 15:
== Sections ==
== Sections ==


The AGN file uses the RIFF format, this means that the file consists of different sections. '''Each section starts with a four character label, followed by the size of the content in bytes''' (this size is thus without the length of the header itself).
The AGN file uses the RIFF format (like MDL files), this means that the file consists of different sections. Each section starts with a four character label, followed by the length of the section in bytes (this length without the header itself).


The main RIFF section itself has one additional parameter, this is a four character string that indicates the type of RIFF AGN file. For an FSX AGN file the value should always be AGNX.
The main RIFF section itself has one additional parameter, this is a four character string that indicates the type of RIFF AGN file. For an FSX AGN file the value should always be AGNX.
Line 25: Line 25:
Contains versions information about the AGN file.
Contains versions information about the AGN file.


   int version (normally 4)
   int32 version (normally 1091777331)
  int version (normally 13107)


=== GBDD ===
=== GBDD ===
Line 32: Line 31:
Contains information about autogen generic buildings
Contains information about autogen generic buildings


   int percentage of 1 and 2 floor buildings (normally 10)
   int32 percentage of 1 and 2 floor buildings (normally 10)
   int percentage of 3 to 5 floor buildings (normally 10)
   int32 percentage of 3 to 5 floor buildings (normally 10)
   int percentage of 6 to 8 floor buildings (normally 10)
   int32 percentage of 6 to 8 floor buildings (normally 10)
   int percentage of 9 to 12 floor buildings (normally 10)
   int32 percentage of 9 to 12 floor buildings (normally 10)


Valid values for percentage are from 0x00 (0%) to 0x14 (100%).
Valid values for percentage are from 0x00 (0%) to 0x14 (100%).
Line 41: Line 40:
=== GBLD ===
=== GBLD ===


Contains building information.
Contains building information. This section contains one or more GBLR sections.


==== GBLR ====
==== GBLR ====
Contains information about Generic Buildings.
Contains information about Generic Buildings.


Line 52: Line 52:
   float X position of first point  
   float X position of first point  
   float Y position of first point
   float Y position of first point
   float X vector to the second point
   float X direction to the second point
   float Y vector to the second point
   float Y direction to the second point
   float X position of third point
   float X offset of third point
   float Y position of third point  
   float Y offset of third point  


Repeat GBLR sections for each GUID used.
The x and y coordinates are given as offset from the middle of the LOD13 square (range -0.5 till 0.5).


=== PREG ===
=== PREG ===


For vegatation information
Contains vegatation information. This section contains one or more PRDE sections.


==== PRDE ====
==== PRDE ====
Line 78: Line 78:
   single y
   single y


The x and y coordinates are given as offset in the LOD13 square (range 0 till 1).
The x and y coordinates are given as offset from the top left of the LOD13 square (range 0 till 1).


=== VGRG ===
=== VGRG ===


Contains information about pre-FSX style rectangular vegetation regions.  
Contains information about pre-FSX style rectangular vegetation regions. This section contains one or more VGRE sections.


==== VGRE ====
==== VGRE ====
Line 91: Line 91:
   float X position of first point
   float X position of first point
   float Y position of first point
   float Y position of first point
   float X position of second point
   float X offset to second point
   float Y position of second point  
   float Y offset to second point  
 
The x and y coordinates are given as offset from the middle of the LOD13 square (range -0.5 till 0.5).


[[Category:Autogen]]
[[Category:File_Formats]]
[[Category:File_Formats]]

Revision as of 10:06, 1 October 2011

This document describes the FSX format for autogen (AGN) files. This description is not yet complete, so feel free to add more information if you have any.

Sections

The AGN file uses the RIFF format (like MDL files), this means that the file consists of different sections. Each section starts with a four character label, followed by the length of the section in bytes (this length without the header itself).

The main RIFF section itself has one additional parameter, this is a four character string that indicates the type of RIFF AGN file. For an FSX AGN file the value should always be AGNX.

The following subsection show more details about the content of these different sections.

VERS

Contains versions information about the AGN file.

 int32 version (normally 1091777331)

GBDD

Contains information about autogen generic buildings

 int32 percentage of 1 and 2 floor buildings (normally 10)
 int32 percentage of 3 to 5 floor buildings (normally 10)
 int32 percentage of 6 to 8 floor buildings (normally 10)
 int32 percentage of 9 to 12 floor buildings (normally 10)

Valid values for percentage are from 0x00 (0%) to 0x14 (100%).

GBLD

Contains building information. This section contains one or more GBLR sections.

GBLR

Contains information about Generic Buildings.

 GUID roof type (will use default roofs, if 0)

For each Generic Building:

 float X position of first point 
 float Y position of first point
 float X direction to the second point
 float Y direction to the second point
 float X offset of third point
 float Y offset of third point 

The x and y coordinates are given as offset from the middle of the LOD13 square (range -0.5 till 0.5).

PREG

Contains vegatation information. This section contains one or more PRDE sections.

PRDE

For vegatation polygon. Contains:

 GUID vegatation type

For each polygon:

 int number of vertices

For each vertex:

 single x
 single y

The x and y coordinates are given as offset from the top left of the LOD13 square (range 0 till 1).

VGRG

Contains information about pre-FSX style rectangular vegetation regions. This section contains one or more VGRE sections.

VGRE

 GUID vegetation type

For each rectangle:

 float X position of first point
 float Y position of first point
 float X offset to second point
 float Y offset to second point 

The x and y coordinates are given as offset from the middle of the LOD13 square (range -0.5 till 0.5).