Mesh LOD

rhumbaflappy

Moderator
Staff member
Resource contributor
#2
The mesh BGLs don't have an LOD limit as far as I know. I did a test for an LOD 20 once, but soon gave up as the estimated time to completion was over 350 hours.

FSX does have a limit, and will only show mesh to 1 meter, which should be LOD 15.
 
#3
Thanks. But what does GrayGB refers to in this comment in the post?

FSX already provides a LOD-10 resolution terrain mesh (38.2 Meters between gridded elevation data points) in [FSX install path]\Scenery\0303\Scenery\dem0303.bgl
I want to know the LODs of the default FSX BGLs?
 
#4
To see what LODs are in the FSX default terrain mesh BGLs


Load them 1 at a time into FSX SDK TMFViewer, then:

TMFViewer Menu > View > Level of Detail > All


Locations and File Names

[FSX install path]\Scenery\[Area Name or Number]\Scenery\de*.bgl

[FSX install path]\Scenery\[Area Name or Number]\Scenery\dw*.bgl

[EDITED]

Highest / Lowest Resolution
:

[FSX install path]\Scenery\0101\scenery\0dem_StHelens.bgl (LODs 2-14)

[FSX install path]\Scenery\BASE\Scenery\dem4km.bgl (LODs 0-3)


CAVEAT
: FS terrain mesh ground surfaces may be "re-meshed" or 'flattened' by certain other scenery content:

* Terrain Mesh BGLs

* FS2Kx legacy format vector or FSX / P3D CVX vector BGLs (and '-' or '+' offsets for certain vector objects)

* Scenery.Cfg "Area" Layer Flatten Coordinates


Also, Terrain Mesh BGLs may have higher effective display priority based on several factors:

* Loading 'low' and/or early via greater Geographic 'extent of coverage' size (lower LODs)

* Loading 'low' and/or early via physical Area position in FS scenery library GUI stack of layers

* Alpha-numeric file-naming


NOTE: The above examples may not be an all-inclusive list of possible factors that may ultimately "impact" run-time display of FS terrain mesh ground surfaces ;)


Some pertinent links:

http://www.fsdeveloper.com/forum/threads/higher-lod-terrain-not-drawn.435658/

http://www.avsim.com/topic/62732-mesh-settings-and-interpolation/

[END_EDIT]

Hope this helps ! :)

GaryGB
 
Last edited:
#6
Hi again:

AFAIK ACES used specific resolutions of source data for making the default terrain mesh derived from primarily the earlier "cleaned" SRTM data sets for areas outside the USA, and 30 Meter data sets from the USGS for the USA itself.

When FS SDK Resample is used to output elevation data points mapped to terrain vertices in the FS terrain Quad Mesh Grid for 1 or more LODs according to instructions within the INF file, the intervals between those elevation data points will be as described in this example table:

http://www.fsdeveloper.com/forum/threads/flattens.425495/page-2#post-633002


While it is true that one can manually set the "Mesh" Resolution slider in the FSX Menu GUI (or set certain parameter values in the FSX.Cfg) to enable smaller intervals between terrain vertices in one's FS run time render of the FS 'ground surface', that does not truly increase the resolution of the source data encoded into the elevation data points of the terrain mesh BGL; rather it simply results in having more terrain vertices over which to 'spread' the interpolated values for the original (lesser) number of elevation data points in the source data used by FS SDK Resample when the terrain mesh BGL was compiled.

Thus, although one effectively has more available terrain vertices with interpolated points having computed elevations assigned to them, the closer terrain grid vertex intervals really have NOT gained any true "increase" of resolution ...but instead, only a greater 'granularity' or 'density' of the terrain grid itself.

Note, however, that closer terrain grid vertex intervals can be useful- if not actually "required"- for CVX vector content coded with 'closer' vertex intervals in order to accurately render highly detailed sloped flattens etc. :idea:


IIUC, you are endeavoring to achieve real-time display of FS terrain, possibly with derived / computed collision-avoidance and other Avionics features / functions ...via a Gauge and/or Module which reads data from FS documented and undocumented locations of the FSX / P3D address space in RAM, and/or are trying to achieve same based on an immediately-before-flight scan and interpretation of all possible terrain-related FS files on disk and other scenery-related factors impacting final FS run time render of terrain mesh ground surfaces in the FS scenery files.

If you tell us more about what you specifically need to know or understand, perhaps we could better help you. :scratchch


PS
: I edited my post above:

http://www.fsdeveloper.com/forum/threads/mesh-lod.438258/#post-753767


Hope this latter reply provides a pertinent answer for all of your questions above. :)

GaryGB
 
Last edited:
#7
Thanks GaryGB
You were very clear.
I am new to BGLs so I am just trying to figure out my way through them.
To read in process DEM information is not what I am trying to do, maybe read offline BGLs would be nice to.
Thanks
Federico
 
#8
Indeed, it might be more successful to perform a "immediately-before-flight" scan and interpretation of all possible terrain-related FS files on disk and other scenery-related factors impacting final FS run time render of terrain mesh ground surfaces in the FS scenery files. :scratchch

However, as you can already see, the list of those factors and how they interact at run time is rather extensive and complex. :alert:

GaryGB
 
#9
Just one final question, where is the LandClass information stored?
Is there a global one, and then one dedicated for each QMID ?
 
#10
Hi Federico:

Do you mean in what FS sub-folder location ? :scratchch

Yes, there is a global one; and local land class texture instructions can also be displayed with higher priority for Area Points within certain quad sizes, as well as according to the slope value for local terrain, and IIUC, for Altitude relative to one's position on / near a sloped terrain surface.

Answering this could be potentially very complex, depending on what you actually need to know for an example scenario. ;)

GaryGB
 
#11
Thanks GaryGB

Yes, there is a global one; and local land class texture instructions can also be displayed with higher priority for Area Points within certain quad sizes, as well as according to the slope value for local terrain, and IIUC, for Altitude relative to one's position on / near a sloped terrain surface.
I see the Global worldlc.bgl file, which is LOD-5.

Where is the local land class, any default higher LOD you can point to me?
 

rhumbaflappy

Moderator
Staff member
Resource contributor
#12
There is no default local landclass. You can make one. It must be LOD5. You can make vector polys (parks) of all the landclasses to get smaller sizes, but there is no blending.
 
#13
Hi again, Federico:

I see that Dick has also replied while I was composing this post. :wave:


For 'greater clarity in context' of what follows here, I shall preface my reply with an initial note that LOD-5 / QMID-7 quad sized land class tiles have Area Points which are the equivalent of LOD-13 / QMID-15 quad sized tiles. ;)



Modifications of what land class "Locally" displays with higher priority than "Global" land class instructions, can be achieved by a number of methods.


It is possible to use CXV vector polygons which are mapped to default or custom land class textures (with or without Autogen annotation) which are smaller than Area Points in LOD-13 / QMID-15 quads; however these methods require special procedures which are beyond the scope of my available time to explain and discuss at the moment.

Generally speaking, such "Vector Textured Polygons" (aka "VTP") are to be distinguished from "Raster" type land class instructions / definitions


Regarding actual "Raster" type land class instructions / definitions, the FS SDK docs state:

"Each color coded square in the grid corresponds with a single land type from the Olson Land Classification Table, shown below. It is not possible to provide a greater degree of resolution than the 1.2km squares of the grid, (but) it is possible to change the land classification to a different value from the table."

https://msdn.microsoft.com/en-us/library/cc707102.aspx#LandClassification


Note
: IIUC, "Resolution" in the above statement refers to the terrain grid size of the raster land class pixels, and not the actual texture image (ex: aerial imagery etc.) to be displayed on the ground. :pushpin:


BTW
: LOD-13 / QMID-15 quad sized tiles are Area Points for LOD-5 / QMID-7 quad sized land class tiles ...as previously cited in this table linked above in this thread:

http://www.fsdeveloper.com/forum/threads/flattens.425495/page-2#post-633002


...and as explained in this post I had previously linked to:

http://www.fsdeveloper.com/forum/threads/ptsim-larger-maps.424686/#post-628531


...in another one of our discussion threads:

http://www.fsdeveloper.com/forum/threads/placing-large-polygons-over-terrain.436515/




I believe it would be best to study FS SDK docs in order to comprehensively understand this subject before attempting to empirically formulate conclusions from isolated bits of information (although, admittedly, this is what many FS developers appear to do, either because FS SDK docs are perceived as incomplete, obfuscated, or otherwise challenging to understand when translated from the complex English in which they are written.

https://msdn.microsoft.com/en-us/library/cc707102.aspx

https://msdn.microsoft.com/en-us/library/cc526979.aspx


Hope this helps a bit more with the learning process ! :)

GaryGB
 
Last edited:
#14
There is no default local landclass. You can make one. It must be LOD5. You can make vector polys (parks) of all the landclasses to get smaller sizes, but there is no blending.

IIUC, Dick, you were asserting that there is no automatic randomized rotation and blending of default land class texture tiles performed by the FS rendering engine ? :scratchch


But, AFAIK, if one wished, one could instead use custom CVX vector "park polygons" mapped to custom land class textures with "multi-layer" methods using blend masks to manually implement randomized rotation and blending of such land class texture images mapped to those vector polygons ...that would subsequently be performed by the FS rendering engine. :idea:

GaryGB
 
Last edited:
#17
Thanks both.
So the Land Class is LOD-5 with possibility of adding polygons that overlay on top of the original data that comes from the worldlc.bgl
So the additional data is not Land Class per-se but polygons added via CVX files which can take a land class texture ?
 
#18
Yes, but... each LOD-5 / QMID-7 land class tile has 256 x 256 LOD-13 sized Area Points using Binary counting of 0-256, which IIUC = 257x257 with texture image overlap of 1 pixel along the South Row and East Column of each mapped texture image (aka "bottom and right edges" of such tiles) when regarded as 'NW-positioned' from the aerial imagery point of origin for pixel numbering ...relative to adjacent tiles. :alert:


[EDITED]

NOTE: AFAIK, the LOD-13 sized Area Points for LOD-5 land class tiles are still a part of the FS land class rendering sub-system.

However, variable-sized FS2Kx legacy VTP vector format or FSX / P3D CVX format terrain polygons mapped with land class textures are to be considered as distinctly different types of objects from 'type 252' land class as Dick described them above.


IIUC, the latter vector polygons mapped with land class textures show the visible ('diffuse') mapped texture image within the polygon.

As to the area outside the visible polygon portion of that "tile" on which is positioned, that periphery is automatically set transparent by the FS SDK compiler.

IIRC, that transparent area extends outwards to the edges of the LOD-5 / QMID-7 tile for FS2Kx legacy format VTP vector polygons, and to the extent of a LOD-9 / QMID-11 tile for FSX / P3D CVX format vector polygons ...when 'mapped' with land class textures.

[END_EDIT]


Since custom photo-real aerial imagery is technically a special form of "land class", we can better understand this concept for purposes of land class "granularity" when considering methods used for such custom photo-real land class made via FS SDK Resample as used in FS2002 and FS2004: :idea:

256x256 Area Points with (1) unique 256x256 pixel texture image mapped to each such Area Point


...again, this is as illustrated in the post quoted / linked above:

http://www.fsdeveloper.com/forum/threads/ptsim-larger-maps.424686/#post-628531


...and as just discussed and linked above:

http://www.fsdeveloper.com/forum/threads/mesh-lod.438258/#post-754449

[EDITED]

One may see a "worked example" by opening in FSX SDK TMFViewer, the FS2Kx legacy format Oshkosh custom photo-real land class scenery:

[FSX install path]\Scenery\Cities\OshKosh\scenery\imgosh.bgl



FS SDK TMFViewer Menu > View > Level of Detail
: "LOD-5"

NOTE: This shows the LOD-5 (Yellow) land class tile size within which multiple LOD-13 sized Area Point land class textures are mapped (Cyan),

As such LOD-13 sized Area Points are essentially "mini-quads" capable of being mapped with unique land class texture images and Autogen, IMHO, on a practical basis, one might consider them to be 'local sub-tiles of land class'. :idea:






FS SDK TMFViewer Menu > View > LOD Grid: "LOD-14" -and- TMFViewer Menu > View > QMID Grid: "QMID-15"

NOTE: This 'zoomed-in' view shows LOD-13 Area Point tile size quad grid terrain vertices (Green) at which (4) adjacent LOD-13 default land class texture 'Areas' (Magenta) overlap and are rotated / blended etc.


FYI: Legacy FS2Kx format custom photo-real land class texture tiles made with FS SDK Resample are not rotated / blended by the same methods as default land class tiles, but are instead overlapped and blended by (1) pixel along adjacent tile edges via a different method.





Jim Keir's LWMViewer2 > Menu > Windows > "Information - F2"

NOTE: This shows an approximately LOD-5 land class tile size within which multiple LOD-13 Area Point land class textures are mapped.

The mapped 256x256 pixel FS9-format custom photo-real land class 'type 252' texture image 003100003122201Su.bmp is colored in Magenta to demarcate its land class tile 'Cell' / 'Area' location by the user aircraft position within "Pioneer" air field at (ICAO) KOSH near RWY-9 of Wittman Regional Airport.

The aerial imagery at the same position in Google Earth is also shown in 'extended desktop' view.



[END_EDIT]


BTW
: AFAIK, the FSX / P3D custom photo-real land class BGL made via FS SDK Resample may still be using similar methods inside the 1-piece BGL containing a hierarchy by LODs of MIPMAP-ed textures < having greater color bit-depth than in FS2Kx ? > and tile placement code, but which permits the overall BGL container "package" to have any custom file name desired by the end user. :scratchch


You may wish to review this thread for more info related to the IMHO, parallels between- and challenges involved with sorting out- the complex mapping involved in 'gridded' land class and custom photo-real aerial imagery:

http://www.fsdeveloper.com/forum/threads/bgldec-a-resample-bgl-decompressor.433789/



Perhaps Dick and Holger might also wish to clarify and/or expand further on this particular arcane and highly technical sub-topic ? ;)


GaryGB
 

Attachments

Last edited:
Top