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

FSXA Photoreal blend mask issue

Messages
293
Country
us-virginia
I've been following a couple of tutorials on making photoscenery usins FSBuilderX, but I have run into issues with the blend mask not being recognized. I have modified my .inf file to look like this:

[Source]
Type = MultiSource
NumberOfSources = 5

[Source1]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "L18X106485X106519Y199926Y199983_su.bmp"
Variation = July,August,September,January
NullValue =
SamplingMethod = Gaussian
ulyMap = 39.2375716111111
ulxMap = -106.882553111111
xDim = 2.68221106150784E-06
yDim = 2.07790798611134E-06

[Source2]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "L18X106485X106519Y199926Y199983_sp.bmp"
Variation = April,May,June
NullValue =
SamplingMethod = Gaussian
ulyMap = 39.2375716111111
ulxMap = -106.882553111111
xDim = 2.68221106150784E-06
yDim = 2.07790798611134E-06

[Source3]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "L18X106485X106519Y199926Y199983_fa.bmp"
Variation = October,November
NullValue =
SamplingMethod = Gaussian
ulyMap = 39.2375716111111
ulxMap = -106.882553111111
xDim = 2.68221106150784E-06
yDim = 2.07790798611134E-06

[Source4]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "L18X106485X106519Y199926Y199983_wi.bmp"
Variation = December,February,March
NullValue =
SamplingMethod = Gaussian
ulyMap = 39.2375716111111
ulxMap = -106.882553111111
xDim = 2.68221106150784E-06
yDim = 2.07790798611134E-06

[Source5]
Type = TIFF
Layer = None
SourceDir = "."
SourceFile = "L18X106485X106519Y199926Y199983_B.tif"
SamplingMethod = Gaussian
ulyMap = 39.2375716111111
ulxMap = -106.882553111111
xDim = 2.68221106150784E-06
yDim = 2.07790798611134E-06

[Destination]
DestDir = "."
DestBaseFileName = "PhotoKASE"
DestFileType = BGL
LOD = Auto
UseSourceDimensions = 1
CompressionQuality = 85

My photoscenery does show up in FSX but the blend mask is absent, so my entire photo selection shows. Any help is appreciated.

Todd
 
I think you need to add the following to each of your [sourceX] sections (except for [source5]:


Channel_BlendMask= 5.0 // (5.0 means use [source5] as the blendmask)


Also try
NullValue= ,,,,0

I've only done it this way once so beware :) . Usually I embed the water and blend masks into the main source as alpha channels, in the one case I couldn't keep my exported .tif under the 2gb limit without using the separate blend mask.

Jim
 
Jim,

Thanks for the help. The changes you recommended worked somewhat. Now, my problem is the mask physically appears on top of my photoscenery - i.e. the immediate area around my airport is black!

Here's how I made my mask in Photoshop: Made a new layer on top of my photoscenery, in that new layer I drew a polygon around the area of my photoscenery that I want to be visible. I then clicked Selection/Inverse from the menu so that the area around my section of interest was selected. Using the paint bucket tool, I painted that area black. I then introduced a Gaussian blur to get a gradual transition. I hid my photoscenery image so as to only have the mask visible. I flattened the image, discarding all other layers, then saved as a TIF file. Am I missing something? Like I said the blend mask physically appears on top of my photoscenery, rather than blending my photoscenery with the default scenery as it is supposed to. At least the mask is included with the changes, but now I need the mask to do what it is supposed to do.

Todd
 
Hi,

The area that has to show the photoreal background needs to be white. The area that has to show the default landclass needs to be black.
The TIF needs to be 8-bit greyscale LZW compressed.
 
Here's how I made my mask in Photoshop: Made a new layer on top of my photoscenery, in that new layer I drew a polygon around the area of my photoscenery that I want to be visible. I then clicked Selection/Inverse from the menu so that the area around my section of interest was selected. Using the paint bucket tool, I painted that area black. I then introduced a Gaussian blur to get a gradual transition. I hid my photoscenery image so as to only have the mask visible. I flattened the image, discarding all other layers, then saved as a TIF file.

So you ended up with basically a white image with a black ring around the edges? That should have worked, as robystar mentioned it needs to be 8 bit grayscale (Image > Mode > Grayscale after you've flattened the image).

LZW compression is a popular myth however, it serves no purpose except to triple the resampling time so just use compression: None when you save a .tif.

Proof for that from a conclusive test:

65S_03_WGS84_SU.tif, 17899 x 11851px 809Mb
No compression:
Elapsed time: 00:04:42
282 sec
BGL = 230 MB (241,483,776 bytes)

65S_03_WGS84_SU.tif, 17899 x 11851px 417Mb
LZW compression:
Elapsed time: 00:11:31
691 sec
BGL = 230 MB (241,483,776 bytes)


Other than that I see that I have NullValue = ,,,,0 in my blend [Source] so try adding that to [Source5]

[Source5]
Type = TIFF
Layer = None
SourceDir = "."
SourceFile = "L18X106485X106519Y199926Y199983_B.tif"
NullValue = ,,,,0
SamplingMethod = Gaussian
ulyMap = 39.2375716111111
ulxMap = -106.882553111111
xDim = 2.68221106150784E-06
yDim = 2.07790798611134E-06

Jim
 
No, my photoreal image displays wherever there is white on my blend mask. The problem is it has a visible black mask around it. I thought whatever was black on my mask would show up in FSX as the surrounding default scenery.

I'll try adding the null = ,,,,0 to my Source5 and see what happens. No tutorial I have seen says to do that, however.

Todd
 
Maybe it's not necessary, I was just comparing my one and only .inf that uses a separate blend source to yours and noticed mine had NullValue = ,,,,0 and yours didn't. Make sure you get the 8 bit grayscale thing taken care of, that's probably the issue.

Jim
 
I would try it but resample.exe now isn't working. When I drag the inf file over it I get an error massage and then the app closes. It was working just fine yesterday....?????
 
Can you read the error? Did something get messed up in the .inf? Filename changed or anything?

You can run resample from a command prompt which will cause the window to stay open so you can read what the error is. If you right click the folder containing your .inf while holding the shift key down you can select "open a command window here". Then in the DOS window right click and paste:

resample myinf.inf

Of course change "myinf.inf" to whatever the filename of your .inf is, and that also assumes you have a copy of resample.exe in the folder with your .inf. If resample.exe is elsewhere you need to put the path in the command like so:

"C:\path\to\resample\resample.exe" myinf.inf

Jim
 
Hi Todd:

You're in good hands with Jim's sage advice. :cool:


But, if working with Windows Command (aka "CMD", aka "DOS") mode text-based syntax is much too unfamiliar territory, I'll offer a suggestion for a handy GUI-based utility which I find convenient to review what takes place during various FS development-related compile procedures:

Arno's excellent "CompileHelper 2.0":

http://www.fsdeveloper.com/forum/downloads.php?do=file&id=75

Once the path to FSX SDK Resample and any other applicable SDK or 3rd party compilers is added to the CompileHelper info fields in its GUI, one merely uses the Windows Explorer file manager (aka "Computer" or "My Computer") to Drag-N-Drop one's ex: *.INF file onto CompileHelper ...rather than directly onto ex: Resample.

After a (attempted) compile procedure, the FSX SDK Resample and any other applicable SDK or 3rd party compilers output text messages (for either successful compilation or various errors etc.) are retained in the CompileHelper window for subsequent review for as long as that instance of one's CompileHelper task session is left open in Windows.


Hope this helps ! :)

GaryGB
 
Last edited:
A big thanks to all of you. I did what Jim suggested and this is the error I get:

Unable to open data source E:.........\L18X106485X106519Y199983_B.bmp
Needs to be 24 or 32-bit.

That is my blend mask. I tried saving as a bmp file because saving as a TIF file wasn't working. Well, I guess bmp files need to be a certain size to work.

So, I tried my blend mask TIF file (grey-scale 8-bit) instead and I get this message:

TIFFReadDirectory: Warning, E:........L18X106485X106519Y199983_B.tif: wrong data type 1 for "XMLpacket"; tag ignored.
TIFFReadDirectory: Warning, E:........L18X106485X106519Y199983_B.tif: unknown field with tag 34665 (0x8769) encountered.
 
OK, everything is working now. I resaved my blend mask.psd file as a TIF with no alpha channels and no layers, 8-bit grayscale. Ran my inf file through resample.exe and, although I got the same message above, it works in FSX just fine now. Now I just need to tweak my seasons a little more, add some snow, create ground textures, model and texture buildings,........... :eek:

I appreciate all the help, guys. I'm sure I'll be back soon for something else. :D

Todd
 
TIFFReadDirectory: Warning, E:........L18X106485X106519Y199983_B.tif: wrong data type 1 for "XMLpacket"; tag ignored.
TIFFReadDirectory: Warning, E:........L18X106485X106519Y199983_B.tif: unknown field with tag 34665 (0x8769) encountered.

I get that error every time I resample a PhotoShop saved .tif. I've seen where others have mentioned the same, it never seems to affect the outcome, I've gotten so used to it I don't even see it anymore, lol.

Glad to hear that you got it sorted :)

Jim
 
Back
Top