• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Watermask and blend help needed

Messages
5
Country
newzealand
Hi all

I've been pounding my head to understand the sdk Geotiff methods
I have some amazing scenery for Northland in New Zealand which you can see here http://picasaweb.google.com/nzcoaster

I have no problem creating aerial photo scenery but I am coming unstuck with how to make a water mask and blend

so far I understand the watermask to be black and white areas only and the blend to be greyscale. Both 8bit and in my case geotiffs.
I am confused by the sdk refering to channels and do they need to be added into the inf

Channel_BlendMask = 2.0
Channel_LandWaterMask = 3.0

What does the 2.0 and the 3.0 in the channels refer to?

Also am I right in saying that it is possible to create one bgl that has all the color aerial, alpha and blend incoporated or do these other (Alpha and Blend become seperate bgls (sorry about my confusion)

If anyone can give me a good steer in the right direction I would appreciate it
a sample inf or mini project would be great.

Thanks for your time
Regards
Greg
 
Hi GReg.

Thanksgiving today here in the US, so I can't test this today:

I think your alpha can be one channel added to the targa or tiff. It should be an 8-bit greyscale, and black is water, image is white, ... the rest is blend.

In this way you have one image for resample.

Dick
 
greg, don't overthink it. Use this example inf and imitate. you end up with a single bgl with the blend and water included, unless you instruct it to make multple bgls for vast areas. This example comes directly from the sdk, btw.

B

__________________________________________________________

; Resample INFormation file
; Variations test with land/water and blend masks pulled from multiple files.

[Source]
Type = MultiSource
NumberOfSources = 4

[Source1]
Type = BMP
Layer = Imagery
SourceDir = "SourceData"
SourceFile = "variation1.bmp"
ULXMAP = -122.308
ULYMAP = 0
XDIM = 4.27484E-05
YDIM = 4.27484E-05
Variation = Day

; pull the blend mask from Source3, band 0
Channel_BlendMask = 3.0

// pull the land/water mask from Source4, band 0
Channel_LandWaterMask = 4.0

[Source2]
Type = BMP
Layer = Imagery
SourceDir = "SourceData"
SourceFile = "variation2.bmp"
ULXMAP = -122.308
ULYMap = 0
XDIM = 4.27484E-05
YDIM = 4.27484E-05
Variation = Night
Channel_BlendMask = 3.0
Channel_LandWaterMask = 4.0

[Source3]
Type = TIFF
Layer = None
SourceDir = "SourceData"
SourceFile = "BlendMask.tif"
ULXMAP = -122.308
ULYMap = 0
XDIM = 4.27484E-05
YDIM = 4.27484E-05
SamplingMethod=Gaussian

[Source4]
Type = TIFF
Layer = None
SourceDir = "SourceData"
SourceFile = "LandWaterMask.tif"
ULXMAP = -122.308
ULYMap = 0
XDIM = 4.27484E-05
YDIM = 4.27484E-05
SamplingMethod=Gaussian


[Destination]
DestDir = "Output"
DestBaseFileName = "MultiChannel_MultiSource"
UseSourceDimensions = 1
 
Water Mask and Blend Help needed

Bob, I have the same general problem as nzcoaster and have a post in AVSIM.

I used the SDK example as a base and went off the rails somewhere.
 
Im also having some issues- Im making scenery for islands.

My problem is- If i use 'nullvalue' i get pieces of the default shoreline showing through so ive abandoned that approach.

I cant seem to get the 'Landwatermask' to work either.....It either shows up black where water should be, water where land should be or it just doesnt compile.

My workflow avoids a graphics package altogether (so i can use geotiffs- when you edit a geotiff it looses its geotiff tags)
 
Ok - ignore my last post....focus on this one instead :)

Im exporting two images of an Island from ArcGIS
The first image contains the actual photo of the island but the boundary extends out to include the sub-surface features that i want to show through the water effect. The boundary of this is limited by a uniform colour which is then removed using the 'nullvalue' in the inf file

The second image is the land/water mask and this has its black/white boundary around the actual shoreline of the island.

The effect im wanting is to have
1) The photo land texture defined as land
2) The photo water texture between the shoreline and the 'edge' of the photo texture (defined by 'nullvalue' in the 1st image) defined as water with the photo texture showing underneath
3) The areas of 'nullvalue' on the first image to show the default water

In effect this should be similar to a blendmask but without out using a separate blend image.


It compiles Ok but the result i get is

1) Photo land texture as land = OK
2) Photo water texture as water/image = OK
3) The 'Nodata' part of the first image appears to show the landwater mask (i.e. Solid Black) instead of the default water = Not OK

It appears that the 'no data' area on the first image creates a 'hole' but that 'hole' doesnt go through the second image...that is why it shows black (the colour of the water mask underneath)

Any help would be appreciated!!!

*I had a thought that maybe the order of the images in the .inf file might make a difference but i havent been able to test this yet (i.e. put the water mask 1st in the .inf file)

Cheers
ResampleProblem.jpg
 
Last edited:
Sweet- ive found the solution- it appears you MUST use a blend mask in this situation. The UseNullValue was confusing the resampler by the looks of it

My solution was three images exported from ArcGIS
1) The actual image of the island
2) The land/water mask generated from a digitised polygon (coloured black and white for water and land)
3) A Blend mask created by buffering the shoreline polygon using about 15 concentric buffer polygons at 10m each. I then colour these buffer rings as a greyscale colour ramp and export the image from ArcGIS

Cheers
 
One thing I found is that if the blending channel is black (0), then you don't need the water mask, at least if there is a hydro vector poly defined. I don't know about the case of a "gray" blend.

scott s.
.
 
Hi Scott.

The LandWaterMask threw me for a bit. All it does is imparts a water "characteristic" to the photoreal mask area. This is unlike earlier versions of FS photoreal.

As you write, if you have a vector water polygon under the images, then a BlendMask value of 0 ( black ) will allow the FSX water to show comepletely through the 'hole'. The vector water poly can be oversized if elevation is not an issue, as the photoreal BlendMask trims to the water's edge. The waterclass will show through the 'hole'.

Dick
 
yep- The only reason i used the LandWaterMask is to exactly define the water areas on the photo. The default data is OK, but i wanted small coastal rocks to be defined as land etc (i.e. I used the LandWaterMask to replace the default data with very detailed shoreline info) You have to make sure your image + Blendmask totally covers the default data though as the default data will show though- This can look ugly
 
I´ve been trying to get this blendmask to work but no result. I want to remove the aerial(foto)water texture(so clean up the shore line,default water).
I´m focusing on the NoData = ,,,,0 but when I compile a geotiff with black, it shows the black and when I use the ad a mask option(in photoshop) it shows out white..
How do u add the NoData?
Now I add a channel,fill it with white, and brush some black,...I work in RGB colors,8bit, the example also does,(I´ve tried in greyscale modus).I work with tif.This method has no visual result.
When looking at the milleniumimage_water_blend in explorer it is in BW, mine is in color...
Now I´m trying with land_water_mask, I hope this gives result
Some guidance would be nice and good for my moral :)
This holds my work ...

Thx
 
Last edited:
Hi abckurt.

Is your source geotiff an image with one or more alphachannels? Or are you using separate images for watermask and blendmask?

Also, why not show your INF file?

Here's what you need to remember:

Anything you want to NOT show as photoreal, needs to be set with a blendmask... this includes default water and land. You can "blend" holes in the photreal to allow default water and land to show through.

Any part of the photoreal image you wish to behave as water, while still showing as photoreal, needs to be set with a watermask.

Note that the:

NoData = ,,,,0

only helps with the resultant compression of the BGL... it doesn't "define" anything as far as the blendchannel, as 0 is already a hole.

Also note, the "millenniumimage_water_blend.tif" has 2 alphachannels... #1 is the watermask which makes the photreal water behave as water... and a #2 alphachannel that is the blendmask for the edge of the image.

If you had an image with a single alphachannel, which you would like to use as a blend ( with black as a hole to allow default water to show through ) then you need to put this in your SOURCE section of the INF file:

Channel_BlendMask = 3

...then the single blendmask should allow black to be a hole for default water ( or land ) to show through.


Dick
 
rhumbaflappy,

Thanks for the help, it cleared out a few questions,about nodata and blendmask and landmask and best off al it works now!
If only U wrote the SDK documentation:)
 
Hi,

Could anyone give me the right INF file for blending?
I think I messed up the examples,...

So I have an single GEOTIFF file I want to blend..
It should be something like this..

[Source]
Type = GeoTIFF
SourceDir = "SourceData"
SourceFile = "Y3BL.TIF"
Layer = None
Variation = Day
Channel_BlendMask = 3


[Destination]
DestDir = "Output"
DestBaseFileName = "Y3bl"
DestFileType = BGL
LOD = Auto

Thx
 
Kurt -- when you say a single GeoTIFF you want to blend, do you have just one image with the blend as an alpha channel?
I tend to keep things separate, so that I have a separate GeoTIFF for aerial, water mask and blend. The Multi-source example works like that.

With more than one image, your inf would look like this:

[Source]
Type = MultiSource
NumberOfSources = 2

[Source1]
Type = GeoTIFF
SourceDir = "SourceData"
SourceFile = "Y3BL.TIF"
Layer = Imagery
Variation = Day
Channel_BlendMask = 2.0

[Source2]
Type = GeoTIFF
Layer = None
SourceDir = "SourceData"
SourceFile = "YourBlendMask.tif"
SamplingMethod = Gaussian

[Destination] etc.


If you add a watermask, then NumberOfSources=3 etc.
The Channel_BlendMask value is the Source number, I think you can also point to an alpha channel with the fractional bit -- that is, if you had a Blend mask with the Water mask added as an Alpha Channel, then you might end up with:

Channel_BlendMask = 2.0
Channel_LandWaterMask = 2.1


...but I've never done this, so I can't be entirely sure.
In my case, since I start with 3 separate image files, I normally have this:

Channel_BlendMask = 2.0
Channel_LandWaterMask = 3.0
 
Thx,

I've tried several ways but I don´t get it to work:mad:
I´ve already made some scenery in FSX but I sadly forgot to make my own tuturial and forgot to save my Internet Favourites where I found a great tuturial for sattelites in FS2004,with blending,..(the poor life of an amateur)
When blending can I use jpeg or png or tif? I have to save with alphachannels I remember and I don'´t remember to have a seperate blendmask, it was one file.
Maybe someone has this link for me or a tuturial,..
And the right inf. file.
OK, I've found it, I think it is Channel_BlendMask = 3 in stead of Channel_BlendMask = 3.0
Sorry for the whining.

Thx
:blackcat:
 
Last edited:
Back
Top