• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA Are AGN files location or scenery specfic?

ollyau

Resource contributor
Messages
1,034
Country
us-california
As in the title of the thread, I'm curious whether autogen files are scenery specific or location specific.

I'm wondering because I want to know if I can start annotating a scenery I'm working on, but then go and replace the photoscenery BGL with an improved version later, and have the annotations still work.

The annotator originally gave me the impression that they might be scenery specific, but then I realized that it could just grab the geodata from the BGL and also display it so you know where you were placing things.

Oh, and also a side question: is it possible to edit an existing AGN file? Or a way to save your work in the annotator to XML or something that can be opened and edited again?
 
Hello:

You might be interested in Arno's recent Blog posts regarding tools for Autogen: :idea:

http://msmvps.com/blogs/arnogerretsen/default.aspx


Thus far I have been unable to find the "AGN2TXT" tool which Arno refers to in his Blog:

http://msmvps.com/blogs/arnogerretsen/archive/2011/10/09/agn2txt.aspx

Sun, Oct 9 2011 15:51
"agn2txt

If you download the development release package of my tools, you will find a new tool in there from today. I called it agn2txt and it dumps the content of an autogen AGN file to a readable text file. It is a tool that I used which learning more about the autogen file format. I have included it, because I thought it might be useful for others as well.

I have plans to later also add a txt2agn tool that can do the reverse step, so that you can make minor changes to the autogen by editing the TXT file. But I haven't come to that yet, as I first want to do some more experimentation with making autogen from GIS vector data.
Posted by arno"



However, I can suggest that while we await a clear statement by Arno regarding the whereabouts of the above utility, you may wish to look into the thus far "un-documented" FS Autogen SDK "AGNDump" utility located at:

[FS SDK install path]\Environment Kit\Autogen SDK\AgnDump.exe.


This will dump the *.AGN file of your choice into an XML file; info on the file structure is here:

http://www.fsdeveloper.com/wiki/index.php?title=AGN_(FSX)



See also:


http://www.fsdeveloper.com/wiki/index.php?title=Autogen_-_Editing_with_Annotator


http://forum.avsim.net/topic/279367-agn-auto-naming/page__hl__autogen__fromsearch__1




BTW: AFAIK, the output file name for a Resample compiled custom photoreal imagery land class BGL file may vary in FSX, but 'internally', the placement code in the BGL references a specific alternate series of land class tile names which are related to the legacy land class tile naming system used in prior versions of FS.

And, IIRC, that internal "tile name" system originally only provided for 1 custom land class name per LOD-13 area, thus making that *.AGN file unique to that geographic location, even though the actual textures and objects used to "annotate" the land class scenery rendered in FS at run time may actually come from other world areas, libraries etc. since the *.AGN file is only a set of "placement instructions".


Rhumbaflappy's TCalc utility for FS2Kx shows those legacy "custom" land class tile names; however, IIUC, his TCalcX and the FS SDK TMFViewer do not allow one to see such tile names used for the FSX environment terrain object mapping system.


Regardless, I believe you may find that you could retain an existing *.AGN file of a specific coverage area for ongoing use, as long as any subsequent versions of the appertaining custom photoreal imagery land class BGL files have exactly the same coverage area.


To facilitate this, one would wish to save for reference, all original Resample INF files used to make the custom photoreal imagery land class BGL, as well as any "work" files for the Annotator which are in XML format (save these BEFORE compiling to the FSX AGN format or the work file is deleted). :alert:


NOTE: IIRC, FSX SDK Annotator initially uses a legacy FS9 format "XML" work file format which will also display autogen at run time even if not subsequently compiled to a AGN format... when placed into the Texture folder along with other FSX format AGN files ;)

http://www.fsdeveloper.com/forum/showthread.php?t=20381&highlight=Autogen


Hope this info may help with your inquiry and learning process ! :)

GaryGB
 
Last edited:
Hi,

The AGN files are location specific, they are not tied to a specific BGL file. So if you update your photo scenery BGL, the autogen will still display. Just make sure the AGN files are in the texture folder of your photo scenery.

That applies to Annotator as well. So if you open the photo scenery BGL, it will automatically load the AGN files from the texture folder. So there is no need to save to another format from Annotator.
 
Oh, and also a side question: is it possible to edit an existing AGN file? Or a way to save your work in the annotator to XML or something that can be opened and edited again?

Annotator saves agn files and, if a photo-bgl has associated agn, it will load the appropiate agn files which you can then edit.
 
Hi Arno,

It doesn't deal with vegetaion areas:

Code:
# Unsupported section VGRD, skipping!
# Unsupported section VGRO, skipping!
Location 011220202223002
Version 1091777331
BuildingSettings 1 0 0 0

In fact there are 555 areas in that file

Code:
Filename 011220202223002AN.AGN

AGN Version 9.20 (FSX format)

Building type percentage

Floors 1-2   20
Floors 3-4   0
Floors 6-8   0
Floors 9-12  0
Vegetation type 1: 1
Vegetation type 2: 2
Relative Density type 1: 2
Relative Density type 2: 88
Mimimum height type 1: 12.000000
Maximum height type 1: 24.000000
Mimimum height type 2: 12.000000
Maximum height type 2: 24.000000

No of veg areas 555
 
No of vegetation rectangles 0

No of buildings 0
 
Hi George,

Humm, interesting, it seems your AGN file has a different way to define the vegetation. It is not the polygon vegetation and also not the old rectangular vegetation. Could you send me a sample AGN file and then I should be able to add support.
 
Well, I can parse the file (see above).

File attached.
 
Last edited:
Thanks, going to have a look at it. Interesting to see how this section differs from the polygon vegetation I can read already.
 
These are the first few vegetation rectangles:

Code:
X1 -0.319819 Y1 0.490991 Dx 0.009009 Dy 0.009009

X1 -0.310811 Y1 0.490991 Dx 0.009009 Dy 0.009009

X1 -0.301802 Y1 0.490991 Dx 0.009009 Dy 0.009009

X1 -0.292793 Y1 0.490991 Dx 0.009009 Dy 0.009009

X1 -0.319819 Y1 0.481982 Dx 0.009009 Dy 0.009009
 
Hi Arno.

George's AGN file appears to contain elements for FS9. The SDK AgnDump:

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Input filename: 011220202223002AN.AGN-->
<AgnData>
	<BuildingHeightData>
		<Height>20</Height>
		<Height>0</Height>
		<Height>0</Height>
		<Height>0</Height>
	</BuildingHeightData>
	<FS9VegetationDefinitions>
		<VegDataClass1>1</VegDataClass1>
		<VegDataClass2>2</VegDataClass2>
		<VegDataPClass1>88</VegDataPClass1>
		<VegDataMaxDensity>100</VegDataMaxDensity>
		<Class1HeightMin>12.000000</Class1HeightMin>
		<Class1HeightMax>24.000000</Class1HeightMax>
		<Class2HeightMin>12.000000</Class2HeightMin>
		<Class2HeightMax>24.000000</Class2HeightMax>
	</FS9VegetationDefinitions>
	<FS9AutogenRect>
		<Location>
			<X>-0.319819</X>
			<Y>0.490991</Y>
		</Location>
		<Width>0.009009</Width>
		<Depth>0.009009</Depth>
	</FS9AutogenRect>
... and so on

Dick
 
Last edited:
Hi George.

When I look at ST. Martin with AgnDump, a default FSX photoreal, it also has these"FS9" elements.

Another odd thing I find is from annotator, you can select an element, copy it, and paste it to Notepad. You can select an individual element, or a whole group.

Here's a vegetation rectangle:

Code:
ANNO:1:1:0:0.008113:0.002404:-0.004056:-0.001202:0.004056:-0.001202:0:0:0:0#



Dick
 
Hi,

I see the difference already. The method currently on the Wiki uses a GUID to define the vegetation type, while the method in this AGN file uses the VGRD section to define the autogen. I will update agn2txt and the Wiki page tomorrow after I tested a bit more.
 
I've realised where the FS9 veg rectangles came from. When Annotator loads a photo-bgl, it also loads any existing agn files and saves them in FSX format. I had thousands of FS9 agn files and for some, the content will not have been changed but the format will.
 
Hi Arno:

I did a quick test of a FSX format default *.AGN file using FSX Autogen SDK AGNDump and your AGN2TXT.

Upon examination of the output files, I was very pleased to see AGN2TXT provided greater precision for the FSX LOD-13 Cell placement coordinates compared to AGNDump. :D


In addition, I tried using FSX Autogen SDK AGNDump and your AGN2TXT to process a FS9 format custom *.AGN file.

Whereas AGNDump generated a use-able output XML file, AGN2TXT was not successful ...with this error being written into the output file: :o

"!!! > 000333300123230an.agn is not a supported AGN file
Location 000333300123230
Version 1091777331
BuildingSettings 0 0 0 0
"


Would it be possible to also enable processing of FS9 custom *.AGN files via AGN2TXT in the future ? :confused:


Many Thanks for your efforts to make autogen placement more comprehensible to- and easier to achieve with better precision by- the FS community. :)

GaryGB
 
Last edited:
Hi Gary,

I might be able to add FS2004 support later, at the moment it does not have high priority for me. I am working on adding the missing sections from the FSX AGN file right now.

Hi George,

I am considering to make a XML2AGN compiler to complement AgnDump. At first I was thinking to make a txt2agn to complement my agn2txt, but at the moment I think it might be better to use the AgnDump for decompiling. Although Gary's remark about resolution makes me wonder again.
 
Back
Top