Sign in to follow this  
Guest

Making lakes/ponds

Recommended Posts

I am mapping a custom bitmap on the ground. When I paint the place of a lake black and save it as an alpha channel, save it as DXT1, I am not getting water, I only get a transparent patch that makes FS ground beneath visible.Can someone tell me what am I doing wrong? Thanks.

Share this post


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

I don't know if that is the way to make a lake. Never tried it that way.To really get nice lakes (where you also can land on in Fs2002, etc) I would recommend the method found out by Christian Stock. Look for his sceneries in the file library and you will find the sources there too. You need BGLC to compile them, but it works great (I have done some testing on it).I would also recommend this thread here, it's really interesting:http://ftp.avsim.com/dcforum/DCForumID10/309.htmlArnoMember NL2000 Teamhttp://home.wanadoo.nl/arno.gerretsen

Share this post


Link to post
Share on other sites

I haven't studied the Code Christian is using. He's the pioneer into using BGLC code. using that may be the optimum method.However, I can share the current method I understand. This means using resample.exe which was the scenery sdk tool from fs2000. In this old thread, topic 39 in the Terrabuilder forum, I outlined my method. Good luck!Bob Bhttp://ftp.avsim.com/cgi-bin/dcforum/dcboa...rum=DCForumID12

Share this post


Link to post
Share on other sites

Hi, Arno and Bob. I downloaded the scenery of Christian. I've looked briefly through the documentation. It's gonna require more than a brief look for sure :-).I've read through the procedure set by Bob and it looks to be the faster way for me.Thank you both very much for taking the time to provide the links. Appreciate it.Two questions Bob if you will; I use MS Imagetool for DXT1 conversion. Will it do the DXT1+alpha conversion like Elrond's FS texture converter? Does this procedure work only after using TB or resample.exe on the color and alpha bmp's, or can I input directly the original bmp and its twin alpha into the conversion utility without prior slicing?Many thanks.

Share this post


Link to post
Share on other sites

You need to use the prior slicing, because the file name is set both as the texture name and as the bgl that is created by tmf2bgl.exeImagetool may work if it allows for dxt1+alpha format. I like Elronds MUCH better, but each to their own.And to Arno: yes the water using the methods of resample.exe if Fully fs2002 water...all effects etc. No coastline effects, however.Bob B

Share this post


Link to post
Share on other sites

Yes, ImageTool can work with DXT1+alpha. If you save your image as a TGA image (that is a format that can include the alpha channel) you don't even need a second image for the alpha channel.ArnoMember NL2000 Teamhttp://home.wanadoo.nl/arno.gerretsen

Share this post


Link to post
Share on other sites

Very nice work you're doing there, Bob! And thanks for the clarification.All the best.

Share this post


Link to post
Share on other sites

>I haven't studied the Code Christian is using. He's the >pioneer into using BGLC code. using that may be the optimum >method. >>However, I can share the current method I understand. This >means using resample.exe which was the scenery sdk tool from >fs2000. In this old thread, topic 39 in the Terrabuilder >forum, I outlined my method. Good luck! >There is a FSTerrainCalc utility written by Jari Kaskelin, which inputs the bitmap picture and creates all necessary textures out of it. You don't have to do the math ;-) I guess that FSTerrainCalc is here in AVSIM - if it's not you can download it from http://www.fsnordic.net file library under utilities section.

Share this post


Link to post
Share on other sites

Hi rantala and all.FSTerrainCalc looks to be a great programming tool for photoreal sceneries. However, the MASM/BGLC code Christian Stock developed is to create lakes, coastline corrections and mesh conforming polygons of the FS2002 variety, not photoreal. Sadly, the tediousness of the coding process, and the huge problems of investigating the code without a proper terrain SDK, drove Christian away from all design activity regarding FS2002. It's pretty obvious, by now, that Microsoft does not want designers to be able to code their own lakes, coastal areas, shorelines, rivers, streams, roads, or rail lines; or to be able to lay down mesh-clinging polygons. Most of this code was used in some form since CFS2.Remember, also, photoreal and landclass are not in any way supported by Microsoft... these were results of discoveries by simmers using AVSIM and other forums as a vehicle of communication. In truth, the resample program from Microsoft's FS2000 SDK does not even function as the SDK documentation states:For example... the terrain SDK gives us an example of using multiple source files ( Mt. Rainier ). But the line " NullCellValue = -9999 " is not possible with the version of resample.exe they gave us ( it's not even a valid command! ). That command alone would have allowed irregular or partial dems to be used along with "complete" dems of a different resolution to fill the terrain "gaps". Not possible with the tool they gave us, and that's just one instance why Christian decided to leave this sim. Microsoft never even gave us the tool they said they gave us. The tmf2bgl program will set incorrect bounds in the BGL header. Burkhard Renk developed a small progam to correct this, and Martin Wright incorporates the necessary correction in his FStrn program. Otherwise you need to check and correct the bgl header with a hex editor. ( Now they promise CFS3 will be designer-friendly.... LMAO ).So until someone can create a program that gives us BGLC code from a list of lat-long points, Christian's labor lies dormant. It's just too hard to hand-code. A point must be defined as 1/256th of 1/32nd of an LOD8 area. Imaginine a pixel of an LOD13 256 X 256 terrain area ( the size of a standard texture block or photoreal texture ). That's the required precision of the TMF-style lakes and coastal correction polygons of FS2002. Using CFS2 coding, I discovered a way to create mesh conforming water polygons, and now we could create wide rivers and swamps that need not be flattened. All coasts and lakes are HYP files. Their framerate "hit" is minimal, and the file sizes are tiny! That's what we can get with the proper tool. And not just water, but invisible irregular ( and precise ) flattening polygons and irregular shaped mesh-clinging textured polygons as well. Sorry for the rant. :)P.S. bob5568's project looks great!

Share this post


Link to post
Share on other sites

>Hi rantala and all. >>FSTerrainCalc looks to be a great programming tool for >photoreal sceneries. However, the MASM/BGLC code Christian >Stock developed is to create lakes, coastline corrections >and mesh conforming polygons of the FS2002 variety, not >photoreal. Yep - I know the difference. The reason why I mentioned FSTerrainCalc was that Bob mentioned a link to another conversation in TerraBuilder forum which turned out to be a photoreal issue.- Jussi>Sorry for the rant. :) Now I got this - however I had to use finnish-english dictionary :)

Share this post


Link to post
Share on other sites

Sorry ur upset, Rhumba, and thanks for the comp! While I agree with your points, I don't find myself upset. I guess there is lots of learning going on and that keeps me happy. Cheers,Bob B

Share this post


Link to post
Share on other sites

Hi Friends..Very interesting thread this one...I have minimal knowledge of terrain design rules, and it seems there are things that can be done here.If someone can give me some info of what we already know, I could probably help with the tool. Of course it would be through gmax.You also mention some files and examples from Christian, a pioneer in deed. It seems I have missed that. Can you tell me where it is ? Do I understand correctly that we know how to built proper 2k2 lakes ???I have figured out the maths for scenery design and so far I can get better that +/- 0.5 m accuracy. If the same rules apply to terrain then I'll be glad to contribute.ALl the best,George

Share this post


Link to post
Share on other sites

At this moment one of our team members (NL2000) is rebuilding our custom tool that we use to create our scenery to work with BGLC. I think he can already almost make the new style lakes, from the data we have in that tool. I haven't heard from him the last days how must progress he made, I'll ask him.ArnoMember NL2000 Teamhttp://home.wanadoo.nl/arno.gerretsen

Share this post


Link to post
Share on other sites

Hi georgio and all.Here's the link for the TMF-style polygon discussion.The download here at AVSIM is Christian Stock's Ryan's Creek scenery... Sorry no link to the file library, the server is down right now.And , yes, georgio, we can already have FS2002-style flattened lakes, flattened coast correction, framerate-friendly invisible flattens, large mesh-clinging rivers, etc... Once you see Christian's code discovery, you'll understand the complexity. Right now, we need to do by hand, what Microsoft did with an advanced TMF polygon placement/generator.

Share this post


Link to post
Share on other sites

Hi rhumbaflappy (it it Richard ??), Arno and the gang..It looks that a lot of brainpower is already in the field.I checked the TMF thread, VERY interesting.I understand there is software developed as we write; this is great.If there is anything I can do just let me know guys (either in software or 'decoding').I also checked Christian's airport. He has done amazing decoding work. It would be very easy with his work in hand, to auto-create ASM code.To avoid making things twice, if you think some coordinated sort of group can be formed, I'll be glad to join.Catch you all later.George

Share this post


Link to post
Share on other sites

Hi George and all.Here's some of my random thoughts on this... To follow this you will need to download and read Christian's Ryan's Creek documentation.One way of viewing the problem, would be from a typical designer's viewpoint:The LOD8 area could be defined as a 8192 X 8192 bitmap with the polygons drawn in, and then "resampled" to the rowOffset1, rowOffset2 and colOffset, as defined by Christian. The Offsets define the location of each 256 X 256 LOD13-size sub-area. The points would then need to be derived... the actual flatten or flat-water polygon is basically a list of "moveto" commands, which the terrain engine fills in to make a polygon. So, the resampled LOD13 size bitmap shapes would need to be converted to a list of outline points defining the irregular corners of the "slice" of polygon that exists in it's borders. ( That LOD13 bitmap is 256 X 256 points. ) Somehow the elevation would have to be assigned to the shape as well, and type of polygon. And also, it's possible for 2 or more shapes to exist in the same LOD13 area, each having it's own elevation. and requiring it's own point list. The LOD13 area spans 1223 X 1223 meters at the equator.The only reason I'm suggesting an interface of a 8192 X 8192 bitmap: a designer could simply draw and fill his lakes, coasts or flattens on the LOD8 bitmap, assign height to shape, define type of polygon type to the shape, and get the MASM/BGLC code generated. Easy interface, complicated programming!Another way of viewing the problem would to have a location calculator that would spit out the code for the 4 corners of LOD13 size boxes that enclose the area to be flattened or watered. The point data in the generated code could then be "hand-edited" to get the desired shape, type, and elevation ( if needed ). Much simpler programming, not very user friendly. But, for the ponds and lakes and corrections we need, maybe user-friendly has less importance. A brute-force method could also work. A master text code covering the entire LOD8 area, with all 1296 LOD13 areas defined by their 4 corners could be made. Using a text editor, cut out all code for unneeded LOD13 areas, then adjust corner points in used areas, define elevations, and types. Define the LOD8 group info and needed counts, and you're good to go for compiling! This approach would be the easiest to implement, the least user friendly, and may be the best way for us to quickly get some examples out to the interested simmers. There would be a lot of editing text, compiling, try-out in the sim, more text editing, compiling, etc... It's a large amount of cut-n-paste, but could be done. Perhaps a variation of this combined with a calcualtor approach might work, saving a lot of the text cutting process.I could come up with something within the next couple of weeks regarding a brute-force master list, Christian's FS2002 macros, my CFS2 water macros, and an example. That is if I don't go crazy thinking about this all first :)Dick

Share this post


Link to post
Share on other sites

Hi,I am considering the correction of a coastline with several kms of lenght. Probably I will not use a bitmap for the primary interface. Instead I will (probably) use an existing GUI tool for scenery design such as FSDS, ASD or SCC. On those tools I can activate a grid and set the grid size to correspond to LOD13. Then I will draw a polyline with the correct coastline. Using the grid and the polyline as templates, I will draw the water polygons. I can make the RefPoint to coincide with one "upper-left" corner of a LOD13 square and set the scale of the project so that the delta coordinates of the opposite corner for that LOD13 square (at my working latitude) are 255 255. Then I will generate the txt code (SCASM) for all my polygons and will edit it so that I only keep the list of points coordinates. Simple calculations that I can make on a spreadshet can give me the 1 column and the 2 row needed parameters ....and, if I will have luck ..... may be I will reach the point of having it all back in a MASM file for final compilation.Regards, Luis

Share this post


Link to post
Share on other sites

Hi Luis.Yes. That should work. Read the documentation Christian left us with the Ryan's Creek download if you have trouble. Would you please post before and after screen shots, and maybe the MASM/BGLC text code? And could you give us the spreadsheet code, as well? :)To everyone else reading, these coast alterations will be water-flatten TMF polygons... just like lakes and ponds... and just the way Microsoft defines coasts..

Share this post


Link to post
Share on other sites

Hi all.I've got a working calculator for TMF poly calculations. I'll have it posted after one or 2 more tweaks. It's pretty rough, but does the job. It is based on Orlando Sotomayor's LOD calculator ( which means it's in JAVAscript and is an .html file ).So far, it seems reliable, and will locate the TMF group, and data location numbers. I've also altered Christian Stock's original INC file, to include CFS2 Style mesh-clinging water polygons, and renamed some variables to make them less confusing. I named it "RhumbaTMFMacro.inc" to prevent confusion with other BGLC macros. There's going to be a lot of changes to these macros as more discoveries are made.I'll also include some new documentation, to help other designers and researchers. Also, here's a pond I dug at Interlaken. Somebody move that runway!:-eek

Share this post


Link to post
Share on other sites

Excelent work my friend !!!looking forward for the tools.One question : Is the way to add sandy waterlines known yet ?CheersGeorge

Share this post


Link to post
Share on other sites

Hi George.I don't believe anyone yet understands beaches and shorelines. But:You'll notice in the picture, the APB (Airport background ), surrounding the default runway. The ABP is just a textured TMF polygon. Note how the water has priority over the textured TMF polygon, which in turn has priority over the ground texture and the autogen. So to easily make a shoreline, just make the dimensions of the textured TMF poly slightly larger than the lake TMF poly... Voila! The water masks the inside of the textured TMF poly, and should leave the edge of the poly exposed as a shoreline, over the default ground texture.The above pond was a set of 10 x, y points. I designed the pond with MSPaint, using a 256 X 256 pixel size, to correspond to the 256 X 256 requirements of the LOD 13 area. I just used the x, y points as the paint program gave them... Christian Stock mentioned the point bounds are 0-255, just like most paint programs.

Share this post


Link to post
Share on other sites

Thanks !Both very good ideas...Going to have some fun.....Cheers

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