Jump to content
Sign in to follow this  
Guest VSQ

Water mask (alpha)

Recommended Posts

Guest VSQ

Hi,How to obtain an alpha mask from a given photo real bmp?Regards,Val

Share this post


Link to post
Share on other sites

Easiest done in Photoshop or PSP.Use layers and set a new white layer below the original BMP.Select and fill all water areas black from the BMP onto the new layer.Delete the original.Save the rest (the new b/w layer) as the watermask BMP.Requires some PSP or Photoshop knowledge.Best,Bjorn

Share this post


Link to post
Share on other sites

Instead of using a different layer, why not put that information into the alpha channel right away? That is even easier.And about the origional question, do you mean you want to extract the current alpha channel from the image or add your own?


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest VSQ

Hi,Bjorn and ArnoI understood that I need to edit manualy the bmp, and fill the water with black.This needs a very precise hand.It's possible to extract the alpha channel from a given photo real bmp, without painting black the water?Regards,Val

Share this post


Link to post
Share on other sites
Guest VSQ

Hi,>>I understood that I need to edit manualy the bmp, and fill the water with black.This needs a very precise hand.>>Forget this dumb thing. I already figured out how to fill water with black using layers.Regards,Val

Share this post


Link to post
Share on other sites

Hi guys,The layer method is by far the best approach since you can select the water areas with the magic wand tool and then fill the same area directly on the new "layer" and finally delete the background (photo), flatten the BMP and save it.The watermask has to be a bit "tidyed up" with the paint brush as there otherwise will be small remains of "unselected" water.This is also super easy to do with a layer and the use of transparency between layer/background. Then you easily can see what is required to "handpaint" away with pure black since you work directly on the background but the repaint will hit the layer.The "watermask" is nothing but a standard BMP with pure black and white colors only.Glad you have got the hang of it.Bjorn

Share this post


Link to post
Share on other sites

Glad it is working indeed, but I still think the alpha channel approach is much easier then making a separate texture for your masking. Here is a little [a href=http://www.scenerydesign.org/forum/attachment.php?attachmentid=23]tutorial[/a] I wrote about it sometime ago, maybe it is of some help to people trying to figure this out.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi Arno,I was referring to Photoscenery Maker, and that proggy needs a pure watermask, not any new texture.The texture tiles will be auto generated and blended into DXT1:s via the Image Tool as soon as you have 1) the "mask" BMP and 2) its companion BMP ortophoto.Or do you mean the mask can be replaced in PSM by a single BMP = the ortophoto with an alphachannel?Bjorn

Share this post


Link to post
Share on other sites

Hi Bjorn,OK, did see that program mentioned in the origional question, so I missed that one :). In that case you are right of course, but for a general texture with an alpha channel this is an alternative approach.I never used PSM, so I can't comment on alternative approaches there.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest VSQ

Hi, guysFirst of all, congratulations for your tutorial, Arno.But, talking about photo scenery maker, it seems to me that the layers are a bit easy.BTW, how about Bjorn make a tutorial about water mask with layers?Regards,Val

Share this post


Link to post
Share on other sites

When time permits I might can put something together :)It is pretty easy, but I believe a lot have struggled with the design of the watermasks so it might be needed since it is not an obvious thing and is not mentioned in the PSM Manual.B.t.w. you already might know that a super simple approach to the calibration is to use two arbitrary Google Earth coordinates withing the ortophoto - 2 point calibration :-)Best,Bjorn

Share this post


Link to post
Share on other sites
Guest VSQ

Hi, BjornHope you have time to do that.BTW, could you explain how to flatten a water mask BMP ?Regards,Val

Share this post


Link to post
Share on other sites

I do not quiet understand what you mean by "flatten a watermask"?There is, as I see it, no need for that as the photo scenery is "terrain following" and the watermask is just used to make areas with FS default water in them.Or maybe you want to flatten a part that is covered by the photo?That is easy - either use a "flatten polygon" or write a "flatten switch" in FS9 scenery.cfg that has the wanted boundaries for the "flat area" e.g. an airport.For the latter I have seen a program recently in AVSIM file library that can make the flatten switch maybe even more easy by "slewing".I have not tested it myself.Bjorn

Share this post


Link to post
Share on other sites
Guest VSQ

Hi, BjornI'm refering to your statement on reply 4: >>The layer method is by far the best approach since you can select the water areas with the magic wand tool and then fill the same area directly on the new "layer" and finally delete the background (photo), flatten the BMP and save it.>>What do you mean >>flatten the BMP>>?Regards,Val

Share this post


Link to post
Share on other sites

That is just a PSP (Paint Shop Pro) expression.When you have a multilayerd picture (the Ortophoto BMP + the new layer) you have to "flatten" e.g. merge all layers with the background before you can save the result to a BMP.Same in this case - after deleting the "background" you only have the "layer" left so it needs to be "flatten" in PSP before you can save the result to a BMP.Bjorn

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