Jump to content
Sign in to follow this  
desertwind

FS 2004 Water Mask

Recommended Posts

I have found some information on this topic in bits and pieces and have learned that a water mask is just a 'cut out' so that FS water texture can show through and that creating a water mask involves the use of a graphics editor and the saving of the mask information to the source image's alpha channel.I'm using satellite imagery that's been converted to .tga images. I assume it's this image that the water mask must be added to?I'm using GIMP for the graphic processing, but haven't been able to figure out how to add the water mask to the alpha channel. I know that the water mask area needs to be black and the land white, but I'm kind of lost at this point. Can somebody help me with this or at least point me towards some good resources I can refer to? The less technical the better! Thanks.Tawni

Share this post


Link to post
Share on other sites

Hello:When preparing source bitmaps for creating custom photorealistic terrain textures, the alpha channel bitmap must have only 2 colors (0,0,0 and 255,255,255 in RGB terms), and/or the water areas in the edited source bitmap used with separate input masking bitmaps must be painted as absolute Black (255,255,255 RGB) depending on what method you are using with Resample to create a .bgl file (and a set of .tga files output files prior to their conversion to MIPs and BMPs).Refer to:Microsoft

Share this post


Link to post
Share on other sites

I have never used the Gimp but in PhotoShop you can simply select the water area using whatever means available then switch to the alpha channel and fill the selected area with black. The result must then be saved as 32 bit.If that's not possible in the Gimp you could always create a white layer, fill the water areas with black, and then save the black/white layer as a seperate .bmp. Next open the original .tga file in DXTBmp and import the black/white .bmp as an alpha channel.I've been playing with Maps2Bgl myself. I successfully added a "water channel" to several of the tiles but I think I like the result better without. To me the "photo water" looks more realistic, but maybe I just need to experiment with some more water textures. I do miss the reflective effect however.Jim

Share this post


Link to post
Share on other sites

Hi, Jim~Thanks. I finally figured out what I was doing wrong. I was 'flattening' the layers or some such which I guess negates the masking effect. So it works, yeah for me. I'm only creating masks for the ocean, since it looks really bad having a zillion different textures representing the water on the coastal areas. Like you, I rather like the photo textures for lakes and streams. The lack of reflectivity I attribute to my uber expensive polarized virtual pilot sunglasses. :( Tawni

Share this post


Link to post
Share on other sites

>The lack of reflectivity I attribute to my>uber expensive polarized virtual pilot sunglasses. :( Heh, heh... :D

Share this post


Link to post
Share on other sites

BTW, Jim, maybe you can answer this question:The scenery I create using a water mask always has a thin, black dotted line right at the border between the water and the terrain. Is there someway to prevent this from happening. It's not super bothersome, but if there's a way to nix it, I would. Thanks!Tawni

Share this post


Link to post
Share on other sites

I hadn't noticed this in any of my experiments but from a quick scan of the big thread in the main FS9 forum it looked like some of the guys were modifying the RGB part of the texture as well as adding the black alpha areas. Again, I just quickly scanned the posts in that thread so maybe I'm all wet, but all that's really necessary is to add the underlying black alpha areas where the water should be. The sim will render water wherever it finds black on the alpha regardless of what the RGB looks like (paint the water areas bright pink if you want, it won't make any difference in the sim). Not sure how you're going about it, but the only thing I can think of is that possibly the black dotted lines are caused by a slight mismatch between the alpha area and any fill areas you may have done on the RGB???Jim

Share this post


Link to post
Share on other sites

Hi, Jim~I'm under the impression that painting the RGB water area black was to simplify the selection of the area to be masked, since most graphics programs have a way of selecting an area by color with a single click. Since the area I painted black was used to define the mask, not sure why a mismatch would occur.The sim will render water wherever it finds black on the alpha regardless of what the RGB looks like...That's my understanding as well. I'm thinking perhaps some areas had, as part of the base image, colors very, very close to absolute black but not quite and therefore were not replaced with water texture.However, once I have the RGB painted black and I do a selection operation, any stray pixels that are not absolute black are highlighted by 'dancing' mask lines, then I go back and paint those areas in until the only thing highlighted during selection is the actual area to be masked.This may be a bit obsessive anyway, since I'm really scrutinizing the shoreline during my 'inspection' flights when I really should be looking for traffic. :(I guess the obvious workaround is to fly a thousand feet higher, right? :DTawni

Share this post


Link to post
Share on other sites

Not sure how it works with the Gimp but in PhotoShop I just used the lasso tool to lasso a marquee around the water areas and while the area was selected I switched to the alpha channel and filled the selected area with black, saved as 32 bit - done.One thing that could possibly be causing the dotted black lines might be anti-aliasing in your selection. In PS you can use the lasso tool with anti-aliasing on or off, and I've noticed that with it on, the filled area will have some gray areas around the edges. Later when you run the batch, imagetool will turn the .tga's into DXT1 .bmps. DXT1 only allows for pure black or pure white on the alpha, so any areas lighter than 50% gray will be turned white while anything darker will be turned black. Possibly parts of the alpha channel for which you have a matching black mask on the RGB have been turned to white by the DXT1 conversion allowing the RGB mask to show in the texture rather than rendering water in those areas.Here's an example of what I'm talking about, the area on the left was selected with AA off, the right with AA on:http://www.cat-tamer.com/flightsim/atchmnt..._comparison.jpgProcessing the right hand area through imagetool would cause the blurry edges to be eliminated making it look like the left hand area which may no longer perfectly match your filled area on the RGB. I think if you can figure out a way in Gimp to select and add the black alpha areas without filling anything on the RGB, the black lines will go away. You'll just see the photo texture right up to the water's edge that way.You're right, we're probably picking the fly specks out of the pepper here :D .Jim

Share this post


Link to post
Share on other sites

Update - Black artifacts eliminated!By using the 'path' tool and creating points following the contours of the shoreline, then 'select/from path' to create the mask, the resulting scenery area created is now free of those pesky little black dots. Tawni

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