Sign in to follow this  
Forkboy2

Water everywhere and not a drop to drink

Recommended Posts

I was directed here from Scenery design.The white polygon,I want it to be a river. The missing River Irwell in Manchester UK(Paul Baines Manchester ship canal in foreground.)Alpha channel 0 0 0 and all that stuff.Where do I begin?

Share this post


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

Ihor, click above here where it says "old forum and archeive"...and read thru the first few pages. Lots of instruction on water.B

Share this post


Link to post
Share on other sites

I really like your sense of humor, Ihor. Very witty.It would seem, from comments made by many others, that the Flight Simulator world is made of water covered over by ground textures. To reveal a water surface, you may simply create a transparency in your image, which will show as water (the floatplane landable stuff, not a hard polygon.)Take your image and color the water parts in pure black. Make the rest of the image pure white. Save it as a mask (I mean, just give it a different name from the original.) Combine your original image with this mask using FS Texture Converter by Elrond Elvish. That should give you more or less what you want.There seem to be some inconveniences with this method, and I would appreciate input from others. While this will create a water surface, other Flight Simulator documents seem to create shallows close to the banks, giving a strange appearance to many lakes and rivers. In addition, it does not seem that this is the method used by FS for all lakes and rivers, since default ground textures are placed throughout, and then water surfaces are added with the hyp and hyl documents in accordance with hydrographic maps. Perhaps, in the future, instead of transparencies, we shall be modifying some of the hyp or hyl documents or just applying them to the modified or new ground textures.Best regards.Luis

Share this post


Link to post
Share on other sites

Thank You!I have Photoshop 6.0 and have used the program since version 2.5So creating the image should be an easy task.How big a square do I make?I've never come across a tutorial explaining sizes, references to LOD's and mentions of 4.8m/pixel.I want to achieve a couple of things:My river, reservoir and produce a tutorial that shows a step by step approach though not a 'spoon-fed' one.It seems to me to be overwhelming at times, I remember Nova & EOD and not having a clue at the time. So I'm sure this thing will click!I just wish MS would have provided the images in editable format.One can't expect anyone to have every stream river & water feature for the planet absolutely correct, so let people with local knowledge edit their local areas.

Share this post


Link to post
Share on other sites

Is the image you uploaded with the white river...is that default with a polygon based river drawn on top? Or is is photoreal terrain using resample.exe?Or asking more directly...do you know how to make terrain using resample.exe and tmf2bgl.exe, tools provided in the fs2000 sdk?If you don't, this is where you should focus for now, water is easy but you have to know this part first. Some folks use Terrabuilder Lite which is free to do terrain. That's an option. or you can do it directly using the resample tools.Some groundrules:4.8m/pixel happens to correspond to LOD (level of detail)13. This level of detail is locked as far as I know, for photoreal terrain. The reason we resample to 4.8m/pixel using our graphics routines is that the MS utility resample.exe does a poor job of resampling quality.You will only see results when your image fills COMPLETELY an LOD 13 rectangle. The LODs are established chunks of lat and long. LOD 1 is six chunks, lat is cut at the equator, and long cut three ways at 0, 120, and -120. Each region is halved for each increase of LOD. Terrabuilder lite will show the LOD 13 grid over your image, which helps. or you can calculate the grid and show it in your graphics routine using guidlines.The process is:1. Create a photo image, 24bit rgb works fine. 2. Resample it to 4.8 m/pixel.3. Determine the distance in degrees between pixels in both vertical and horizontal4. Determine the location of the NW corner of the image in longitude and latitude5. Create a file called myfile.inf6. run the program resample.exe on the myfile.inf using command syntax: resample myfile.inf7. the output file name is part of the .inf file, "class" is what I call mine. you'll get a file called class.tmf as the output of step 6. Run the program tmf2bgl.exe on this file using syntax: tmf2bgl class.tmf myfile.bgl8. That bgl file goes to scenery.9. The output textures generated in step 6 are about 193kb bmps. Using converter made by Elrond Elvish, and available in the library, convert the textures to dxt1, they should be about 43kb.Then put in your texture dir and fly.Once you get this far, now add water:10. Create a NEW image, also rgb, from the image in step 1. Select all water and color it black, 0,0,0. Color everything else white, 255,255,255.11. Create a new inf file for this image, by simply changing the name of the source file to the new image from step 10.12. re run resample.exe on this inf file, saving the textures in a unique place.13. DONT rerun tmf2bgl, just throw out the tmf file created in step 1214. now rerun the texture converter, this time giving a directory path to two places, the place you stored the slices from step 6 as "main" and the place you stored the slices from step 12 as "alpha".convert to "dxt1 plus alpha (fs2k2 method)".Put those results in your texture dir, and fly over WATER plus terrain.A sample of an inf file is not hard to find, but I'm at work right now. Someone else may provide a sample today...if not, I'll post an example tonight from home.Good luck,Bob BernsteinEdmonds, Wa.

Share this post


Link to post
Share on other sites

Sincere thanks!I have Terrabuilder Pro!The picture is Default MS texture (default Landclass)I just laid the road poly on top, as a guide!(in the mid 60's the river was known to be this color! I've seen it purple and pea green! today it has been cleaned up and the fish have returned)I'll start tonight and see what develops.

Share this post


Link to post
Share on other sites

Ihor, this is my inf file for my new version of Harvey Field[Destination]DestDir = "E:flyingharveyHarv3"DestBaseFileName = "class"UseSourceDimensions = 1 [source]Type = CUSTOMSourceDir = "E:flyingharveyHarv3" <------ur dir of ur bmpSourceFile = "harvNEW1.bmp" <-------ur bmpLat = 47.93486155 <-----NW corner locationLon = -122.1338058 <----" "NumOfCellsPerLine = 1690 <----# pixels in the x dirNumOfLines = 1522 <-----# pixels in the y dirCellXdimensionDeg = 4.57431E-05 <-distance in deg between pixels (x)CellYdimensionDeg = 3.53561E-05 <--distance in deg between pixels (y)ScaleinMeters = 1SampleIsCentered = 0EnjoyBob Bernstein

Share this post


Link to post
Share on other sites

Hi Ihor,Just a short note adding to Bob's very excellent instructions.Please read the Terrain SDK notes - while mostly obscure, you will find the LOD table within that contains details. LOD 13 is 1223 metres on each side - that is, a little more than a kilometre per side. If this means nothing to you, then a little calculation may help. There are about 1,6 kilometres per mile (yes, in the rest of the world, a comma serves as the decimal separator.) So, LOD 13 is about 3/4 (0,75) of a mile on each side.Best regards.Luis

Share this post


Link to post
Share on other sites

My Dad taught me math (mathematics)the European way! Way before I learned it in English School.Thank you!

Share this post


Link to post
Share on other sites

You must play SimCity 3000. "Water everywhere and not a drop to drink" is a common phrase that pops up in that game if your water pumps get disconnected from the pipeline grid.Matt

Share this post


Link to post
Share on other sites

>My Dad taught me math (mathematics) >the European way! Way before I learned it in English School. >Thank you! Check also FSTerrainCalc utility by Jari Kaskelin. It does all of the maths automatically if you know:a) input bitmap's reference points coordinates:( the resolution of input bitmapThe program generates first the inf file and finally also textures by utilizing FS2000 SDK programs.FSTerrainCalc might be here in AVSIM, but if you cannot find it here, check www.fsnordic.net file library under utilities section- Jussi

Share this post


Link to post
Share on other sites

Starting with 'alpha': I have hundreds of textures and some are a lake. Will it work, only to convert the lake textures, adding the black-white.BMP to this textures only, without new resample?www.petercie.dePit

Share this post


Link to post
Share on other sites

Hi Pit, sorry I didn't notice your question. I've stopped reading this board except now and then.I don't really understand your question, unless your saying your resample produced hundreds of slices. If you have an alpha and a main sliced into hundreds of files, it will still be quite easy to convert them all to dxt1 + alpha using Elronds awesome utility fstexconverter. Hope this helps.Bob Bernstein

Share this post


Link to post
Share on other sites

Hi Bob,I have lerned a lot about alpha last week. So I think Elronds Converter works non-nVidia way. So my textures became bad coloured, respective the mips. Now I tryed Martin's 'DXTbmp', only the water-slices. And the result is fine.At www.petercie.de You can see the result now.But I have had 3 slices with n-Vidia-bug.Pit

Share this post


Link to post
Share on other sites

Sounds interesting. Yes, Elronds Converter does avoid the nvidia bug, but even that code comes from Martin. Martin would be the ultimate authority I'd write for questions regarding problems with the non-nividia image quality. He is always responsive when I've written him.I personally can't stand the nvidia bug....drives me absolutely over the edge. I love Martin's work around, and I haven't noticed any problem with mips.B

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