Jump to content
Sign in to follow this  
rhumbaflappy

Land and water.... again!

Recommended Posts

Guest gorchi

Hello guys,I have been looking in posts for this problem but I still can't resolve the problem. Using LWMDraw3 I made a complete "redecoration" of short Slovenian coast and I was hoping LandClass will fill up missing polys with land. Unfortunatelly not so I would like to ask You for help. I am attaching the picture with these sea pockets which should be filled with land.Thanks in advance!Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Hi Goran.Your land masking looks like it's not there.Are those shorelines?Ken's program gives you a choice for shorelines or LWM... and the LWM's have a choice of land or water mask. Each must be made separately.As usual, a picture helps, but it's the code that has the problem. So unless you just want guesses, attach the code.Dick

Share this post


Link to post
Share on other sites
Guest gorchi

Hi Rhumba!Yes, those are shorelines. I made only water with Ken's program, so I believe that The rest of those LWM polygons should be land, right?I am attaching the code for LWM only (Shorelines doesn't metter here, right?) and please, can You look at it to show me, what should I do for each of those quadrants to make land, where it is not right now.Oh And one more question though. How can I merge code for Shorelines and LWM togethor so I can get only one BGL? I know how to overcome 2 LOD8 problem but this kind of merge is a little bit trickier...Many thanks in advance!Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Hi Goran.I'll look at the code.First, you cannot combine LWM and VTP in the same BGL ( at least I know of no successful examples ). This just means 2 small BGLs instead of 1.Second, LWMs can define not only water, but land, and invisible flattens as well.When I make an LWM project, I'm in the habit of masking all the areas to landclass first, then masking the water. I think I can add this code to your example, But you have attached the VTP code... not the LWM, and I need the LWM code.( Note: AVSIM is changing over to a new system this week! So it is possible ,amy attachments may be lost in the shuffle... I'll save your example in case something gets misplaced. )One problem exists when you mask for landclass... but the landclass is water! That's what happens in coastal areas. I used to think there was no landclass there at all, but the entire world is classed by worldlc.bgl... and most of the world is value 100, which is water. So in some cases we need to supply a new, small landclass to extend land ground textures into the ocean.Dick

Share this post


Link to post
Share on other sites
Guest gorchi

Hi Rhumba!I apologize that I uploaded the wrong file. I have so many files for this 40km of coast... Anyway, here is the correct file, this time for the whole 40km of coast.Like You I have noticed that water landclass can have influence on cities which are tied to coast. So I had to make a small landclass file and I did, like You said, extend city a little bit in the sea. What was a little bit confusing to me is that not all landclass values have autogen as it is written in NLCD table (Orlando Sotomayor's table). I have values of 115, 107, 106,105, 102 (this one is the only I get autogen!), etc. Strange; I really want to have there as much as posssible of autogen. And I put landclass file in FS2002Scenery subfolder; I think this is the correct place?Many thanks again and sorry for my mistake. Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Hi Goran.I hope to be able to play with the code today.As far as where to place the BGLs?If there are no custom textures needed, you should be able to place them all together in a folder structure like this:C:Program FilesMicrosoft GamesFS2002GoranAddonsSloveniaCoastsScenery..>SloveniaLWM.bgl..>SloveniaVTP.bgl..>SloveniaLandClass.bglbut NO Texture folder. If you are going to have textures ( and need a texture folder ) then add the landclass to:C:Program FilesMicrosoft GamesFS2002GoranAddonsLandClassScenery..>SloveniaLandClass.bglI think this is the best way, as it keeps the landclass away from TEXTURE folders, and it also keeps the datastream correct, as far as worldlc.bgl is concerned. In fact, I keep all my landclass files in a folder like this:C:Program FilesMicrosoft GamesLandClassUSScenery...>usgl_lc.bglC:Program FilesMicrosoft GamesLandClassEuropeScenery...>suisselc.bgl...>itlalialc.bglwith NO texture folder. This way I can add them separately to the Scenery Library, and control the datastream.I hope that is clear. With landclass, the order of use ( datastream ) controls which landclass will override which underlying landclass. The only problem we have is the pesky "texture" subfolders that cannot reside with landclass.If you still want to add landclass to the main Scenery folder ( alongside "worldlc.bgl" and "worldwc.bgl", then rename your landclass as "zzzSloveniaLandClass.bgl". The preface of 'zzz' assures that it will get loaded to the datastream after "worldlc.bgl".Perhaps that naming precaution is not needed, but it does no harm.Dick

Share this post


Link to post
Share on other sites

Hi Goran.I think I've got it.As I said, I like to fill an LOD13 Area with land first, then mask the water.There's an easy way to do this with a search and replace function of a text processor:Search--->LWMDataAreaDrawPolygons 1, 3,Replace--->LWMDataAreaDrawPolygons 1, 1,This will change everything like:LWMDataAreaDrawPolygons 1, 3, 1, 31, 16to:LWMDataAreaDrawPolygons 1, 1, 1, 31, 16The SDK states that second parameter should be 3 ( transparent ), but by changing it to 1, I fill the Area with land.Then...LWMPoly2 20, 0, 0, 0, 0...now draws a poly with water!So...LWMDataAreaDrawPolygons 1, 3, 1, 31, 16LWMPoly2 20, 0, 0, 0, 0LWMPoint 249, 0LWMPoint 230, 9LWMPoint 214, 24LWMPoint 207, 25.................will first landfill then carve a water mask.One problem with this. If you redraw into that Area, you need to change the next instances back to:LWMDataAreaDrawPolygons 1, 3, 1, 31, 16...because you don't want land to cover up the watermask you've already made.Your code reentered 'Kvadrant 30.16' 2 times, and reentered 'Kvadrant 30.15' once...so I changed the code back for those extra instances.=========================Areas:11,13....9,14....10,14....11,14needed landfilling of the default masking, so I added some code like:;----> Kvadrant 11.13;----> LandFillingLWMDataAreaDrawPolygons 1, 1, 1, 11, 13LWMPoly2 04, 0, 1, -9999, 0LWMPoint 0, 0LWMPoint 255, 0LWMPoint 255, 255LWMPoint 0, 255...that just draws a land polygon over the whole LOD13 Area. In this code:LWMPoly2 04, 0, 1, -9999, 0The 1 in parameter #3 is land, and the -9999 means we won't flatten.==========================Areas:8,13....8,11...need landclass, as you probably know.==========================I'm attaching the code for the LWM, and I hope everything is fixed alright.I noticed in your VTP code 3 things:-------------------------VTPWidePointWidth 20... might better be:VTPWidePointWidth 64... as that matches the default width of the beaches.--------------------------You can make VTP layers overwrite in the LOD13 Areas they cross by changing:VTPLayer 8, 0to this:VTPLayer 8, 1-------------------------In areas you want to 'exclude' a layer that isn't replaced as above, you can use this for each LOD13 Area in which you wish to remove a layer:VTPDataArea 1, 0, 18, 0VTPLayer 8, 1VTPNumTexturesInLayer 0, 0VTPDataArea 1, 0, 18, 1VTPLayer 8, 1VTPNumTexturesInLayer 0, 0 In the above example, Areas 18,0 and 18,1 'replace' layer 8, but with '0' textures in the layer. As there are no textures, we don't need to declare them... or even draw the poly! Christian Fumey discovered this very useful code.Dick

Share this post


Link to post
Share on other sites
Guest

If I understand your text above correctly, this[en]So...LWMDataAreaDrawPolygons 1, 3, 1, 31, 16LWMPoly2 20, 0, 0, 0, 0LWMPoint 249, 0LWMPoint 230, 9LWMPoint 214, 24LWMPoint 207, 25.................will first landfill then carve a water mask.[/en]is a typo and should readSo...LWMDataAreaDrawPolygons 1, 1, 1, 31, 16LWMPoly2 20, 0, 0, 0, 0LWMPoint 249, 0LWMPoint 230, 9LWMPoint 214, 24LWMPoint 207, 25.................will first landfill then carve a water mask.Thanks once again for your excellent explanations, Dick! This one will simplify my own project quite a bit. I suppose I can include the data for each single lod13 area within the data area in one single file and thus make only one bgl-file that will add land and then carve out the water polys for all my areas.BamceEFHN

Share this post


Link to post
Share on other sites

Hi Bamce.Thanks! That was a typo error.The attachment is correct. I like Goran's sytle of organising his LWM code.. it was very easy to read.Dick

Share this post


Link to post
Share on other sites
Guest gorchi

Hi Rhumba, hi Bamce!Thank You for Your replies, I will check it out right now. Meanwhile I was also looking into tutorials I've got from internet and I have found in Rhumba's LWM tutorial how to make land and water so I made land from the other side (used almost all points from waterpoly). Anyway I think Rhumba's idea is great so I will try that way! Many many thanks again.Oh btw... Rhumbaflappy, do You remember the topic ID where You made something like a mountain with/without water and using LWMPolys? I think I will need it since our coast has some cliffs there and cities are also on some ridges there...Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Hi Goran.Use AVSIM's search funtion:remeshfor topics over the last year.Basically, I make small 2 point transparent LWM polys ( lines actually ). They raise the land like tent-poles, but the underlying flattens are stubborn, so it takes MANY polys.Dick

Share this post


Link to post
Share on other sites
Guest gorchi

Hi Rhumba!Thanks, will search for it. And regarding Your idea of landfilling... What a great idea that makes code much shorter! Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites
Guest gorchi

Rhumba,I just struck to one problem and it is regarding drawing more than one time in the same area. You mentined that I use quadrant 30.16twice, one 3 times... I tried it Your way but it seems that FS (according to TMFViewer) do not like it. I wrote this:

LWMDataAreaDrawPolygons 1, 1, 1, 30, 16LWMPoly2  03, 0, 0, 0, 0LWMPoint 255, 12LWMPoint 243, 0LWMPoint 255, 0LWMDataAreaDrawPolygons 1, 3, 1, 30, 16LWMPoly2  26, 0, 0, 0, 0LWMPoint 79, 0LWMPoint 61, 30LWMPoint 58, 38...

But the area gets filled with land again?! I tried also another way:

LWMDataAreaDrawPolygons 2, 1, 1, 30, 16LWMPoly2  03, 0, 0, 0, 0LWMPoint 255, 12LWMPoint 243, 0LWMPoint 255, 0LWMPoly2  26, 0, 0, 0, 0LWMPoint 79, 0LWMPoint 61, 30LWMPoint 58, 38...

Same here... So I guess in this quadrant I should make land just like I did water except that parameter 3 in LWMPoly2 is changed to 1. :-( Fortunately, this is not hard for me to do it by hand :)Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites
Guest gorchi

Hello again!My apologize, the second way it works great. I just missed on pice of sea, which was further bellow in my code. It works okay!Regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Hi Goran.The attached text file will work... I'm not sure where there is a problem.. here's a picture from TMF viewer ( I loaded worldlc.bgl, then I loaded your BGL).The black is landmask, the blue is watermask:

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