# MESH terminology ??

## Recommended Posts

Hi,When I look at available mesh packages, the author usually specifies the quality of the Mesh in arc seconds (e.g. 3.75 arc seconds)and/or a LOD value (e.g. LOD10).I think I understand what the measure in arc seconds means: the distance between two elevation points on the grid.So, measured on the equator, a 60 arcseconds mesh would mean that the distance between two elevation points is 1 Nmile or 1852 meter (and smaller if you go to the poles). So if somebody says: a 3.75 arcseconds mesh based on 30 arc seconds DEM data, this would mean: the defined elevation points in the area are 1852/16 = 115 meters apart, while only 1 of every 8 points is real data and the other 7 points are "made up" (by interpolation or alike).Right ??Now, what does the LevelOfDetail measure mean exactly (other than the higher the number, the better the quality, the larger the file).Is it a different measure ?Does it directly relate to the arc seconds measure ?What does it specify ?Thanks, Rob

##### Share on other sites
 Help AVSIM continue to serve you!Please donate today!

What a great question!You are right about the first part and quite honestly I'm not 100% sure I understand the LOD part of it. All I'm really interested in is the distance between elevation points beacause that gives me an idea as to how my terrain will look. I think the default is roughly 1 km distance for each point. Then there's 90 meter and 30 meter and some areas claim 10 meter detail. (Some US National Parks)Ideally, you'd want variable detail, as this would avoid repetition of points that are the same in area where the land if mostly flat or gentle slopes (less computing, higher frame rates).What I've never seen explained is how the interpolation is done.Is it linear, logarithmic or what?Since the world in MSFS is flat then using terms such as arc seconds tend to become confusing because there are many ways to describe points on the earth.I personally prefer the descriptions to be honest. Just tell me the distance between the points of your original data. Though, there are ways besides interpolation to 'improve' the resolution of a terrain mesh. Peaks of mountins and tops of hills are readily available, though there's a little more to it than that.

##### Share on other sites

>Right ??Close enough!LOD specifies the distance between elevation points in the sim. LOD10 => elevation data at horizontal intervals of 38.2 meters in the sim world. Higher LOD => closer spacing.The SDK calculates elevation values for these points by interpolating from the source data; the closer the two resolutions match, the smaller the error introduced by this process.Source resolution determines accuracy (quality); the developer should match the LOD to the source (developer integrity). For example:30m source data fits well with 38.2m (LOD10) or 19.1m (LOD11) final resolution.1000m source data fits best with 1223.0m (LOD5) or 611.5m (LOD6) final resolution. (8x oversampling is of dubious value)FSTerrain is often used to create mesh with GTOPO30 data, and offers the oversampling level (3.75 arc seconds) you refer to. The interpolation seems to be linear, and so adds little useful information. The interpolation done by the MS SDK seems to be more sophisticated, but is probably crippled in its efforts by severe previous linear interpolation using FSTerrain. Where necessary at all, I think it is better to oversample using the LOD level than with FSTerrain.I suspect the interpolation procedures MS uses, in the SDK and in the sim, are valued trade secrets. Regards,Stevewww.fs-traveler.com

##### Share on other sites

Hi Steve,Thanks for the reply.>>LOD specifies the distance between elevation points in the sim. LOD10 => elevation data at horizontal intervals of 38.2 meters in the sim world. Higher LOD => closer spacing.So if I understand you correctly, it's just two ways of defining the distance between points ..To be more precice: the LOD value defines the distance independant of the Latitude, whereas distance based on arc sec. measure is Latitude-dependant.Am I right again ?If so, at the Equator LOD10 equals 60 * (1852/38.2) = 1.2 arc sec.And at Latitude 40 Degrees LOD10 would equal something like 2 arc sec.Right ?Regards, Rob

##### Share on other sites

LOD is a grid system that divides the world into "chunks"...LOD 0 is defined as what you get when you divide the world into 6 sections, longitude cuts made at 0, 120, and -120, latitude cuts at the equator....thus 6 pieces.Each subsequent lod number divides these peices in half...thus lod1 cuts the world at the equator and +/- 45 deg of latitude, and 6 longitudal cuts are made, 0, 60, 120, 180, -120, -60.It does correspond to the distance between data points in a data matrix, because you will be directing your mesh to fill one of these grids. The fs2000 terrain sdk is my source for info, do read that for more detail.Bob Bernstein

##### Share on other sites

Hi Rob,>If so, at the Equator LOD10 equals 60 * (1852/38.2) = 1.2 arc sec.>And at Latitude 40 Degrees LOD10 would equal something like 2 arc sec.Do you mean 60 * (38.2/1852) = 1.2? Yes. In fact, 30m source data is often referred to as 1 arcsec data. We may need some help from a geographer/cartographer or scenery designer before long, but I'll try to carry this a bit further.>So if I understand you correctly, it's just two ways of defining the >distance between points ..Yes, but "just" doesn't really capture all that is involved. Latitude and longitude describe a location on a geographic grid on the three dimensional surface of the earth. Source data may be in meters or arc seconds.The LOD grid system is a flat/cylindrical (Mercator-type) projection of the earth. I have no idea what sort of mathematics MS uses to translate dimensions from the source data projection to the 2-D LOD grid system/projection to the spherical lat/long coordinates of the earth, then back to our 2-D screens, using 3-D graphics cards. :((Of course, mapping software handles such conversions routinely, but none I've seen support the MS LOD map projection!)Imagine a flat sheet of paper representing the earth's surface. The LOD grid system divides the earth into northern and southern hemispheres. Each hemisphere is divided into 3 120-degree segments of longitude. [pre] | |--+--+-- | |[/pre]Each of these is subdivided into blocks of: height = (90 degrees)/(2^LOD) width = (120 degrees)/(2^LOD)Each of these "tmf" blocks contains 256x256 data points. So, block size is proportional to LOD selecteddata spacing within the block is block size/255For example, the SDK lists a span of 9784 meters for an LOD 10 quadrant. (Using MS earth dimensions.) It is approx. 0.088 degrees tall and 0.117 degrees wide. Their sizes are independant of location on the LOD quadrant system/projection.I agree with Bob. You might find the FS2000 Terrain SDK interesting, especially the LOD table on page 9. You can download a copy from the Links page on my website.Regards,Stevewww.fs-traveler.com

##### Share on other sites

THANKS all for the explanations.I'll certainly have a look at the suggested info.Regards, Rob

##### Share on other sites

Hi Christian, Very clear explanation about CLOD.So if I understand you correctly, it also doesn't matter at which layer you insert the mesh in the Scenery.cfg file because FS2K2 always uses the mesh with the highest LOD number.Reason: I have a LOD7 mesh for all of Europe, and a LOD10 mesh for Norway. So I don't have to exclude the Norway area in the LOD7 mesh.And now a tricky question:-). What happens if you have two LOD10 mesh bgl's initialised for the same area ? This happens for example if a add-on scenery builder includes a mesh system in his add-on scenery, while you have an wider mesh system active allready. Which one is used by FS2K2 then ? (because FS2K2 doesn't know what the source resolution of the two mesh systems is).Regards, Rob

##### Share on other sites

Hi Rob,Perhaps I can help here.>So if I understand you correctly, it also doesn't matter at which layer >you insert the mesh in the Scenery.cfg file because FS2K2 always uses >the mesh with the highest LOD number.True. The sim builds a database of all mesh in "active" scenery areas. I do recommend using separate folders for mesh from different sources, ... however, so you can easily control/test the use of the mesh.>Reason: I have a LOD7 mesh for all of Europe, and a LOD10 mesh for >Norway. So I don't have to exclude the Norway area in the LOD7 mesh.Right.>And now a tricky question:-). What happens if you have two LOD10 mesh >bgl's initialised for the same area ? I've done a little testing on this issue using my own mesh files (so I knew how they were constructed). The sim does seem to use the mesh constructed from the higher resolution source data. Order of installation, alphabetical sequence of filenames and scenery library layer did not seem to alter this.The source resolution is provided to the SDK, but I do not know if/where it is stored in the mesh bgl. Christian's description of the tmf header structure (Ryans Creek aerodrome documentation) has several "unknown" entries which may be candidates. Perhaps he can shed additional light here as well.Christian has noted the only real problem with mesh rendering. Low quality LOD10 mesh will receive preference over higher quality LOD8 mesh. I hope MS will give us more control over this situation in the future; either allow us to prioritize mesh using scenery folder layers or to specify whether to assign higher priority to LOD or source resolution.Steve

##### Share on other sites

Hi Steve,Thanks. That's how I expected it to work (when comparing various screenshots).And wilst I have your attention:Some scenery/mesh designers tell me to install there bgl files in addon sceneryxxxscenery, some in sceneryxxxscenery and some say in scenedbxxxxsceneryTo my best knowledge, it doesn't make any difference since you have to specify the path in a scenery.cfg entry anyway.Except if you put the bgl's directly in the fs2002scenery folder: then you don't have to change you scenery.cfg (but your scenery setup will be a mess putting it all in one folder :-) )Right ??Steve, I also looked at your fs-traveller site (I assume it's yours ?)Very good info, and well set up !!.It's just that (since I'm Dutch)I like flying in Europe more.So you ever produce REAL detailed mesh for countries like Austria or Norway, I'll certainly be back.And if you guy's ever have problems or questions about controllers (joysticks/pedals/throttles/yokes/etc) feel free to drop me a note (That is my area of expertise :-) )Cheers., Rob

##### Share on other sites

Hello Christian,Thanks for your insights regarding the rendering side of the LOD story. While we are wandering a bit from the original topic, I wonder if the CLOD process may help explain the TERRAIN_MAX_VERTEX_LEVEL parameter in the fs2002.cfg file. The default value of 19 does not render all the detail in high resolution mesh; 21 seem to be the maximum value providing additional detail (using 10m ->LOD13 mesh).From an unknown source describing CLOD: "If the difference of height in pixels between the triangle and the heightmap is greater than a certain threshold value (e.g. 3 pixels) then the triangle is split in two. After that, the two new triangles are recalculated again, and the process is repeated until the screen error is less than the threshold value."It is tempting to imagine that the TERRAIN_MAX_VERTEX_LEVEL value may be adjusting some "threshold value", forcing/allowing further splitting of triangles when additional source detail is available. For example, it could be an index into a table of sets of thresholds for each LOD quadrant level.Any thoughts?Regards, Steve

##### Share on other sites

Hi Rob,You are right about the many mesh installation alternatives. I've also seen instructions recommending adding a /texture folder as well. This is not necessary for mesh data. Thanks for the web site compliment! I hope to add a lot more as time permits. FS tips and discussions are scattered everywhere and it becomes difficult to find, much less make sense of, all of it.I have not created any REAL detailed mesh for areas outside the US yet, but I did just finish creating SOMEWHAT more detailed mesh for your area. (Using GTOPO30 data, without the gaps in coverage described on my website.) Send me an e-mail if you are interested in doing some "beta testing". And thanks for the offer of assistance in the hardware area. I'll keep that in mind.Steve

##### Share on other sites

Hi Steve,I haven't played with the cfg values, so I'm not 100% sure. From what I know you're right. In CLOD you'll have an 'error threshold', which describes the maximum error a CLOD mesh is allowed to have in pixels on the screen. TERRAIN_MAX_VERTEX_LEVEL very well may be this error parameter.The way this works is like this: the vertices of the currently rendered LOD will get compared to your highest LOD vertices. If the error is larger than the error threshold (TERRAIN_MAX_VERTEX_LEVEL) then a higher LOD will be used. Imagine, as you get closer to a LOD quad that is far away, the difference between the vertices of the LOD which the LOD quad uses currently and the vertices of the highest LOD will become greater (measured in pixels on screen!). As the difference becomes bigger as the threshold, the LOD quadrant will use a bigger (more detailed) LOD, so the difference will decrease again.Interesting with the 2 LOD10 meshes. I would have thought FS2K2 would just pick one if there is a conflict. I couldn't find a value that determines the original resolution of the mesh so far in the tmf format.Cheers, Christian

## Create an account

Register a new account

• Tom Allensworth,
Founder of AVSIM Online

• ### Hot Spots

• Flight Simulation's Premier Resource!

AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!