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

P3D v3 Blend mask not working

Messages
1
Country
netherlands
I recently found some tutorials on photorealistic scenery design, and thought I'd give it a go. I decided to start with a small airport (Eindhoven Airport, EHEH), since it has just one runway and not too many taxiways. I got as far as creating a water and blend mask (even though the water mask is useless 'cause I decided to cut out the water in the blendmask..). Then I made the INF file, dropped that into resample.exe and it started working. However, when I copy the .bgl file to my scenery folder and add the area in P3D, it'll show all the photoreal scenery (as in, the full square I selected in SBuilderX), in stead of the parts of the image I left white. I've gone over the tutorial a few times, and I'm pretty sure I'm doing the right thing. What am I doing wrong? My INF file is as follows:
[Source]
Type = MultiSource
NumberOfSources = 2

[Source1]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "EHEH-PH1.BMP"
Variation = All
ulyMap = 51.4651303853649
ulxMap = 5.35446166992187
xDim = 5.36441802978496E-06
yDim = 3.34307973233591E-06

Channel_BlendMask = 2.0

[Source2]
Type = BMP
Layer = None
SourceDir = "."
SourceFile = "EHEH-PH1_Blendmask.bmp"
SamplingMethod = Gaussian
ulyMap = 51.4651303853649
ulxMap = 5.35446166992187
xDim = 5.36441802978496E-06
yDim = 3.34307973233591E-06

[Destination]
DestDir ="."
DestBaseFileName = "EHEH-PH1"
DestFileType = BGL
LOD = Auto
UseSourceDimension = 1
CompressionQuality = 85

This are the two BMP files
http://i.imgur.com/7uBNfq2.png?1 (had to take a screenshot of it because I can't upload BMP files, but you get the idea hopefully).

Where am I going wrong?
 
Messages
122
Country
canada
Blend mask has to be TIF image not BMP
Well atleast according to tutorials i used to learn and most of them name it with xxx_B.tif that is I think info for sbuilderx only so maybe it doesn't matter when you make your own inf file and drop it directly on resample.exe, but the TIF file type might be important...
I just started with it do not a pro by any means but it's working good for me
 
Last edited:
Messages
455
Country
us-florida
I have a similar situation with my blendmask not having any effect. I was using my blendmask as a .bmp, and then tried @AndyCYXU's suggestion about saving it as a .tif, but then when I try to compile it with reasample.exe, reasample opens for a fraction of a second, and then closes. No BGL was made. I see this here: http://www.fsdeveloper.com/forum/threads/problem-to-create-blend-mask.433852/#post-708545, if this even has anything to do with it. I was using Photoshop, not GMIP. Does it have to do with the options I chose when I exported the .tif file? This is what I chose:

upload_2017-9-13_19-56-28.png


Will these options work?

Thanks in advance.
 

Rotornut44

Resource contributor
Messages
635
Country
us-florida
I recently found some tutorials on photorealistic scenery design, and thought I'd give it a go. I decided to start with a small airport (Eindhoven Airport, EHEH), since it has just one runway and not too many taxiways. I got as far as creating a water and blend mask (even though the water mask is useless 'cause I decided to cut out the water in the blendmask..). Then I made the INF file, dropped that into resample.exe and it started working. However, when I copy the .bgl file to my scenery folder and add the area in P3D, it'll show all the photoreal scenery (as in, the full square I selected in SBuilderX), in stead of the parts of the image I left white. I've gone over the tutorial a few times, and I'm pretty sure I'm doing the right thing. What am I doing wrong? My INF file is as follows:

This are the two BMP files
http://i.imgur.com/7uBNfq2.png?1 (had to take a screenshot of it because I can't upload BMP files, but you get the idea hopefully).

Where am I going wrong?

Do as Andy mentioned above. Be sure that your Blendmask is a flattened (no layers or transparency) grayscale Tiff file. I would recommend exporting it with Gimp, as that seems to be the best program for compiling Tiffs. Photoshop sometimes fails to export the headers correctly. (although normally this doesn't pose an issue)
 
Messages
455
Country
us-florida
I was following this tutorial: https://www.flightsim.com/vbfs/showthread.php?250762-How-to-create-photoreal-scenery-for-FSX, but the only thing I did different was I was using Photoshop instead of GIMP. When I saw @AndyCYXU 's message, I exported it as a TIFF from Photoshop, but that did not work with resample. Then when I saw @christopherbritton 's message, I used GIMP to open the PSD I saved with Photoshop, and then exported my blendmask as a TIFF from GIMP. That worked with resample, but there still was no effect in the sim.

Any other ideas on this?

Thanks
 
Messages
7,450
Country
us-illinois
Hi Caleb:

Open the BGL output by SDK Resample in SDK TMFViewer, and let us know if it is visible; if it is, you need to post here in this thread, your "multi-source" INF file that you used with SDK Resample for inspection / troubleshooting. :pushpin:



If you prefer to proofread your work-flow first prior to posting the requested info, you may wish to review this thread ...and the linked tutorials it cites: :idea:

http://www.fsdeveloper.com/forum/th...-scenery-achievable.440912/page-2#post-781225


BTW: For further future discussion related to this 'type' of specialized terrain-specific topic, assuming you created this custom photoreal aerial imagery BGL via SBuilderX, IMHO, this would be more appropriately posted as a separate thread in the SBuilderX forum: ;)

http://www.fsdeveloper.com/forum/forums/ground2k4-sbuilder-sbuilderx.33/


...and if instead, you manually created the INF and compiled without using the provided compile feature in SBuilderX, you may instead wish to post this in the FSX Terrain forum:

http://www.fsdeveloper.com/forum/forums/fsx-terrain.77/


GaryGB
 
Last edited:
Messages
455
Country
us-florida
Hi GaryGB,

Thanks for the info. This is what my scenery looks like in GIMP:

upload_2017-9-18_13-22-44.png


And this is what the BGL looks like in TMF viewer after I have compiled it:

upload_2017-9-18_13-23-38.png


Attached is my inf file as a TXT file since I can't upload INF files here.

Thanks
 

Attachments

  • x10_area_inf.txt
    1 KB · Views: 445
Messages
7,450
Country
us-illinois
Hi Caleb:

Before you exported your Blend Mask as a TIFF file, did you activate GIMP's 'Grayscale' mode ?

That will convert the image into a 8-Bit gray-scale Blend Mask (which is much smaller than a 24-bit color image)

https://docs.gimp.org/2.9/en/gimp-image-convert-grayscale.html


Before you exported your Water Mask as a TIFF file, did you activate GIMP's 'Grayscale' mode ?

That will convert the image into a 8-Bit Black + White Water Mask (and is very much smaller than a 24-bit color image)



[EDITED]

NOTE: Final output source file format for TIFF Masks must actually be 8-Bit gray-scale; see:

http://www.fsdeveloper.com/forum/th...-scenery-achievable.440912/page-4#post-789447

[END_EDIT]


Pending your reply to those questions, I shall post more info in a reply here tomorrow (Tuesday) morning afternoon. ;)


[EDITED]

For this to 'work', you must first convert the Blend Mask and Water Mask as described above; then:


You must copy the:

* 8-Bit gray-scale Blend Mask to a new file name: "x10_area_blendmask_B.tif"

* 8-Bit Black + White Water Mask to a new file name: "x10_area_watermask_W.tif"


You must perform these edits on your own INF file:

* Change [Source1] and [Source2] Type =TIFF

* Edit Blend Mask to add a _B suffix

* Edit Water Mask file names to add a _W suffix

...so that it reads:

[Source]
Type = MultiSource
NumberOfSources = 3

[Source1]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "x10_area_original.bmp"
; Variation = January, February, March, April, May, June, July, August, September, October, November, December

; NOTE: Include one of these "Variation" parameter value statements (remove semi-colon at the start of line only)

Variation = All ; <--- Use if Night (aka "LightMap") texture with a "_LM" file name suffix is NOT also used

; Variation = Day ; <--- Use if Night (aka "LightMap") texture with a "_LM" file name suffix IS also used

Channel_BlendMask = 2.0
Channel_LandWaterMask = 3.0
ulyMap = 26.7112669135158
ulxMap = -80.6884002685547
xDim = 2.68220901489329E-06
yDim = 2.3961911301253E-06

[Source2]
Type = TIFF
Layer = None
SourceDir = "."
SourceFile = "x10_area_blendmask_B.tif"
SamplingMethod = Gaussian
ulyMap = 26.7112669135158
ulxMap = -80.6884002685547
xDim = 2.68220901489329E-06
yDim = 2.3961911301253E-06

[Source3]
Type = TIFF
Layer = None
SourceDir = "."
SourceFile = "x10_area_watermask_W.tif"
SamplingMethod = Gaussian
ulyMap = 26.7112669135158
ulxMap = -80.6884002685547
xDim = 2.68220901489329E-06
yDim = 2.3961911301253E-06


[Destination]
DestDir = "."
DestBaseFileName = "x10_area"
DestFileType = BGL
LOD = Auto
UseSourceDimensions = 1
CompressionQuality = 100

In ex: NotePad, remember to save as file type: All files (*.*) to allow saving with a *.INF (NOT *.TXT) file extension. :pushpin:


Try this procedure in a manually-compiled session using FS / P3D SDK Resample; let me know how this works for you. :)

[END_EDIT]

GaryGB
 
Last edited:
Messages
455
Country
us-florida
Thanks GaryGB. I have tested it and it has worked. But inverted. Everywhere I have drawn a blendmask I see my scenery, but everywhere I have not drawn a blendmask I see the underlying scenery.

Any ideas on how to fix this?

Thanks very much in advance.
 

Rotornut44

Resource contributor
Messages
635
Country
us-florida
Thanks GaryGB. I have tested it and it has worked. But inverted. Everywhere I have drawn a blendmask I see my scenery, but everywhere I have not drawn a blendmask I see the underlying scenery.

Any ideas on how to fix this?

Thanks very much in advance.

Caleb,
Remember, in a blendmask: Black=Exclude and White=Visible. Depending on how your blendmask it set up, you may be able to invert the colors in Gimp/PS to easily fix the problem. More complex blends may yield an undesired result with this method though.



You must copy the:

* 8-Bit gray-scale Blend Mask to a new file name: "x10_area_blendmask_B.tif"

* 1-Bit Black + White Water Mask to a new file name: "x10_area_watermask_W.tif"

I don't mean to take away from the OP, but just out of curiosity, is there any specific reason other than file size that you recommend a 1-Bit Indexed Tiff (watermask) over an 8-Bit Gray-scale, Gary?
I have always used the latter.
 
Messages
7,450
Country
us-illinois
Hi Chris:

IIRC, the TIFF format was recommended in latter versions of SDK documents for FSX, ESP and P3D to minimize risk for problems with end users having various popular graphics applications output BMP and other image files (with- or without- Alpha channels) ...which were not compatible with SDK Resample. :scratchch


However, I now adhere to the criteria of ACES' Terrain Lead Developer Adam Szofran and Luis Feliz-Tirado, cited in this interesting thread:

http://www.fsdeveloper.com/forum/threads/resample-error.427351/


Luis Feliz-Tirado, in a PTSIM forum thread, and in his subsequent "Make Photo-real Scenery" tutorial, also alluded to an option to use a higher "Bit-ness" color mask image provided specific RGB values are used for Blending and Masking.


CAVEAT: Be aware that color Mask files / layers, and SDK Resample source / output file sizes are huge ! :alert:


FYI: Maurizio Giorgi (aka "MaurizioG") of OzX (AussieX ?) and OrbX has a system for color Masking as discussed in these threads:

http://www.fsdeveloper.com/forum/threads/geotiff-blending.431787/

http://www.fsdeveloper.com/forum/threads/photoreal-ground-grass-everywhere.75338/

http://www.fsdeveloper.com/forum/threads/are-blend-masks-working-properly-in-p3dv2.433786/

http://www.fsdeveloper.com/forum/threads/resample-error.427351/


http://aussiex.org/forum/index.php?...gl-program/&page=3&tab=comments#comment-17284


Bearing in mind that one should not use a "NullValue" INF parameter value when a Blend Mask is being used in a multi-source INF, a 1-Bit Indexed (2) color B+W 8-Bit gray-scale Land-Water Mask and a 8-Bit gray-scale Blend Mask ...are an effective means to implement source and compiled BGL size reduction without also having used:

* LZW (non-lossy) source file compression in TIFF files, that can slow down a Resample compile session

...or:

* SDK Resample PTC compression of the output BGL file, that can affect visual display quality at run time in FS

[EDITED]

NOTE: Final output source file format for TIFF Masks must actually be 8-Bit gray-scale; see:

http://www.fsdeveloper.com/forum/th...-scenery-achievable.440912/page-4#post-789447

[END_EDIT]

Hope this helps with exploring options for implementing Masks with custom photo-real aerial imagery Land Class. :)

GaryGB
 
Last edited:
Messages
7,450
Country
us-illinois
http://www.fsdeveloper.com/forum/threads/blend-mask-not-working.435956/#post-782833

Thanks GaryGB. I have tested it and it has worked. But inverted. Everywhere I have drawn a blendmask I see my scenery, but everywhere I have not drawn a blendmask I see the underlying scenery.

Any ideas on how to fix this?

Thanks very much in advance.

Hi Caleb:

Was the PS "Mask" layer an originally an all-white color Alpha channel in a TIFF, that was 'painted' over with pure Black (RGB 0,0,0) ? :scratchch

GaryGB
 
Last edited:
Messages
455
Country
us-florida
I had it in white, because the tutorial I was using said that it could be black or white. So when I changed the color to black it seemed as if there was a Blendmask over my entire scenery. In other words I couldn't see my scenery at all.

So then I simply drew white over all the areas that I wanted to see, and it worked. Thanks very much everyone for your time and help.
 
Top