Sign in to follow this  
Guest cwright

Lakes FS2k2 Style?

Recommended Posts

Hi Everybody,What ever happened to that great discussion between rhumbaflappy, Arno and others concerning making Lakes-FS2k2 style? I'm still very interested in a (understandable) solution.Happy landings!Marty

Share this post


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

Hi Marty.There's quite a few people working on better interfaces to create LWMs.As far as the VTP polys and lines, I'm probably guilty of holding things up, as I have promised a new Tutorial to cover their creation with BGLC. I'll start again on this, soon. Life has a funny way of postponing things for us.My current fixation has been creating photoreal BGLs with more placement accuracy. Resample ( both old and new ) has a bad habit of mixing up data... both the resampled slices, and the placement of the textures.There is no way MS used resample for their photoreal! And the newer version is worse than the last.Of course, MS decided to withhold knowledge of the structure of landclass, waterclass, CUSTOM, mesh, etc... so we are tied to the program, whether we like it or not.Bob Bernstein and I have taken some steps to make tools that will help locate CUSTOM textures, and identify their names. I've taken that about as far as I can, so my tool will be released tomorrow ( I hope ). It's a CUSTOM texture calculator, with LandClass info, if anyone wants to assign custom textures to a landclass BGL. I've had mixed results with that method... mostly due to the fact that I cannot consistantly place a singular texture. Resample, or the terrain engine, insists on placing a minimum of 4 custom textures. Very strange.Here's a topdown screen shot of a single landclass tile ( value #133...Lava ), placed on my home. It blends in well... and part of the reason it blends in so well is because it uses 4 tiles to display! There is a blending routine to the tile's south and west ( using 'm' type masking textures. For Custom textures, there are no blending masks, so the south and west are blanked!Dick

Share this post


Link to post
Share on other sites

Hi Dick/Rhumbaflappy/Everyone,I must say Dick is something quite different of what to expect from a name as rhumbaflappy. Which one is nicer, I can't decide.Well enough of the ^&^*^&*$!#%.Your findings are, to say the least, very impressive but are not enterily what I asked.I'm working on a scenery were FS lacked a few lakes. I want to implement them FS-style. Thus with beach like effects, surf, reflection and soforth. I understand it all has to do with the LWM's.So here it is. How to create a simple FS-style lake according to my own dimensions, form etc?????Lookin' forward to this I can tell you!And uhh keep those lively/energetic discussions going. They spice things up round here. Everybody........join in!Happy landings!Marty

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

Hi Marty, as Dick says, quite a few people are working on this. Thanks to Dick's tutorial we know how to write asm files that will generate lakes, coastlines, beaches etc But there's a catch. Although Microsoft gave us a lot of information in the recent SDK they didn't provide a tool for automating the process. It can be done by hand but for large areas it would be very time consuming. As it turned out the mathematical and geometrical problems involved are far from trivial. But I think I can report some success in this. Several weeks ago I decided to write a Visual Basic program to automate the process, i.e. to import the geographical data in some defined form and automatically generate the asm file that can be compiled into the final .bgl file. It turned out to be the biggest programming project of my life! (I'm not a professional programmer at all, I should add). Last weekend I thought I had solved the last remaining major problem - but after looking at it in more detail I realised it was itself an enormous problem. It occurred when the data stream visited a given LOD13 square more than once. I saw that there were two distinct cases to solve, which I called CW and CCW (in the CW case the second line is to the right of the first one). I'm happy to report that yesterday I solved and debugged the CW case and late last night it appeared to be working correctly. This allows long thin bodies of water (better known as rivers!) The CCW case will require placing two separate polygons into a LOD13 square, which is possible. However the CCW case seems to cause relatively few problems. So the bottom line is that my program is sufficiently functional to create lakes, coastlines and rivers. It works like this: 1. Take a screenshot in FS of the desired area using the lookdown map view and using the highest resolution possible (I used 1600*1200). Note the centre lat/long position from the readout and measure the lat and long size of the screenshot. 2. Enter those figures into the program. 3. Draw a single pixel-width line onto the screenshot to define the desired coastline / lake and save as a .raw image file. 4. The program reads in the data and automatically generates the .asm file. 5. Drop the .asm file into bglc.exe to compile and you have the .bgl file. I will be able to import other data formats if there is any interest - drawing the coastlines as I described fulfills my own requirements. The program has a map display. You can zoom in to examine the data in detail. This made debugging much easier as there was no need to run FS for much of the time. The program still needs work and could be ready for download in a couple of weeks. However, if anyone is interested I could make a rough but functional version available earlier. It is quite neat to draw a river onto the screenshot and then see the river in FS a couple of minutes later! Currently it does not support beaches/waves but that should soon change. Best regards, Chris Wright

Share this post


Link to post
Share on other sites

Hi Chris,This is, to say the least, very promissing. I'm thrilled. Can I get hold of the app? Love to give it a try. Seems childishly simple. However you don't mention reflections, do they appear at all?Now let's work on those beaches/waves. Because you know what they say "Charlie don't surf" (R. Duvall-Apo Now!).Happy landings!

Share this post


Link to post
Share on other sites

Hi Dick,Well it lookes like I'm in for a weekend flat on my back with 'tonnes' of reading to do. I'll shall have a go at it. I'm not so in all the technical stuff but ok, let's see what'll happen. I'm hoping that the guys from the GUI's come up with something worth wile.Anyway much obliged for all of your apt responses and extensive stories.Happy landings!Marty

Share this post


Link to post
Share on other sites

The job you guys are doing is amazing! Coming from a country with thousands of different sized lakes and a huge archipelago with as many islands this tool will be very, very interesting! Would it be possible to include another feature: load a real-world map as a separate, semitransparent layer on top of the pic from FS, scale and place it to fit the FS area and then draw the lines? That would make the work much easier...BamceEFHN

Share this post


Link to post
Share on other sites

Hi Marty.All LWM created water is the actual FS2002 water... it has reflection, and all other water effects.Waves are generated automatically by using the appropriate texture for the shoreline in a VTP Method2 line.Chris Wright's program is a great step in the right direction. And I really like his use of thin LWM polygons as rivers. I don't know why MS didn't do this with all the streams ( other than the need to hurry the product to market ). The streams are VTP2s, just like the shorelines ( beaches ), and they really don't look good. For anything greater than 4.8 meters width, I'd use the LWM polys ( and for anything thinner, I'd cheat and use LWMs anyways ).MS used shorelines as trim for the rough polys of water in the sim. But a careful designer wouldn't need shorelines for ponds, small lakes, streams, and small rivers... just use more care in making a less jagged edge. Those water bodies don't need wave action, or a 20-40 meter beach.Dick

Share this post


Link to post
Share on other sites

Hi Chris>I will be able to import other data formats if there is any interest... And yes there is an interest. All the data I have is vector-data (or can be turned into it easily) so I would very much appreciate an import function - why not a simple tab-separated textfile with coordinates in decimal degrees? Looking forwardAnders Persson

Share this post


Link to post
Share on other sites

Hi guys, I just thought I'd return to pop up a couple of screenshots and I see there are some replies already! Here are the shots: http://www.kline.demon.co.uk/pic_10.jpg http://www.kline.demon.co.uk/pic_11.jpg You can see where I drew the line on the screenshot. The blocky light area is generic sand texture - the flattened water defines the actual coastline. The straight line is part of the same polygon that wraps around a long stretch of coastline. In the program shot you can see where a narrow part of the lake passes through a LOD13 area (the smaller squares on the grid) twice - this is what gave me a *major* headache! In the upper program shot you can see the outline of a large part of the Karakam peninsula. The other shot shows the result in FS. There are currently no 'official' beaches or waves but that should be no problem to add. Best regards, Chris Wright

Share this post


Link to post
Share on other sites

Marty, As there does seem to be interest I'll aim at a first rough but functional version for the weekend or early next week. You'll be able to download it from my Web site. The water is standard FS water with reflections and spray/wake effects. I'll probably need to pester Dick with a couple of questions and then I should be able to add beaches/waves. Best regards, Chris

Share this post


Link to post
Share on other sites

Bamce, that's an interesting question! Actually, I think it should be quite possible. In fact you wouldn't need the screenshot as the digitised map would serve precisely the same function (assuming of course that FS itself does conform to the map!) You would need to know the centre position and the size of the map in degrees. Then you could draw the polygon onto the map and the program would use that. Just ensure that no pixels on the map have full brightness (value of 255) as the program expects the drawn polygon to be 255. Alternatively you could merge the screenshot and map using a paint program. That could be useful if you want the water to match FS objects such as buildings or bridges. Best regards, Chris

Share this post


Link to post
Share on other sites

Anders, I know virtually nothing about these formats, but if it's basically a list of lat/long coordinate pairs then it should be easy to implement. Remember that the program is still in a very early stage - but if the format is easy to implement I could do it probably next week. Best regards, Chris

Share this post


Link to post
Share on other sites

Chris,That's exactly what I mean - a list of lat/long coordinate pairs separated by a tab (=ASCII-code 9).I have submitted a such file with this post. You should be able to view with NotePad.RegardsAnders

Share this post


Link to post
Share on other sites

Hi Chris.It looks fantastic.I'm assuming the water height can be set... and height -9999 set for mesh-clinging water.Some extra capabilities could be added, if they aren't already present:Land masking. You didn't mention it, but it's now easily added if you desire.It might be good to add invisible flattens code capability. Why not? You've already done the majority of the work for that!CFS2-style mesh-clinging water. The CFS2 people have been chomping at the bit to get some water into their sim!CFS2 code will require a LWMFileHeader Version of 256, rather than 513. And CFS2 LWMs have no height data, so you'll need to use LWMPoly1, that I invented in the TDFMacros.inc.Please feel free to add updated versions of the , and [link:webpages.charter.net/ludowr/TDFCalc2.zip]TDFCalc2, if desired in your package.I'm playing with some methods of re-meshing flattened areas, by creating new macros to handle the chores... That will probably have to wait for version2 of your program. :-eek Dick

Share this post


Link to post
Share on other sites

Chris and Dick,congratulation for your work.Will it be possible to replace roads also with this new frontend ?Would be greatThomas

Share this post


Link to post
Share on other sites

Anders, that should be no problem. Consider it done - in the next few days, that is! Your example will be very useful for testing. Best regards, Chris

Share this post


Link to post
Share on other sites

Hi, Dick! I got your email - I'll reply shortly. Bear in mind that the program currently just adds flattened water - the big problem was to solve the geometrical/mathematical issues. You can set the height - if you look closely you'll see the slot for water level. As it just copies the number to the asm file then probably -9999 should work. Remember that I'm not an expert on these SDK matters, but as I'm sure you'll provide the help it should certainly be possible to add these features fairly soon. Probably the best way would be to provide an example asm text that I can use as a template - that's precisely what I've done so far! I'll need to add VTP support - is that necessary for beaches? I think the first priority would be adding beaches/waves. One VTP question: I looked at your VTP island/beach example. I increased the size of the island and that worked fine. But when I also increased the size of the beach it didn't work (there were bits of beach scattered all over the island!) The beach coordinates were basically the same as the island ones so I expected it to scale up but it didn't. There's probably something else I need to know about setting the beach coordinates. Thanks for the comments. Yesterday was quite a good day, for two reasons. I solved the CW problem - and my shares on the Nasdaq actually went up quite a bit, which these days doesn't happen very often! Best regards, Chris

Share this post


Link to post
Share on other sites

Thomas, I'm sure it will be possible, but it may be a while, perhaps a few weeks. Best regards, Chris

Share this post


Link to post
Share on other sites

If I might interject, I'd stay with the FS world since that's where the final output is destined. There are hundreds of ways to make maps and is discussed elsewhere. (terrainmap.com & the casual cartographer)How do you know if your map is the same as MS, though some one postulated that MS gets its info from Encarta!Keep up the very hard work and let me know how it's going.http://www.geocities.com/ihor.geo/

Share this post


Link to post
Share on other sites

Hi James!I'm hoping I can get Chris to add CFS2 water, as the code is so similar to FS2002's water. If he doesn't add it, it should be possible to use a text editor's 'search and replace' function to alter the code.CFS2 shorelines are a bit of a problem, as they are not the same as FS2002's. But they are documented as VTP Method1 strips. So, down the road, Chris may add that capability, if he wants to make this the full-blown TDF writer.Nowhere in the default FS2002 are VTP Method1s used.. either the fan or strip flavors! The strips are the lines of CFS2. But the VTP Method1 fans are not used anywhere, although they offer tremendous possibilities for both CFS2 and FS2002. The fans are what we normally would think of as polys. You've seen some 'blended' CFS2 airfields? Well they are better when done as VTP Method1s... almost no framerate reductions.Dick

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