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

Blend mask and NullValue becomes black?

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,347
Country
netherlands
Hi all,

I'm having a small issue with resample. I am trying to compile a photo scenery that has a blendmask as well. So I use the INF file below. But when I set the NullValue so that a zero in the blend mask is considered to be NULL, I do get black output in the area that should be masked (see the screenshot below). What am I doing wrong here?

Code:
[Source]
Type = MultiSource
NumberOfSources = 2
[Source1]
Type                = GeoTIFF
SourceDir           = "."
SourceFile          = "img_0.tif"
Layer               = Imagery
Variation           = Day
Channel_BlendMask   = 2.0
NullValue           = ,,,,0
[Source2]
Type                = GeoTIFF
SourceDir           = "."
SourceFile          = "bmask_0.tif"
Layer               = None
SamplingMethod      = Gaussian
nBands              = 1
SampleType          = UINT8
[Destination]
DestDir             = "C:\dev\astofra_vearth\Tests\data\scenProc\out"
DestBaseFileName    = "resample_simple_mask"
DestFileType        = BGL
LOD                 = Auto
CompressionQuality  = 85

1570263434917.png
 
Hi,

Of course just after posting here I found it. I needed to add the NullValue in the blend mask as well, see the INF below:

Code:
[Source]
Type = MultiSource
NumberOfSources = 2
[Source1]
Type                = GeoTIFF
SourceDir           = "."
SourceFile          = "img_0.tif"
Layer               = Imagery
Variation           = Day
Channel_BlendMask   = 2.0
NullValue           = ,,,,0
[Source2]
Type                = GeoTIFF
SourceDir           = "."
SourceFile          = "bmask_0.tif"
Layer               = None
SamplingMethod      = Gaussian
nBands              = 1
SampleType          = UINT8
NullValue           = 0
[Destination]
DestDir             = "C:\dev\astofra_vearth\Tests\data\scenProc\out"
DestBaseFileName    = "resample_simple_mask"
DestFileType        = BGL
LOD                 = Auto
CompressionQuality  = 85
 
Indeed, there are a number of 'tricks and traps' one must recall and use when combining a Blend Mask with a *.INF NullValue parameter value to either specify removal of a particular color, or to assign a NO_DATA attribute to pixel arrays.

For most FS Developers those permutations are rather daunting (and AFAIK, most apparently do not attempt that process).

For those that wish to try doing what Arno is testing, here is a link to some pertinent info:

https://www.fsdeveloper.com/forum/threads/changing-null-value-in-sbuilderx-inf-file.427714/

BTW: Arno, do you also edit the default BGL compression level from 85 back up to 90 percent as Holger does to minimize banding in gradient / feathered transitions of water areas, or do you use Floyd-Steinberg dithering on the 8-Bit grayscale TIFF BlendMask ?

GaryGB
 
Last edited:
Back
Top