Jump to content
Sign in to follow this  
Guest Srgtroy

FSX Terrain Texture Placement Method?

Recommended Posts

Guest Srgtroy

I've read the Terrain SDK and I think I pretty much understand most of it. However, there is one issue that still perplexes me. How do all the textures fit together so seamlessly? Are they all tilable? Even between differnt landclass categories? How can FSX be sure that if it places a texture in one 1.2km square according to the various characterstics of that square (landclass, region, season, etc), and then places textures in the surrounding 1.2km squares according to their characterstics -- that they will all seamlessly fit together? What is FSX's basic method of operation for making sure that all the patchwork of textures fit together seamlessly no matter how great the variation in characterstics?Thanks,UPDATE: After some research, I believe what I am trying to understand is the whole issue of texture blending or blending masks. Can someone explain how that process works or point me to an explanation. That would be great. Thanks!

Share this post


Link to post
Share on other sites

Hi there,well, you've asked for it ;-)Indeed, blending happens with the help of the *m1*.bmp files in SceneryWorldtexture and their use is regulated by lclookup.bgl. Unfortunately, the FSX developers didn't get around to providing a complete set of custom M-tiles for their new FSX ground textures. Instead, the FS9 equivalents (at 4.8m resolution) are used, which explains why you often see texture content, like building footprints or fields, cut in half. Moreover, the code in lclookup.bgl is fixed meaning you can replace existing M-tiles with your own versions but not add new M-tiles for those texture variants for which they are missing, like all the 15- and 16-variant sets. Anyway, here's what I know about how M-tile blending works in FSX, with additional information provided by ACES, Joachim Buhre, Allen Kriesman, and Matthew Tomkins. Hope the screenshots help to explain the jargon; they were taken directly in FSX with the help of special ground textures and M-tiles I made for my experiments.Key points: * land class files use QMID15/LOD13 raster grid nodes (vertices) as reference locations* at each node, FSX places a ground texture tile in the four adjacent QMID15 raster cells, i.e., a 2x2 set of tiles centered on the node. http://www.hsandmann.com/FSX/MTiles/M-tile...sic_2x2_set.gif* given that each QMID15 grid node has an associated land class value, each QMID15 raster cell ends up with four "layers" of ground texture tiles; this creates the required spatial overlap for blending * which of the layers are used for blending (via the M-tiles) depends on their draw priority value; higher numbers mean higher draw priority. The draw priority values for each unique texture set are defined in the lclookup.bgl. Generally, urban trumps agricultural trumps vegetation/bare.* if the four layers of a QMID15 raster cell contain two different classes then FSX uses the M-tile of the class with the higher draw priority:http://www.hsandmann.com/FSX/MTiles/M-tile..._priorities.gif* if the four layers of a QMID15 raster cell contain three different classes then FSX uses the M-tiles of the two classes with the highest draw priorities together (!); in areas of overlap of the retained part of a texture the M-tile with the higher draw priority is dominant:http://www.hsandmann.com/FSX/MTiles/M-tile...masks_zoom2.gif* if the four layers of a QMID15 raster cell contain four different classes then FSX uses the M-tiles of the three classes with the highest draw priorities together (!); in areas of overlap of the retained part of a texture the M-tile with the higher draw priority is dominant:http://www.hsandmann.com/FSX/MTiles/M-tile...-masks_zoom.gif* if the four layers of a QMID15 raster cell are of the same land class then no blending occurs* if different classes with the same draw priority are blended then the M-tiles of the class to the south or east (relative to the other class) will be dominant along its north and west edges, with the M-tiles of the other class being dominant along the south and east edges:http://www.hsandmann.com/FSX/MTiles/M-tile...es_if_equal.gif* M-tiles contain eight sub-panels. Which one gets used is determined by the presence and location of textures of the same class in the neighboring cells. Sub-panels 1 or 2 (counted from the top down) are used if the same class touches one of the corners, sub-panels 3 or 4 are used if the class occupies an edge of a block of cells of the same class, and sub-panels 5, 6, 7, or 8 are used if the class occupies a corner of a block of cells of the same class. * M-tiles are different from Alpha blending masks in that some of the black and white areas in the eight sub-panels can be either transparent or opaque, depending on where the M-tile is used. While the top two sub-panels always retain (show) the white areas, and the bottom four sub-panels always retain the black areas, the third and fourth sub-panel retain either black or white areas depending on adjacency; if the same-class neighbors are to the north or west then black is retained and if the same-class neighbors are to the south or east then white is retained. Cheers, Holger

Share this post


Link to post
Share on other sites
Guest Srgtroy

Wow. What a wild system. So basically, lclookup.bgl contains all these blending rules. Your level of knowledge is truly impressive. I tremble in your virtual presence...

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • 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!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...