Archived

This topic is now archived and is closed to further replies.

cmpbellsjc

Need some help with a water mask please

Recommended Posts

I am trying to clean up the water mess in the south Florida area near Ft. Lauderdale and Miami. I have already tried going with the WC method, but even though that fixed it a lot, I am finding that I am still not satisfied. What I have done and am planning on doing is taking photo tiles going in the lenght of the coast using SBuilderX like this one.L13X4543X4549Y6957Y6961.jpgAnd then using gimp as I have done in the photo above to just blur it a little and make the patterns less distinct. Then I made a blend mask shown here.L13X4543X4549Y6957Y6961_B.jpgand a water mask as shown here.L13X4543X4549Y6957Y6961_W.jpgBut after I compile it and place it in FSX it either doesn't show up correctly or at all. When it does show up it disappears as I get closer to it. I did one of these in the past and it seemed to work right, but for what ever reason I have done something wrong and cant seem to get it working now.After reading and re-reading the tutorial by Luis Sa I think it was, I am still stuck.From what I understood, using the blend mask you put pure black where you want to block out the photo scenery and place pure white on what you want to see thru. Then using a water mask you put black where you want the water effect and speculars to show and put white where you dont want any.BTW, the water and blend masks are both tiff's in my project if that makes a difference.Thanks in advance for any help.Or I would also be open to other ideas on how I can do water like what I am wanting to achieve.

Share this post


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

Hello Sean,Even I am confused now! So, I looked it up in the tutorial:Water MaskThe new FS X Water Mask now only deals with water effects - the white areas do nothing, but the black areas indicate where water reflections and specular effects should appear. The advantage is that we can now keep the custom texture image of the water and still get FS water effects on them.Blend MaskThis is new to FS X - it will gradually fade out the custom texture so as to give better transitions to the default ground. The Blend Mask is a grayscale image, where pure white displays the custom textures and pure black is full transparency (and will display the underlying ground - or water!) All gray values in between will represent varying levels of transparency where the custom textures blend with the default ground.You can use the Blend Mask to transition between custom land textures and default ground, or you can also use it to fade from your custom water to the default water.So, if the tutorial is not wrong (anything is possible), then you are doing everything correctly.But, perhaps my confusion arises because it seems as if you are making a Blend Mask to display the photo-real water, but not the photo-real ground - the Mask will cause that part of the source image to be transparent and display the underlying default ground textures. Is that what you want?I would have imagined that your Blend Mask and Water Mask would be somewhat similar.Also, make sure that the source image does not have any pure white pixels, since the use of a Blend Mask with them will give strange color anomalies - orange (or black) patches in the ground textures replacing the white of the source image.Best regards.Luis

Share this post


Link to post
Share on other sites

Thanks Luis for taking a look. Yes, I only want the water to show and not the land. I am going to stick with the GEX land textures because I don't have the patience to do the required night textures to make the ground tiles look good.From what I read and what you posted it seems that I am following the directions to a "T" as they say, but for what ever reason it wont work right.I tried making the water mask just a completely black tile that covers the whole thing. When I compiled a new bgl and went to FSX the water shows from a distance, but as I get closer to it starts to disappear. If I back up my postition it comes back into sight.It's the weirdest thing because I made a really small one of these once using the same idea and it worked fine, but this time no go.

Share this post


Link to post
Share on other sites

Your blend mask eliminates the need for the water mask since you are effectively eliminating any of the photoreal texture that is over the water, so you really don't need one. Unless you are trying to get the water effects on the photoreal texture to show, I'd get rid of the water mask info in the .inf file.

Share this post


Link to post
Share on other sites

Hey neighbor, thanks for the idea. I will give it a shot without the water mask, but I had wanted to keep the speculars and waves. I think I may have figured out what I was doing wrong and I am loading FSX now to test it. When I compliled I still had the null value entery in the ini file. I took it out and will see.

Share this post


Link to post
Share on other sites

Well, I tried not using the water mask and also tried removing the null value line in the ini file, but still no success. It's weird, I have mad all kinds of photo sceneries using SbuilderX and not once have I had troubles like this. Although I have never tried using it to make water tiles specifically, I can't see what I could be doing that is making it not work.The other thing I can't understand is that when it does appear in FSX little parts of it start to disappear as I fly toward it. What I am starting to wonder is if maybe my source area is too big. Since I was just doing water and didn't need very much definition I took a sample from a very far away zoom level and maybe the area is just too big for a singe bgl to display properly. I will try a smaller area and see how that works.

Share this post


Link to post
Share on other sites
You're saving the Tiff files as 8-bit, grayscale?
Not sure. When I make the black and whites they are .bmp files, then I save them as .tif files and the only option I get when it says "save as tif" Compression are none. lzw, pack bits, deflate, and JPEG. I had been selecting none. I'm using GIMP btw, and I dont see where I can convert it to an 8-bit image.You think this maybe part of the problem? I notice the tif files are the same size files as the original photo .bmp. I would assume that they should be smaller files since they are just black and white, but since I am fairly new at this i'm not really sure.

Share this post


Link to post
Share on other sites

Ok I went back into GIMP and changed them to grayscale and resaved and that cut the file size in half. Also I opened one in Infranview and it said it was 8-bit. I did some google searching and from what I understand by default GIMP saves them as 8 bit.I'm going to recompile one and see if it works. I will report back.

Share this post


Link to post
Share on other sites

Alright after doing the official conversion of the masks to grayscale and recompiling, its still not working right. It will display but then start to disappear as I fly towards it. I am really thinking that it may be because of the size of the map I am using. In the past I have always zoom down to a greater level for gound textures, but since I was just doing water, I wanted to bit off a bigger chunck at once so I took a map from the highest level I could that covered a large distance. I will try another at a lower level and smaller map and see if it works. If that doesn't do it then I really have no idea what it is. The zoom level is the only thing I have done different this time around.

Share this post


Link to post
Share on other sites

Happy to say that I got it working.It turned out to be the zoom level that I mentioned in a few post back. Seems that FSX doesn't like to use single maps that were as big as the that I posted at the top. So I made new maps that were from a more zoomed in level, made a water and blend mask, compiled one to test and it worked.Thanks for everyones input. Good to know about the zoom level for the future.

Share this post


Link to post
Share on other sites

Happy to say that I got it working.It turned out to be the zoom level that I mentioned in a few post back. Seems that FSX doesn't like to use single maps that were as big as the that I posted at the top. So I made new maps that were from a more zoomed in level, made a water and blend mask, compiled one to test and it worked.Thanks for everyones input. Good to know about the zoom level for the future.

Share this post


Link to post
Share on other sites

The key is the LOD levels at which the image is compiled, Sean. This was the solution that we all missed when you mentioned that the image disappeared as you approached.If the resolution of your source image is too low, then the automatic compilation will only create LOD levels up to a certain limit, below that of the default ground (or water). And therefore the custom water in this case will only display when you are far away, because there are no high resolution LOD levels in the bgl that can display when you are near.There are a few solutions:- use higher resolution source images, so that the LOD levels as compiled are as least as high as the default ground;- change the entry in the inf file so as to force compilation up to that level, even though the source image does not have such high resolution. For example, change from LOD = Auto to LOD = Auto, 15 and this will compile to those levels; Resample will determine the lowest LOD level and will create all the others up to the highest level specified. Unfortunately, I think that you will have to make the changes and re-compile manually, since SBuilderX may not let you change the LOD level anywhere.Here is what the official S.D.K. has to say on the matter:Default land class textures will be used if the terrain system cannot find photo-imagery at LOD13 (5 meters per pixel) or greater detail. This can lead to default textures appearing when photo-imagery is desired. To ensure that the LOD13 requirement is met, consider using LOD=Auto,13 in the [Destination] section of the .inf file. Also be careful with the CompressionQuality setting, change the default of 100 to around 80, and adjust one way or the other to get an acceptable compromise of image quality and size. Best regards.Luis

Share this post


Link to post
Share on other sites

Yep that was it.That's some interesting info that you passed on Luis. Using those LOD adjustments must be how that product FSAltitude uses photo scenery that is only displayed at high altitude, then as you decend the default ground textures start to reappear.There is always something to learn when doing things like this. Just when you think you have something fairly easy figured out, you learn something else.My hat really goes off to guys like you and others who know so much about the SDK and scenery design in general.Thanks for taking the time to help. Now hopefully by tonight I can get some nicer looking water around the beaches in Miami and Ft. Lauderdale.

Share this post


Link to post
Share on other sites