Sign in to follow this  
Guest GerrishGray

Photo, Mesh and LandClass Sceneries and Sampling

Recommended Posts

Hi,This an old discussed topic but there are few points that I would like to revise.The TMF Resampler programme, made available by Microsoft, can be used to create:- mesh scenery ( TYPE = ElevS16LSB )- photo scenery ( TYPE = Custom )- landclass scenery ( TYPE = ClassU8 )In all these 3 cases a BGL file is generated covering a region that we specify in the destination section of the INF control file. This region can not be smaller than a certain size. For mesh and landclass sceneries, this minimum size corresponds to 257 x 257 elevation points or 257 x 257 class_indexes. The elevation points and the class_indexes are the vertexes of LOD squares. In the Landclass case the class_indexes are the vertexes of LOD 13 squares (or Areas). Therefore the smallest region that we can have in Landclass scenery is a LOD 5 region.In the case of the elevations points it depends on the LOD. For example for a LOD 10 mesh, the elevation points are vertexes of LOD 18 squares. In this LOD table:http://www.ptsim.com/downloads/sdk_lod.htmthere is no LOD 18 entry. But it easy to see that for a LOD 18 the Span in Meters would be 38,15 in the N/S direction and 50,87 in the W/E direction. We conclude that the minimum mesh region that we can generate at LOD = 10 is, precisely, a LOD 10 square (9,8 Km by 13 km) with elevation points at the vertexes of LOD 18 squares (38,2 m by 50,9 m). For a mesh (at LOD = 10 resolution) covering (spanning) 2 x 2 LOD 10 squares, we need 513 x 513 points. We can realize this mesh with 4 BGLs each covering a LOD 10 square and having 257 x 257 elevation points. Or we can realize it with a single BGL with 513 x 513 elevation points covering the same 4 LoD 10 squares. The 2 situations will produce the same result if Point 257 on the left (upper) square is identical to Point 1 on the right (lower) square. This will be more clear with the discussion at the end of this post for landclass scenery.We saw that a landclass BGL spans a whole LOD 5 square (312 km by 418 km - so not really a square!). If we want to work a smaller area we use index = 254 (which is transparent) in the regions that we do not want to change. Consider this example:http://www.ptsim.com/downloads/lod_0.gifThe big white squares are LOD 13 Areas. These Areas have small squares at the vertexes. In the figure we see 20 vertexes. For each of the vertexes we define a landclass index. We have 12 white (say white means index = 254 or transparent) vertexes and 8 colored vertexes. Since a vertex affects 4 squares we could expect a final result like this:http://www.ptsim.com/downloads/lod_1.gifBut the final result that FS shows is much better. Firstly a square is displayed only if all their 4 corners have significant landclass indexes (different from 254). Secondly FS mixes the 4 textures that corresponds to the 4 landclasses and blends them in a manner simillar to what is shown in the following figure:http://www.ptsim.com/downloads/lod_2.gifThere is an exception to the previous rule. The exception is index 253 (or 252). By using index 253 we can make a BGL to show photo scenery. We need to create separately the custom bitmaps with the Resample programme. These bitmaps are generated as slices of a bigger photo bitmap. Each slice has 256 x 256 pixels and has a unique name that refer to a unique LOD 13 square (example: 010232222222211Su.bmp). We were saying that index 253 had a different behaviour. In order to explain this behaviour consider the previous landclass indexes except for the 3th row 4th column where the black small square means 253:http://www.ptsim.com/downloads/lod_3.gifThe difference is that all the 4 Areas affected by this vertex will be "custom" areas" independently of the other corner indexes. FS will show something like this (gray = photo tile):http://www.ptsim.com/downloads/lod_4.gifI now consider the case of a landclass project that spans 4 LOD 5 squares. An example is to define the landclass in 4 Areas around N45:00:00 W45:00:00. We need to define 9 vertexes as shown in this figure:http://www.ptsim.com/downloads/lod_5.gifIf we make a single BGL with 513 x 513 indexes, the center greenish vertex, exactly at N45 W45, is Vertex(257 257). But if we make 4 BGLs for each of the LOD 5 squares, this same vertex is Vertex(257 257) for the LOD5_35_15 BGL as in:http://www.ptsim.com/downloads/lod_6.gifand it is Vertex(1 257) for the LOD5_35_15 BGL, Vertex(257 1) for the LOD5_35_16 BGL and Vertex(1 1) for the LOD5_36_16 BGL. In all the 4 raw files for the 4 BGLs the green node should have the same value. If it has not we will loose the blending match that FS does very well.I am sorry for this long post and I hope that it does not contain errors.Kind Regards, Luis

Share this post


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

An excellent and well-written tutorial, Luis! Can I suggest that you publish it as a document in the file libraries, where it will remain permanently accessible to a wider range of readers than are likely to find it here over the course of time.ThanksGerrish

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this