Sign in to follow this  
rhumbaflappy

Landclass Assistant & Small Areas

Recommended Posts

Hi everybody ... I've searched throughout the AVSIM Forums, but couldn't find the answer - does anybody know if there is a way to modify the landclass of a small area (such as an island) using Landclass Assistant? Thanks ...Jay

Share this post


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

Hi Jay,Yes it is.It it also very simple.It is all in the manual.//Anders

Share this post


Link to post
Share on other sites

Well I guess maybe I am a little dense in the head myself. Lets see shall we? I am looking to change the landclass on Midway Island. Both Sand and Eastern Islands.For example, I want to change one square on Eastern... would like to see the Palm trees with green texture south of the runway.I enter:N 28*12.17W:-177*19.84I come up with:X:183Y:249So I use the grid to find this square and change it to 033Here is my inf file:[Destination]LOD=5NorthLat=30.9375SouthLat=28.125WestLong=-180EastLong=-176.25DestDir=.DestBaseFileName=landclass[source]Type=ClassU8SourceDir=.SourceFile=landclass.rawLat=30.9375Lon=-180NumOfCellsPerLine=256NumOfLines=256CellXdimensionDeg=0.0147058CellYdimensionDeg=0.0110293I compile fine.... then I go into CFS2... yep I am using CFS2. and nothing has changed.Any ideas? I checked what was there by using tmfviewer and opening worldlc

Share this post


Link to post
Share on other sites

Also just tried with FS2002. Just to make sure that CFS2 was not missing any of the landclassTried adding 122 Perennial Ice and Snow to the landX: 184Y: 249Same coordinates... here is the INF:[Destination]LOD=5NorthLat=30.9375SouthLat=28.125WestLong=-180EastLong=-176.25DestDir=.DestBaseFileName=landclass[source]Type=ClassU8SourceDir=.SourceFile=landclass.rawLat=30.9375Lon=-180NumOfCellsPerLine=256NumOfLines=256CellXdimensionDeg=0.0147058CellYdimensionDeg=0.0110293

Share this post


Link to post
Share on other sites

Hi crashazOK, let's start with some questions1. In Landclass assistant did you press the button "Write Landclass.raw" ?2. After compiling did you check your landclass.bgl in tmfviewer? if not do it and look the result. Is all transparent (value = 254)3. Maybe a stupid question but anyhow... Did you add your new bgl to FS?//Anders

Share this post


Link to post
Share on other sites

Hi James.I'm sorry you're having problems with this Landclass.To accurately place landclass you must use a 257x257 array.Also, using my LandCalc program ( doesn't matter what version ), you'll get 183, 249 as the coordinates.If you create a 257x257 raw file with #254 as the background and #33 as the class value to change, it should be what you were looking for.Here's the INF:; Midway.inf; 257x257 source[Destination]DestDir = "."DestBaseFileName = "MidwayLC"UseSourceDimensions = 1[source]Type = ClassU8SourceDir ="."SourceFile = "Midway.raw"Lon = -180Lat = 30.9375NumOfCellsPerLine = 257NumOfLines = 257CellXdimensionDeg=0.0146484375CellYdimensionDeg=0.010986328125I made a batch file to process the mess with the old resample.exe, and it's support tools:@echo offresample Midway.inftmfcompress MidwayLC.tmf MidwayCLC.tmftmf2bgl MidwayCLC.tmf MidwayLC.bgldel "*.tmf"This is exactly why I tell people to use a 257x257 grid. A 256x256 grid will allow resample to 'resample' the grid, and who knows what it will come up with. A 257x257 grid passes right through resample untouched, so you know right where the landclass tile will land. Waterclass also needs the same array size of 257x257.I've had this conversation about the landclass array size several times before. This is a perfect example why Landclass Assistant and FSLandClass can give erroneous results.Dick

Share this post


Link to post
Share on other sites

Thanks Dick ...... for your explanation.I was just about to ask you (or all others) if the 257x257 rule also here. Thansk again.//Anders

Share this post


Link to post
Share on other sites

Many thanks Rhumba. I spent some time last night banging my head. Looks like I need to go landclass as an option. Photoreal I believe is going to be an FPS issue as well. AF=Midway is done except for this final piece. The scenery is Gmax Library BGLs and we are getting good frames until the Vals come in for the attack on Eastern Island. So I have had to find another place to save some frames somewhere else.I can talk Gregg into using less detail on the terrain (ie. minus taxiways and bunker (used FSSC polys) but may be able to give him trees from a library BGL for Leroy. That should keep him happy!LOL! Thanks once again and I will try this out tonight!

Share this post


Link to post
Share on other sites

crashaz:You know, I'm always available via email for questions....Short answer---Landclass Assistant only works with FS2002.... My docs state nothing in regards to CFS2, or FS2000 (other than the FS2000 SDK is required to compile the bgl's)....-JohnAuthor, Landclass Assistant

Share this post


Link to post
Share on other sites

Hi James.You might consider using VTP Method1 polygons instead of a landclass. The edges of the poly would not be blended unless you used a custom texture or two. But the polys could be quite 'irregular' so the edges weren't so straight, and you could use a default texture.If those polys are layer 4, they should lay down nicely on the ground, and be cutoff at the water. The default shoreline would cover the 'joint' between water and land... so the poly would have the appearance of landclass, but with any size/shape you like.Photoreal is the same as landclass... exactly. In fact it is a subset of Landclass, that uses only values # 254, #253 and #252, so only CUSTOM textures are used. It has no effect on frame rates. I fly with CUSTOM sets for my home area. It's 8 LOD8 sized areas, 6144 custom textures derived by Terrascene2.1! No effect on frame-rates in FS2002, and CFS2 is the same story... no effect.-------------------------------Your loss of framerates is the objects, and the effects of probably millions of polys that compose them. Gmax rendered polys are supposed to be kinder to frame-rates.The best solution would be GSL ( specific to CFS2 ). But, Martin Wright has a monopoly on the secret, and feels he can't divulge that info due to commercial obligations. Martin's GSL sceneries have hundreds of explodable objects, and no appreciable frame-rate loss!The only other solution, is to not use objects at all... except from within a mission. Within the mission, the objects behave as GSL explodable objects.Dick

Share this post


Link to post
Share on other sites

Dick...A 256x256 can and does work with the correct .inf file, as my program has proven (as evidenced by the files in the library today made with landclass assistant). If a texture does end up off, it is easy to update the .raw file accordingly. I feel your "257x257" comments give people the false impression that my program doesn't work--it does, and it will be even better at placing the textures in my next release. I've adjusted the internal math in LCA to match the .inf update I made in June. Why the delay in the release? Been ill...Crashaz has two issues--one, Landclass Assistant only works with FS2002. And two, crashaz never bothered to contact me for support. I could have examined both the .raw file and the .inf file, and determined where the issue lay.-John

Share this post


Link to post
Share on other sites

Landclass is the same for FS2000, CFS2, or FS2002. The only difference is the landclass value may not be the same or even represented in the 'lclookup.bgl'... but the world positioning is identical, and defined by resample. The same positioning is defined for Waterclass... for CFS2 and FS2002, as FS2000 has no Waterclass.Dick

Share this post


Link to post
Share on other sites

I edited this to say that we're really discussing apples vs. oranges. While there is commonality in many landclass values between the three sims, the features that resample exploits in FS2002 were not available in CFS2 or FS2000. They were added to FS2002 after some serious campaigning by others on this forum...-John

Share this post


Link to post
Share on other sites

I am not lying. 'worldlc.bgl' is present in FS2000, CFS2, and FS2002. It displays landclass in conjunction with 'lclookup.bgl' in each of those sims. Landclass is exactly how the default textures are displayed in all 3 sims... and the tool used to create those landclasses is the same...'resample.exe'., available with the FS2000 Scenery SDK.Mesh is also common to all 3 sims, as well as seasons ( though not implemented in CFS2 ). All produced by FS2000's resample.

Share this post


Link to post
Share on other sites

See my above (edited) post Dick... It was poorly worded, and I did not mean to imply you were lying.... But the feature of resample.exe that places landclass updates in 2k2 isn't exploited in CFS2 and FS2000. That's why they remained undocumented by MS until the release of the FS2002 Terrain SDK....

Share this post


Link to post
Share on other sites

Sorry John it was not my intent to infer that Landclass Assistant did not work. I have been looking at all options for getting Midway done. I am sorry I did not contact you first. Not too many people get the whole CFS2 modifying thing... we are gluttons for punishment. Besides you are an Arizonan are you not. ;^) Another good reason not to offend.In fact AF=Midway is an Arizona boy project. The main designer lives in North Phoenix. On the phone with him most every night.You can see one of the reviews here:http://www.sim-outhouse.com/?loc=reviews&page=AF1 I do think that the same landclass theories apply though for CFS2. I also have FSLandClass and was able to redo the landlclass for Oahu. It had issues with Midway as well. I would like to use Landclass Assistant though for redoing the city portions of the island... Honolulu needs to be more accurate.As for the VTP method... well I just dug out all my info and am looking at that right now. I can see some serious things we could do with it as far as laying out the atoll.

Share this post


Link to post
Share on other sites

Crash...My response was directed at Dick... My only concern with your post was the effort to adjust CFS2... I concede it is possible that the undocumented features added to FS2002 may have been present in CFS2. But they certainly aren't present in FS2000. Mesh and landclass are different animals. FS2000's resample.exe most likely contained the undocumented features because CFS2 and FS2002 were under development by the time the FS2000 Terrain SDK was released.I no longer run CFS2.... But assuming the islands are placed accurately and the same in FS2002 and CFS2, send me the .raw and .inf file for your Oahu project. I've written a utility that will adjust the .raw file in case textures are offset--and that can be an issue after my June .inf update, and is one corrected in my beta LCA release. I can also email you the beta lca release...If the textures are offset, we're talking +/- 1.5 km's at most. If your texture coverage is over a larger area, then there may be other issues preventing the LC from displaying...-JohnBTW, wonder if you're talking about Rick? I spent some time on the phone with him getting resample to work with .inf files under XP... I've supported many people professionaly and privately, and Rick was one of the best--and he really helped make LCA available to a wider range of users...

Share this post


Link to post
Share on other sites

I don't understand what features you believe are missing in FS200 and CFS2 regarding landclass. They both use it.

Share this post


Link to post
Share on other sites

Dick...I'm mad at you :)I keep hitting the dang edit key on your posts, instead of reply. My illness over the summer left my right hand a bit paralyzed... Now it even swears :)Although FS2000 uses landclass, the landclass bgl's compiled by resample.exe don't work with FS2000. I can take the Carson City bgl in the LCA tutorial and install it in both sims. It will only appear in FS2002... The same applies to photoreal scenery. While there are photoreal methods available to FS2000 vs. resample.exe, resample had undocumented methods which made photoreal much better in FS2002. These methods were almost dropped from FS2002. There were long discussions between the user community and MS regarding them.... You'd have to go back to some of the archived threads to see some of the issues which were raised.I do concede that CFS2 may support the features, but due to my June .inf update, the "old" lca does offset the textures by 1-2 kms. Not a good thing for little 'ol midway. That's why I've offered the lca beta to Crash.You are more than welcome to email me to try out the beta as well.... I'd like to hear your thoughts, especially in regards to the search/replace features...-john

Share this post


Link to post
Share on other sites

Yeah I checked the coordinates in both CFS2 and FS2002 last night. Spot on. They both put me in the same place on Eastern Island just south of the main runway. So we should not have any problems there.Glad to hear you are recovering. I have been a big fan of your work with the Phoenix scenery. I will be doing some custom buildings for Phoenix in the future like the Westward Ho, BOB, Bank One tower, Sun Devil Stadium and Veterans Memorial Colliseum.Hmm might even put in Tempe Town Lake...LOL!I grew up on Ed's Field.. EDS just south of Eloy. Really would like to put an Arizona scenery package together.The guy I work with is Gregg Bond. He is not too savvy with the scenery but has touched about every other part of the AF=Midway project. Some fantastic work. Nothing can immerse like scenery though... that is why I'm trying to get this clean.

Share this post


Link to post
Share on other sites

Hi John.As you can tell, I am adamant about a 257x257 source file. If a 257x257 source is used, there is no need for any adjustments. The placement is exact. I re-installed FS2000 to check landclass there, and what you say is true...our landclasses do not behave right. I actually saw the right texture 'pop' on the screen for the midway area, but then disappeared into the ocean. Midway itself is a FS98 style photoreal polygon, but the texture showed briefly at it's edge. :(But CFS2 is another story, as you can see from the above jpeg. And I'm not kidding when I say that the 257x257 array will pass through resample untouched. The original array can be extracted from an uncompressed TMF with a hex editor, and redisplayed in a paint program, matching the original exactly. That cannot be done with any other array size, as resample will alter the original content and size. And that's why you would need an adjustment. If you adopt a 257x257 array, you will need no adjustment.Dick

Share this post


Link to post
Share on other sites

Let me propose this question then....Let's assume I switch to a 257x257 .raw file.... What formula should I use in LCA to feed back the cell values to the user (based on lat/lon?). Even with a 257x257 grid, a formula is required to report back the right vertices to the end user. -J

Share this post


Link to post
Share on other sites

If a 3x3 array of verticies existed, the central vertex ( point(2) ) is positioned as ( point(1) + ( span / 2 )), so as you can see, the span is 256x256 and that's reflected in my INF file. The verticies are always 1 more than the span, as they must enclose the cells. point(257) = ( point(1) + (( span / 256 ) * 256 )) or point(257) = ( point(1) - (( span / 256 ) * 256 )) if point(1) = N42.1875 and we want the southernmost point...( 42.1875 - ((2.8125 / 256 ) * 256 )) = 39.375 for the southern point... which is also the southern bounds.---------------------------point(256) = ( point(1) - (( span / 256 ) * 255 )) ( 42.1875 - ((2.8125 / 256 ) * 255 )) = 39.385986328125 for point 256...Now this gives the vertex assignment. What about the cell? There is no cell. That's the issue. There is a groundtile, generated at runtime, and in FS2002, that groundtile is a blend of the four surrounding verticies. The vertex itself will be the landclass you desire, but midspan, it is a combination of the 4 surrounding assignments.At the edges of the LOD5 area, the BGL cannot blend into the default tiles, and that's what leaves a hard edge ( eliminated if you enclose the entire landclass by transparent values in rows 0 and 257 and columns 0 and 257 ).

Share this post


Link to post
Share on other sites

Here's an odd question then...If you have a row 0 and a row 257, wouldn't that make the ideal .raw file size 258x258? I could code LCA to build a 258x258 .raw file, but only allow access to a 256x256 group of vertices, thus avoiding the "Edge" problem. I see what you're saying...given an example like this:x x x x x xx x x x x xx x x x x xx x x x x xx x x x x xx x x x x xIf this were a "pretend" 6x6 .raw file, the vertices that "make the most sense" should be the inner four. Entering a byte value in location 1,1 would in essence be telling resample to place that byte value in vertice 0,0, giving the "hard edge" result we've both seen.Even with the 256x256 .raw file, placing a value either in the first row/col, or the last, will result in a hard edge. Those results are consistent every time. And the blending still takes place as well.What it comes down to is no matter what type of .raw file you use, you can only get texture placement to within +/- .75 km from where you want it. Whether one calls it a vertice or a cell, texture placement is subject to the blending that FS does on the fly.... It's pretty easy for me to adjust LCA to work with a 257x257 .raw file, but I'm beginning to wonder whether the 258x258 setup would make more sense....

Share this post


Link to post
Share on other sites

2 pics to illustrate the vertex assignment of resample. This is from a 257x257 array for a source.The small pic showing Landcalc2 to derive the vertex point, and a screenshot with a cellgrid bgl activated, to display the LOD13 Areas. The vertex shows quite clearly, blending into the surrounding 4 areas.INF:; Sahara.inf; 257x257 source[Destination]DestDir = "."DestBaseFileName = "Sahara"UseSourceDimensions = 1[source]Type = ClassU8SourceDir ="."SourceFile = "Sahara.raw"Lon = 22.5Lat = 25.3125NumOfCellsPerLine = 257NumOfLines = 257CellXdimensionDeg=0.0146484375CellYdimensionDeg=0.010986328125A 256x256 source will usually look the same. Why? because the LOD13 Areas are filled in latitudinal bands... row 0 is displayed first, starting at the 0 column and ending with the 255 column. Then row 2....If the point is 190,188 it will get displayed there, unless your math is off, or resample decides to move it! resample never moves anything with a 257x257 source. Look with a hex editor. The values of a 257x257 array are unchanged in the uncompressed TMF file... in a 256x256 based TMF, the values may change. And that's why you're going to need an 'adjust' factor of 1 Km with 256x256... because resasmple is deciding the placement, not you.

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