P3D v4 Water Mask / Blend Mask / Gimp 2..I still don't get it

#1
I'm trying to create a photoreal scenery of my home airport - I am a noob at doing this as you'll see below. I've got a good base .BMP to work from, but after watching several youtube videos and reading several written articles on the subject, I still don't get it.

This is my original BMP file. I would like to show the three small lakes (circled below) with the sim water:
Original.JPG


Below is my water mask and saved out as .tif file
Watermask.JPG


Below is my Blend mask:
Blendmask.JPG



After compiling in SBuilderX the resulting BGL looks like the below in the sim (P3Dv4)
In_Sim_After_Compile.JPG


Basically, I am seeing the auto gen from the sim in my 3 lakes instead of the water. I'm not sure if my water mask is hosed or my blend mask. I am using Gimp 2 as my editor. I have seen several videos, one the author is using Photoshop and the other is using Gimp 2, but neither one of them I can actually go verbatim to get what I want. It might be that I don't know enough about the Gimp layering when I create the masks. Any help would be appreciated.
 

HolgerSandmann

Resource contributor
#2
Hi Robert,

anything painted in black in your blendmask will not be displayed as your photoreal source. Thus, removing the three black lake sections from your blendmask while leaving them in your watermask should give you the desired result, meaning displaying the lakes as they are in the image plus the P3D water surface effects. The only additional thing that might be needed is flatten polygons for those lakes (added in ADE) unless they also exist in the default landscape.

Cheers, Holger
 
#3
Hi Robert:

As you are now exploring advanced aspects of terrain scenery, you may wish to review the tutorials below, if you haven't done so already.

IMHO, the best photo-real imagery creation / Autogen annotation scenery tutorials for starters is these (2) by Luis Feliz-Tirado:

Make photo-real ground textures


File Description:
It is very easy to create your very own high-resolution, custom (photo-real) ground textures. This document explains the concepts and techniques and illustrates the use of SBuilderX with which you can quickly and easily download aerial images and make this type of scenery. So, why hesitate? Make Flight Simulator scenery as real as it gets! Very sorry - no support of any kind is offered. Please do not write. For any questions, please post in the Avsim Scenery Design Forum.

Filename: make_photo-real_ground_textures_in_fs_x.zip
License: Freeware
Added: 21st November 2009, 23:20:06
Downloads: 17714
Author: Luis Feliz-Tirado
Size: 2143kb

https://library.avsim.net/esearch.php?CatID=fsxsd&DLID=140539


Using the Autogen Annotator


File Description:
The Autogen Annotator is a powerful tool for modifying the autogen of default ground textures or adding autogen to custom (photo-real) ground. This document illustrates the use of the tool, and includes a pictorial guide to all autogen object types. Very sorry - no support of any kind is offered. Please do not write. For any questions, please post in the Avsim Scenery Design Forum.

Filename: using_the_autogen_annotator_264833.zip
License: Freeware
Added: 21st November 2009, 16:18:51
Downloads: 4220
Author: Luis Feliz-Tirado
Size: 8930kb

https://library.avsim.net/esearch.php?CatID=fsxsd&DLID=140537


You are likely to also encounter these topics at some point as well:


Terrain Design


File Description:
Terrain Design for Flight Simulator X

This simple illustrated document explains the basic concepts in Flight Simulator X terrain, and how to change them using SBuilder for FS X. Make new water bodies, roads, vehicle traffic, airport flattens, remove autogen, add more detail - anybody can do it easily and quickly.
My most sincere apologies - I am unable, for lack of free time, to offer support of any kind. For questions or problems, please post in the Avsim scenery design forum.

Filename: terrain_design_for_flight_simulator_x.zip
License: Freeware
Added: 14th December 2009, 13:29:15
Downloads: 16648
Author: Luis Feliz-Tirado
Size: 3991kb

https://library.avsim.net/esearch.php?CatID=fsxsd&DLID=141643


Some pertinent Autogen gotcha's, and a link to one of Luis Feliz-Tirado's 'unofficial' tutorials on Vector Autogen: "Fun With Lines":

https://www.fsdeveloper.com/forum/t...cally-the-ag_telephonepole.444845/post-818260


Also, a discussion on options for semi-automated scanning of imagery to create Autogen annotations:

https://www.fsdeveloper.com/forum/threads/detectfeatures-and-rectangular-vegetation.430935/



Your above Land / Water Mask as a *.JPG shows you have correctly used pure Black (RGB 0,0,0) to allow display of 'hydro' attributes.


Your above Blend Mask as a *.JPG shows you have correctly used pure Black (RGB 0,0,0) for transparency to allow display of 'hydro'- or 'land' attributes ONLY from Land Class terrain texture layers underlying your custom satellite imagery photo-real Land Class.


All other areas in pure White (RGB 255,255,255) will allow display of ONLY your custom satellite imagery photo-real Land Class.


NOTE: To gradually 'Blend' from from Land Class terrain texture layers underlying into your custom satellite imagery photo-real Land Class, rather than using pure White (RGB 255,255,255), one may instead utilize a 'gradient' of gray-scale steps between 'near-White' (RGB 254,254,254) and 'near-Black' (RGB 1,1,1) to enable variable transparency.

Generally speaking, Land Class terrain texture layers (with Autogen annotations, if any) underlying your custom satellite imagery photo-real Land Class textures will begin to show through to the top ...when "darker" gray-scale values less than (RGB 128,128,128) are used.

Generally speaking, Land Class terrain texture layers underlying your custom satellite imagery photo-real Land Class textures will begin to show through to the top (with NO Autogen annotations) ...when "lighter" gray-scale values greater than (RGB 128,128,128) are used.

However, as increasingly "lighter" gray-scale values greater than (RGB 128,128,128) are used, it will cause the Land Class underlying your custom satellite imagery photo-real Land Class textures ...to fade out, as the top custom photo-real imagery layer predominates.


As Luis Feliz-Tirado (aka "LFT") states in his tutorial linked above:

"Blend Mask
This is new to FS X - it will gradually fade out the custom texture so as to give better transitions to the default ground. The Blend Mask is a grayscale image, where pure white displays the custom textures and pure black is full transparency (and will display the underlying ground - or water!) All gray values in between will represent varying levels of transparency where the custom textures blend with the default ground.

You can use the Blend Mask to transition between custom land textures and default ground, or you can also use it to fade from your custom water to the default water.

The Blend Mask can be an additional channel in the TIFF or TarGA original image, or you can create a separate image and indicate this in the inf file."



PS: I see that Holger posted above as I was composing this reply. ;)

IIUC, the less complex method he describes above would eliminate the option to display a Water Class texture 'color' underneath the areas of your lakes; some developers find this an acceptable visual result in FS / P3D, especially with 'shore-less' inland water bodies.

FYI: To show a Water Class texture 'color' in the area of your lakes, would require you to have a CVX vector Water class texture 'color' polygon underneath the image of the lakes; this may- or may not- already be present in default Land Class terrain textures.

IIRC, use of a non-Pure Black gray-scale value somewhere between 'near-White' (RGB 254,254,254) and 'near-Black' (RGB 1,1,1) to enable variable transparency in your Blend Mask for the area of your lakes, would display both the satellite image with the Water Class 'color'.

AFAIK, you will otherwise only have a 'Hydro' attribute superimposed on top of your imagery for each lake, and you may find it more difficult in FS / P3D to see the 'Hydro' attribute except at certain angles of view relative to the Sun direction via the "specular" hydro attribute.

Regarding flattens for the lakes (if needed), these would be CVX vector Airport Boundary (Background) polygons with a flatten-only GUID:

{47d48287-3ade-4fc5-8bec-b6b36901e612} Flatten (ONLY)

https://www.prepar3d.com/SDKv4/sdk/world/terrain/terrain_overview.html#The Shp2Vec Tool

https://www.prepar3d.com/SDKv4/sdk/world/terrain/vector_shape_properties_guids.html


CVX vector terrain-type polygons can be created in ex: ADE, SBuilderX, or other FSX / P3D compatible scenery utilities.


I hope this info will also prove helpful to the learning process.

If you have further issues with the above display anomalies, please feel free to post the text from your SDK Resample *.INF file here. :)

GaryGB
 
Last edited:

=rk=

Resource contributor
#4
You can use your photo scenery to also represent water, you are not required to use class tiles. Simply use a water mask over the water and the blend mask only at the perimeter, where you want to blend to default.


 
#5
Hi again, Robert:

FYI: Older and current versions of PhotoShop and GIMP can output *.BMP / *.TIF files which are not fully compatible with SDK Resample.


For SDK Resample compatibility in source images output by PhotoShop and GIMP, ensure 'output' options meet the following criteria: :pushpin:


When Day / Seasonal variation "visible" source images are 'Saved' as a 24-Bit color *.BMP, configure the file format with:

* "Run Length Encoded" (aka "RLE") NOT checked

* "Do NOT write color space information" checked

* "24-Bits" (R8 G8 B8) 'ticked'


When Blend and Water Mask 'data' source images are 'Saved' as a 8-Bit gray-scale '(256)-color-step' *.TIF, configure the file format with:

* NO compression, whether FAX - CCITT 3, Huffman Encoding, LZW, PackBits etc.

* RGB NOT CMYK

* NO ICC sRGB Color Space Profile Embedded

* Optimized NOT Custom Palette


Hope this helps a bit more. :)

GaryGB
 
#7
Thanks for the help everyone! You guys rock. I removed the water areas from my blend mask above, resampled and water showed up in a least one of them along with a few trees. I will trying it until it sinks into my grey matter. Thank you for the links above @GaryGB I will look at those. In the mean time here is my .INF file:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Source]
Type = MultiSource
NumberOfSources = 3

[Source1]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "KTOC-PH1.BMP"
Channel_BlendMask = 2.0
Channel_LandWaterMask = 3.0
NullValue =
ulyMap = 34.6004327850445
ulxMap = -83.3052062988281
xDim = 5.36441802978516E-06
yDim = 4.41613536328976E-06

[Source2]
Type = TIFF
Layer = None
SourceDir = "."
SourceFile = "KTOC-PH1-B.TIF"
SamplingMethod = Gaussian
ulyMap = 34.6004327850445
ulxMap = -83.3052062988281
xDim = 5.36441802978516E-06
yDim = 4.41613536328976E-06

[Source3]
Type = TIFF
Layer = None
SourceDir = "."
SourceFile = "KTOC-PH1-W.TIF"
SamplingMethod = Gaussian
ulyMap = 34.6004327850445
ulxMap = -83.3052062988281
xDim = 5.36441802978516E-06
yDim = 4.41613536328976E-06

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

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Thanks again for your comments and suggestions.

Robert
 

=rk=

Resource contributor
#8
You should replace the dashes with underscores, as dashes are forbidden characters in other compilers, this version of Resample.exe may have been edited to accept them. I believe you are required to declare a null value. If you use pure white, a simple way to avoid all the bright red spots is to use the "replace color" function in your photo editing software and simply replace RGB 255, 255, 255 with 255, 255, 254.
 
#9
https://www.fsdeveloper.com/forum/t...gimp-2-i-still-dont-get-it.445375/post-822318

I removed the water areas from my blend mask above, resampled and water showed up in a least one of them along with a few trees. I will (keep) trying it until it sinks into my grey matter. Thank you for the links above @GaryGB I will look at those. In the mean time here is my .INF file:

(.INF file not included in quote)
Hi Robert:

IMHO, you're nearly there, so keep trying it until it 'sinks into the gray-scale of your Blend Mask'. ;)

If the Blend Mask is too 'transparent' (darker), it allows underlying layers of Land Class and Autogen to show on top. :pushpin:


You 'could' work also around this by adding an ExcludeAutogen attribute to the Flatten CVX vector polygon for the lakes, so that your resulting GUID would instead be:

Airport_Backgrounds_Flatten_ExcludeAutoGen {18580A63-FC8F-4A02-A622-8A1E073E627B}


I agree it would be prudent to change hyphen (dash) characters in filenames to underscore (underline) characters.


I would additionally suggest that you try these changes in your *.INF file: :idea:

LOD= 6,AUTO

CompressionQuality = 100


BTW: I believe most FS Developers recommend NOT using NullValue if a Blend Mask is utilized in a source data set

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


Some related threads on that sub-topic, including some that detail the work-around that Rick alludes to above:

https://www.google.com/search?source=hp&ei=g8vdXPLBKOSV0gLSqpyQCg&q=site:www.fsdeveloper.com+GaryGB+NullValue+Blend+Mask+Red&oq=site:www.fsdeveloper.com+GaryGB+NullValue+Blend+Mask+Red&gs_l=psy-ab.12...3633.31328..32497...0.0..0.218.4221.13j23j2......0....2j1..gws-wiz.....0.qJUriKBUy1g


Hope this further helps with fine-tuning your scenery project. :)

GaryGB
 
Last edited:
Top