March 15, 201016 yr Hello,I'm working on a small program for auto-creating vegetation .agn files for photosceneries. My algoritm sims not too bad, but my problem is to found how to create the names of the files. A name like : 001222131202100an.agn include the coordinates, based on the Lod13 grid. But I don't know how to calculate the Lod13 grid, neither coding the .agn filename.May be, the answer is somewhere in this forum but I can't found it. Can someone help me?ThanksPhilippe
March 15, 201016 yr The forums at FSDeveloper.com woud be a good place to ask that question of no one responds here.http://www.fsdeveloper.com/forum/index.phpGood Luck!
March 15, 201016 yr Salut Philippe,There is nothing particularly complex about the naming convention. The LOD grid is progressively smaller, divided into quarters, and each successive quarter receives the coordinate name. Here is an image taken from Cristian Stock's TMFManual written 7 years ago:As Christian wrote:The quad-tree starts at number –2. This seems like an unusual choice, because naturally one would pick 0. The LOD –2 quad is one huge quad which covers the whole world. In fact it’s even bigger than the whole world. The world is ‘rolled out’ into a rectangle from 180W to 180E (green in the picture below). In the LOD –2 quad it sits in the upper left corner. The LOD –2 quad gets split into 4 LOD –1 quads. The numbering of each quad is 0 (upper left), 1 (upper right), 2 (lower left), and 3 (lower right). Since the world sits in the upper left corner, the quads 2 and 3 are empty! Quad 1 is also only half filled. This means the world sits completely in quad 0 and the left half of quad 1. The reason Microsoft did this is because this is the only way to keep the LOD quads square (the rolled out world isn’t square). LOD 0 splits the LOD –1 quads each into 4 further quads. Of course, only LOD –1 quad 0 has 4 child quads that actually have data. LOD –1 quad 1 has two child quads with data (number 0 and 2). LOD 0 is the first level at which all quads have child nodes with data in them.As each quadrant is divided up to LOD 13, just add the coordinate value until you get the entire name.Best regards.Luis Hot, humid Caribbean paradise!
March 16, 201016 yr Hi Philippe:First, I'd like to recommend reviewing Luis' excellent Tutorial on "Using the Autogen Annotator" for FSXhttp://library.avsim.net/esearch.php?CatID...amp;DLID=140537NOTE: This is one of numerous outstanding and generous Tutorials shared with us by Luis Feliz-Tirado:http://library.avsim.net/search.php?CatID=...;Go=Change+ViewYou may also wish to take an initial look at ACES team member Adam Szofran's "Global Terrain Technology for Flight Simulation" ...an informative overview of the "FS World"http://msdn.microsoft.com/en-us/esp/cc789357.aspxTo create a new utility for Autogen Annotation, you may also wish to first review some information here on currently available Utilities :http://forums1.avsim.net/index.php?showtopic=82074http://forums1.avsim.net/index.php?showtopic=260987http://www.fsdeveloper.com/forum/showthrea...ghlight=autogenhttp://www.fsdeveloper.com/forum/showthrea...ghlight=autogenIMHO, the more notable alternatives / adjuncts to the FSX SDK Autogen Annotator are:AGenT - Lars Hoyer (originally distributed as a part of the UKVFR Freeware Add-on Scenery Collection) for FS9http://www.f-bmpl.com/index.php?option=com...&Itemid=22#Autotrees (automatic autogen file creation) beta v0.1 - David J Griffiths for FS9http://library.avsim.net/search.php?Search...t&Go=Search[Caveats:Bear in mind that one can do most of the needed AGN annotation work in FS2004 (FS9), as the FS9 format AGN files (with proper "legacy" file names for the LOD / QMID quad tile naming system) are directly loaded and rendered by FSX in addition to those of the newer FSX file naming system, so be careful that you keep work in separate folders to determine the Autogen density one is actually achieving from a given set of *AGN* files as rendered in FSX at run time during an inspection flight.The Autogen XML files themselves are directly loaded and rendered by FSX, and that before any Autogen Annotation source files made in FS9 are converted to the FSX AGN file format, one must make a backup copy... since after conversion to FSX, they cannot be converted back very easily.To more directly answer your question regarding the quad tile naming system, be aware there are file names used for default land class quad "tiles", and IIUC, there is a subset of alternate file names used for "custom" land class quad tiles... which includes photoreal land class texture tiles (not to be confused with photoreal textures mapped onto arbitrarily placed custom ground polygons).To see the legacy LOD and/or new QMID base file "numeric" quad tile names as you slew or fly over the terrain, one can use:TCalcX version 002 - Richard Ludowise (aka "Rhumbaflappy") for FSXhttp://www.fsdeveloper.com/forum/showthread.php?t=4273TCalc2004 Version2.0 - Richard Ludowise (aka "Rhumbaflappy") for FS9IdentifyTile - George Davison for FS9http://www.geo-davison.demon.co.uk/IdentifyTile.zip...Which has since been re-written to become IDTileX for FSXhttp://www.geo-davison.demon.co.uk/IDTileX.zipNOTE: To "visualize" the areas that one is working with in the FS LOD / QMID quad-tree tile matrix, one can either open the appropriate files in FSX SDK TMFViewer and click View > LOD Grid (set to LOD 13), or in FS9 one can optionally use:CellGrid 2004a utility package of TDFCalc2, TMFViewerCalc, and TDFCalc2004 (all FSUIPC versions) to display color LOD 13, 8 and 5 grid lines on the DEFAULT terrainNOTE: (IIRC the lines won't show under legacy photoreal textures in FS9)For FSX, be aware of the modified quad QMID Base File Area naming scheme that still incorporates part of the legacy file numbering system in individual file names of the Area sub-folders in [FSX install path]\Scenery\(...see: FSX SDK Documents > Terrain and Scenery > Base File Information )To identify the individual default land class and "other" scenery files pertinent to a given FS area while slewing, one can use:LWMViewer 1.x - Jim Keir for FS9http://www.jimkeir.co.uk/FlightSim/LWMViewer.htmlLWMViewer 2.x - Jim Keir for FS9http://www.jimkeir.co.uk/FlightSim/LWMViewer2.htmlFYI: It is already possible to use Google Earth with FSX-KML to generate "blended", textured land class FSX SDK SHP2VEC CMX vector "polygons" for larger areas that utilize default land class types already available to use in FSX which contain autogen pertinent to the land class type.The Google Earth KMZ/KML output file coordinates could be further processed for other uses by utilities such as FSX-KML, SBuilderX or even ADE to output land class "polygons" or additional types of vector scenery content, thus minimizing reliance on very large photoreal texture areas of coverage in one's scenery projects.For annotating photoreal custom land class scenery quad tiles, perhaps a slightly different Google Earth method might be used to generate "Point" and/or "Polygon Vertex" coordinates to further compute "location", "width", and "depth" data for placing annotation rectangles etc. from the Google Earth KMZ/KML output file.The "point" coordinate data could perhaps be converted to the FS internal quad tile "coordinate system" used inside Autogen Annotator AGN files; this file format can be seen by using the "AgnDump.exe" utility in the Autogen SDK root folder to decompile an AGN file to XML.An example annotation rectangle "statement" in a decompiled 000333300123230an.xml file: :( <FSXAutogenRect> <FSXAutogenRectGuid>{0a7dd9ef-9e7f-4140-9ae8-5d1d5047176b}</FSXAutogenRectGuid> <Location> <X>0.465754</X> <Y>-0.510940</Y> </Location> <Width>0.035160</Width> <Depth>0.024171</Depth> </FSXAutogenRect>BTW: For related info on QMID level, LOD, Block size (degrees) and Appendix II: The Naming Convention for Terrain Textures, see the "QMID and LOD Values" FSX SDK document. http://msdn.microsoft.com/en-us/library/cc...MIDandLODValuesTo compute LOD / QMID quad vertex coordinates, see this thread, and refer to the formula in :http://forums1.avsim.net/index.php?showtopic=81104Rhumbaflappy said: "You could download "tcalc_v2.zip" from the AVSIM library. I've included the delphi source code, and from that you should be able to get your formula for LOD's." http://library.avsim.net/search.php?Search...t&Go=SearchHope all this information helps you get started; please keep us informed about your utility, and the approach it uses to do AGN annotation ! :( GaryGB
March 16, 201016 yr Hi Luis: Christian Stock's "TMF Manual" initially seems to be missing from the AVSIM download file library... unless the right name is used to find it. :( IMHO it is a vital part of the FS Development resources we should all have accessible; I thought I'd mention it can be found here: :( Terra Model File Manual - Christian Stockhttp://library.avsim.net/esearch.php?CatID...&DLID=25267Thanks again for all your help to everyone here ! :( GaryGB
March 16, 201016 yr Author Wow! a lot of informations!Thank you very much Gary and Luis.For the lod13 grid, even if I still have some diffilculties, I begin to see how it is calculated by reading the Sdk help file.I'm going to read and understand everything you gave me.I'll inform you about the way my project will progress.Merci beaucoup.Philippe
March 16, 201016 yr If you download this:http://library.avsim.net/esearch.php?CatID...&DLID=55467it's called tcalc_v2.zip known as TCalc_2004 version2. The download includes the Delphi source code which will show what I used to calculate the LOD13 names. I'm sure you could improve the code. :)Dick
March 17, 201016 yr Hi Dick:Thanks for the updated link; my AVSIM edit time ran out before I saw I had missed posting the intended link in context above. :( BTW: Is there any possibility of seeing a FSX version of "Cell Grid" able to display over both default and custom photo-real land class tiles as an "additional layer" ? :(GaryGB
March 17, 201016 yr Gary, you are definitely our resident expert. A lot of good information in your comments. Thanks.Best regards.Luis Hot, humid Caribbean paradise!
March 17, 201016 yr Hi Luis:Thanks for your kind feedback ! :( But I really must say I still regard myself as a mere "beginner", when I consider the many complexities that I observed you and other FS Developers working so diligently to explore, understand and apply... so others could eventually contribute their creative input to the FS Community over subsequent years as well. :( So much is now possible in FS thanks to all the hard work done here at AVSIM... and in other FS forums; we all owe a great deal to those ongoing efforts. :( In keeping with that spirit of making FS "...As Real As It Gets", I also hope to "give something back" to the FS Community from my observations and insight by helping others when questions arise. B) Regards,GaryGB
March 19, 201016 yr Hi Luis:Thanks for your kind feedback ! :( But I really must say I still regard myself as a mere "beginner", when I consider the many complexities that I observed you and other FS Developers working so diligently to explore, understand and apply... so others could eventually contribute their creative input to the FS Community over subsequent years as well. :( So much is now possible in FS thanks to all the hard work done here at AVSIM... and in other FS forums; we all owe a great deal to those ongoing efforts. :( In keeping with that spirit of making FS "...As Real As It Gets", I also hope to "give something back" to the FS Community from my observations and insight by helping others when questions arise. B) Regards,Thank you guys for this informative discussion. This is a real gem of summary comments and links, its a keeper!GaryGB Bryan Wallis aka "fltsimguy" Maple Bay, British Columbia Near CAM3
March 20, 201016 yr Author Hi allStep by step, the things becomes more clear.I did many tests with a .bgl as output, to check if algorithm, calculation of coordinates, use of Guid, and so on, are correct. The trees ares at the right place, but 37000 trees on a lod13 square are a bit too much for my PC (Fps down to 0 :( ).I'll show you some pictures, but I need the agreement of the photoscenery author before posting.The next step is to produce an .agn.For this, I have some more questions:-is there a limite for the number of sides of a polygon?-is there a limite for the total number of polygons in a lod13 grid?-is there a big Fps difference between one polygon and many small ones for the same covered surface ? Merci par avancePhil
March 21, 201016 yr Hi allStep by step, the things becomes more clear.I did many tests with a .bgl as output, to check if algorithm, calculation of coordinates, use of Guid, and so on, are correct. The trees ares at the right place, but 37000 trees on a lod13 square are a bit too much for my PC (Fps down to 0 :( ).I'll show you some pictures, but I need the agreement of the photoscenery author before posting.The next step is to produce an .agn.For this, I have some more questions:-is there a limite for the number of sides of a polygon?-is there a limite for the total number of polygons in a lod13 grid?-is there a big Fps difference between one polygon and many small ones for the same covered surface ? Merci par avancePhilHello:You might wish to check out these links:http://forums.fsaddon.eu/viewtopic.php?t=2...ghlight=autogenhttp://online.simmarket.com/fsaddon/TongassX-User-Guide.pdf (see page 24 + 25 )http://www.fsdeveloper.com/forum/showthrea...OGEN+TREES+CELLhttp://www.fsdeveloper.com/forum/showthrea...t=AUTOGEN+TREEShttp://www.fsdeveloper.com/forum/showthrea...t=AUTOGEN+TREEShttp://www.fsdeveloper.com/forum/showthrea...t=AUTOGEN+TREEShttp://www.fsdeveloper.com/forum/showthrea...t=AUTOGEN+TREEShttp://www.fsdeveloper.com/forum/showthrea...t=AUTOGEN+TREEShttp://www.fsdeveloper.com/forum/showthrea...t=AUTOGEN+TREEShttp://www.fsdeveloper.com/forum/showthrea...t=AUTOGEN+TREEShttp://www.fsdeveloper.com/forum/showthrea...t=AUTOGEN+TREESGenerally, although with custom photoreal land class textures one would typically plan to use the AGN annotation method, there are other options. :( Wherever possible, IMHO, it is desirable to use a number of default land class texture polygons to provide content in FSX which already has compatible autogen associated with (most of) the default land class texture types.This approach allows one to create smaller, faster loading, and potentially more FPS-efficient scenery packages composed of multiple layers of different land class polygons which blend according to instructions defined for such custom layers in the FSX Terrain.Cfg in the [FSX install path] main root folder.There are however, some complex considerations when blending land classes:http://www.newsite.fsdeveloper.com/forum/s...read.php?t=8566More specific to photoreal scenery, IIUC, if a custom photoreal land class texture is created with an accompanying "blend mask" at the time the custom photoreal land class is made using a multi-source INF file in FSX SDK Resample, the underlying custom photoreal land class textures should then show through along with any overlying polygons made using default land class textures according to the gradient (if any) in that blend mask.If a custom photoreal land class texture is created with an accompanying "blend mask" at the time the custom photoreal land class is made using a multi-source INF file in FSX SDK Resample, it can be placed above another custom custom photoreal land class texture (which is NOT devoid of imagery in the bitmap); the underlying custom photoreal land class textures should then show through according to the gradient (if any) in that blend mask.Alternatively, if a custom photoreal land class texture "transparent layer" (devoid of imagery in the bitmap) is created with an accompanying "water mask" and a "blend mask" at the time the custom photoreal land class is made using a multi-source INF file in FSX SDK Resample, it can be placed above another custom custom photoreal land class texture (which is NOT devoid of imagery in the bitmap); the underlying custom photoreal land class textures should then either be covered by water in the areas of that water mask... or show through, according to the gradient (if any) in the areas of that blend mask.This can be useful for adding a layer of water on top of a photoreal layer that did not already have water coded into its Alpha layer (or by separate use of a water mask to code for water display using a multi-source INF file) at the time it was originally created in FSX SDK Resample.http://www.fsdeveloper.com/forum/showthrea...mask&page=2Ultimately, all these custom photoreal land class textures should then blend in with one's polygons which use the FSX default land class "textures"; however, default land class polygons would IIUC be placed above any custom custom photoreal land class textures placed (or already existing) for that area in a layer below.The FTX-PNW demo of Olympic Peninsula in Spring is a good example of this method at its current "state of the art" level of understanding and implementation: :( http://fullterrain.com/Direct download link: http://z208hotcache.simplecdn.net/orbx_fre...XNABlueDemo.zipAlso see some excellent "interactive" screenies of Holger's prior innovative development for this area, showing the "seasonal" display possible with this method:http://www.hsandmann.com/FSX/EF/EFX_Alpha_..._comp_home.htmlhttp://www.hsandmann.com/FSX/EF/EFX_Alpha_...mp_seasons.htmlHope this info helps with your further endeavors ! B) GaryGB
March 22, 201016 yr Hi Philippe:I had not been checking in at the AVSIM FSX Forum for some time, and missed seeing this pertinent thread: :( http://forums1.avsim.net/index.php?showtopic=279576As often is the case at that forum, vigorous discussion has been underway regarding how to optimize FSX performance. :( In that thread, IMHO, we have 2 of the currently more knowledgeable authorities about FSX autogen discussing their insights and rationales for implementing autogen in scenery development, and how systems might be configured to maximize ones satisfaction of the FSX scenery experience depending on ones individual hardware / software milieu... and ones installed mix of FSX 3rd party add-ons.Many such discussions and intensive explorations of the inner workings of FS have taken place in the FS Community over the years (many such threads dating back to 2002 can still be found via the AVSIM search engine); hopefully, with some intelligent moderation on the part of all, we'll see more discussions of this sort in the fine tradition of FS forum system dialog... rather than closed dialog via private messages.After all, IMHO, forum discussion is at its best when it's about improving the FS experience for the FS Community as a whole... and not promoting a commercial agenda. :( I believe all thorough discussions of FS ultimately contribute to the FS knowledge base, and I hope such open dialog continues, as I believe that can lead to further new insights of potential benefit to all in the FS Community.Many thanks to Holger and Nick for engaging in their recent open discussion regarding system configuration, scenery development, and FS performance as it relates to autogen; hopefully as in most past forum dialogs, more new insights and ideas will emerge for both developers and end users to bring about a better FS experience for all. B) GaryGB
March 26, 201016 yr Author HiGary, thank you very much for all the links you gave me.I dont have read everything, because I was focused on my first trees.And I got them some minutes ago :The base scenery is the Bluesky one (Gottfried Razek) few miles west of Cedar (Utah). The fps stay at 25 (Target value)I still have many things to do by hand (to input the base texture and coordinates) but the trees localization and the .agn are made automatically.However, I just discovered a 'bug', and, may be, someone can help (I sorry if the is answer is into the link you point me...)--> The next pictures are the top corner of the lod13 grid I'm working on. You can see the road on the top left side. The red lines on the small picture are the polygons defined by the program. On the right it's what the annotator understands. This looks OK, but......But Fsx seems doing something different :and it adds trees on the road. The two red lines ares the border of the lod13grid.It there any well known reason for that?And, again, many thanks for your helpPhil
Create an account or sign in to comment