Jump to content
Sign in to follow this  
Guest cwright

Landclass question

Recommended Posts

Guest cwright

Hello everyone, before I go too far, I want to check that my understanding of this problem is correct. As I understand it, if you create a new area of landclass, you have to provide data for the entire LOD5 square. If you don't, then the part of the LOD5 square not covered by the new scenery will be covered by water. The solution would be:1. In the inf file, define your area to cover the entire LOD5 square.2. Fill in your new landclass where required.3. Fill the rest of the LOD5 square with 254 (transparent). Step 3 ensures that default landclass not covered by the new scenery is not affected. This certainly works, but it's very 'fiddly', particularly if you're creating multiple landclass areas that cover many LOD5 squares. So my question is this: is this what everyone else does when creating landclass, or is there a better way? Many thanks. Best regards, Chris

Share this post


Link to post
Share on other sites

Hi Chris.You can make seamless landclasses of any size using a MultiSource INF, and a "dummy" world source that contains only value 254:

; 722x308.inf; 722x308 source with odd degree span[Source]Type = MultiSourceNumberOfSources = 2[Source1]Type = ClassU8SourceDir ="."SourceFile = "722x308.raw"Lon = -90.466Lat = 45.845NumOfCellsPerLine = 722NumOfLines = 308CellXdimensionDeg = 0.010540802213001383125864453665284CellYdimensionDeg = 0.010181229773462783171521035598706; CellXdimensionDeg = (7.621 / ( 722 + 1 )); CellYdimensionDeg = (3.146 / ( 308 + 1 ))[Source2]Type = ClassU8SourceDir ="."SourceFile = "transparent.raw"Lon = -180.0000Lat = 90.0000NumOfCellsPerLine = 100NumOfLines = 100CellXdimensionDeg = 3.636363636363636363636363636CellYdimensionDeg = 1.818181818181818181818181818[Destination]DestDir = "."DestBaseFileName = "722x308"UseSourceDimensions = 1

"transparent.raw" is a 100 x 100 file containing only value 254. "722x308.raw" is a source containing my landclass changes. You need to know the NW and SE corner lat-long. It can be of ANY resolution ( if you don't mind resample sorting it out )... otherwise it must be 1 pixel per LOD13 area ( about 1 kilometer ).Dick

Share this post


Link to post
Share on other sites
Guest luissa

Hello Chris,Your description seems OK and I do not know of any alternative. The only thing that I am not sure is:> ... If you>don't, then the part of the LOD5 square not covered by the new>scenery will be covered by water.the reason being that the raw can not have "empty places".Kind Regards, Luis

Share this post


Link to post
Share on other sites

Hi all,Nothing new to add other than that I suggest to have a look at how Jim Keir handles landclass creation with Slartibartfast; it's also well explained in the manual. Slarti creates a basic elevation-dependent land- and waterclass file (based on the input elevation data) and the special "tweaks" of interest are (1) each LOD5 tile is set up as a EZ-Landclass project for easy post-processing (though a multi-LOD5 project area can also be compiled as one LC/WC file); (2) several different classes can be assigned per elevation band according to a weighted random selection; and (3) this is important: the edges of the project area can be "feathered" (with the non-defined tiles set to 254) to allow for blending with the underlying default land-/waterclass file.In general, I believe that waterclass files are highly underutilized! They can make a dramatic difference for near-shore and inland water bodies and are particularly easy to set up as local files because there's only one water texture file for each class (whereas there are dozens for most LC classes). Cheers, Holger

Share this post


Link to post
Share on other sites
Guest cwright

Hi Dick, many thanks for that, it soulds like a very elegant solution. I'll try it shortly. Just one question: as I understand it, this method effectively covers the entire world with 254 landclass. I assume you use this technique for all scenery areas that you add, which would create a whole collection of bgls, all of which cover the world with 254. There wouldn't be any conflict or performance problems caused by this? Many thanks. Best regards, Chris

Share this post


Link to post
Share on other sites
Guest cwright

Hi Luis, I was actually speaking from experience. With previous experiments, and before I knew about the LOD5 limitation, I had noticed that when surrounding default scenery was wiped out by my landclass area it was always covered by water which is, of course, landclass zero. Strangely enough, I repeated a similar experiment today. As always, the surrounding default landclass was wiped out - but it wasn't water. It was actually grey, possibly the effect of an invalid landclass number. It suggests that the landclas that has been wiped out usually defaults to zero, but not always. Best regards, Chris

Share this post


Link to post
Share on other sites
Guest cwright

Hello Holger, I must take a look at Slartibartfast - it sounds like a very interesting program. It's also a matter of great minds thinking alike. Several years ago I jokingly suggested to my brother that I should call my program Slartibartfast (those who have seen the Hitchiker's Guide to the Galaxy will understand the connection). Of course, I ended up with the much more boring name of AutoAsm! Best regards, Chris

Share this post


Link to post
Share on other sites

Hi Chris.First, the display of the original code didn't show up as I thought it would:; ==========================================; 722x308.inf; 722x308 source with odd degree span[source]Type = MultiSourceNumberOfSources = 2[source1]Type = ClassU8SourceDir ="."SourceFile = "722x308.raw"Lon = -90.466Lat = 45.845NumOfCellsPerLine = 722NumOfLines = 308CellXdimensionDeg = 0.010540802213001383125864453665284CellYdimensionDeg = 0.010181229773462783171521035598706; CellXdimensionDeg = (7.621 / ( 722 + 1 )); CellYdimensionDeg = (3.146 / ( 308 + 1 ))[source2]Type = ClassU8SourceDir ="."SourceFile = "transparent.raw"Lon = -180.0000Lat = 90.0000NumOfCellsPerLine = 100NumOfLines = 100CellXdimensionDeg = 3.636363636363636363636363636CellYdimensionDeg = 1.818181818181818181818181818[Destination]DestDir = "."DestBaseFileName = "722x308"UseSourceDimensions = 1; =======================================The file will cover the world, and all areas of the world are ignored except the ones with data. You can trim the Destination bounds to LOD5 areas if needed. Note that more than one LOD5 area can be defined by the bounds.Dick

Share this post


Link to post
Share on other sites

Hi Chris,that's interesting! Well, I guess there aren't that many famous (alien) fjordmakers around.Actually, Jim first called his utility "Strip" and it took a bit to convince him to take on the, admittedly more difficult, but much more appropriate name ;-)Cheers, Holger

Share this post


Link to post
Share on other sites
Guest cwright

Hi Dick, I came back to report that it didn't work - and you already have the solution! This worked. It looked as if the LH edge of the scenery square merged with the default landclass ok, but there was a strip of water at the top. I'll need to look at the results more closely tomorrow. But I did notice a worrying feature. First, resample took almost 3 minutes to compile, when it would normally be about a second (creating landclass only, not terrain). Also the file size (tmf and bgl) is increased by almost 2 megabytes! This is presumably the 254 landclass that covers the whole world. Does it have to cover the entire world? And does every new landclass bgl have to have this? If so, then it's a major drawback! Many thanks. Best regards, Chris

Share this post


Link to post
Share on other sites

Hi Chris.I indicated the Destination Bounds can be specified... that will trim the excess world data. Those Destination bounds need to be slightly larger than the LOD5 extents that are touched by the source data:; ==========================================; 722x308.inf; 722x308 source with odd degree span[source]Type = MultiSourceNumberOfSources = 2[source1]Type = ClassU8SourceDir ="."SourceFile = "722x308.raw"Lon = -90.466Lat = 45.845NumOfCellsPerLine = 722NumOfLines = 308CellXdimensionDeg = 0.010540802213001383125864453665284CellYdimensionDeg = 0.010181229773462783171521035598706; CellXdimensionDeg = (7.621 / ( 722 + 1 )); CellYdimensionDeg = (3.146 / ( 308 + 1 ))[source2]Type = ClassU8SourceDir ="."SourceFile = "transparent.raw"Lon = -180.0000Lat = 90.0000NumOfCellsPerLine = 100NumOfLines = 100CellXdimensionDeg = 3.636363636363636363636363636CellYdimensionDeg = 1.818181818181818181818181818[Destination]DestDir = "."DestBaseFileName = "MultiTestLC"UseSourceDimensions = 0; These are the actual multiples of LOD5 limits used; NorthLat = 47.8125; SouthLat = 42.1875; EastLong = -82.5; WestLong = -93.75; These are what we'll use to "add a pinch"NorthLat = 48SouthLat = 42EastLong = -82WestLong = -94; =======================================This makes a neat BGL that is trimmed to include only what's needed.http://forums.avsim.net/user_files/90446.jpgDick

Share this post


Link to post
Share on other sites
Guest cwright

Hello Dick, (or should I say, Hi Dick!) that sounds great. I'll give it a try a bit later. Many thanks. Best regards, Chris

Share this post


Link to post
Share on other sites
Guest cwright

Hi Dick, it works very nicely. I've written some code to calculate the bounds and that's working (I add an extra degree around the edge for safety). I tried butting two landclass areas together and that worked fine. Many thanks. But there is one small problemette (isn't there always?) There are usually a small number of water squares just outside the new landclass area. Usually there is between one and a dozen squares. The square size is one landclass 'pixel' (1.3 minutes of arc). The squares don't show in tmfviewer. The example inf file below (a one degree square) has a spurious water square just above the top RH corner. Best regards, Chris**********************************************[source]Type = MultisourceNumberOfSources = 2[source1]Type=ClassU8SourceDir = "c:autoasmterrainlandclass"SourceFile = "textures.raw"Lon = -91Lat = 42NumOfCellsPerLine = 512NumOfLines = 512CellXdimensionDeg = 0.0019493177387CellYdimensionDeg = 0.0019493177387ScaleinMeters = 1.0[source2]Type = ClassU8SourceDir = "c:autoasmterrainlandclass"SourceFile = "transparent.raw"Lon = -180.0000Lat = 90.000NumOfCellsPerLine= 100NumOfLines = 100CellXdimensionDeg = 3.636363636363636363636363636CellYdimensionDeg = 1.818181818181818181818181818[Destination]DestDir ="c:autoasmterrainlandclass"DestBaseFileName = "textures"UseSourceDimensions = 0NorthLat = 43.1875SouthLat = 38.375EastLong = -89WestLong = -94.75

Share this post


Link to post
Share on other sites

Hi Chris.What version of resample are you using? I use the FS2000 version for my landclass.I made a value #13 block of landclass using your INF, and it compiles and views fine in FS2004... no extra pixels.Make sure all the bitmaps ( raw files ) are 256 color 8-bit... I use a greyscale in PaintShop Pro 7.Dick

Share this post


Link to post
Share on other sites
Guest cwright

Hi Dick, problem solved! It was actually - ahem - my fault. I tried the same bgl on my old computer and it worked fine. But then I noticed something rather surprising. A large river system enters the square near the top RH corner - just where the water square appeared. But on the main computer there was no sign of the river! I quickly realised why. Earlier this year I had temporarily disabled the NAME area in scenery.cfg. It was now enabled - but the adjacent area, NAMC, was disabled. At some stage I must have disabled it by mistake. Of course, out of all the areas in the world the test area had to be in this one! Most likely the water squares appeared where there should have been a body of water. This method is working nicely. It'll be incorporated in the next release of AutoAsm. Once again, many thanks for the help. Best regards, Chris

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...