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

Help with water mask.

Messages
9
Hi,

I wonder if someone could give me some help with creating a water mask ini file.
In the past I have always relied on FSResample to do the hard stuff but that is not set up for FSX resolution. So far I have created a 8 bit Black/white image as I have done in the past but saved it as a Tiff rather than BMP. I have copied ini files from various examples but without sucess, the resampler ignores the file. This is what I have currently tried to use.

[Source]
Type = MultiSource
NumberOfSources = 2

(Source1)
Type = BMP
SourceDir ="C:\Documents and Settings\Sharyn\My Documents\My Pictures"
SourceFile = "nr29_5K_0509.bmp"
Layer = Imagery
ulxMap = 175.0504500
ulyMap = -39.9978992
xDim = 8.752E-6
yDim = 7.363E-6
Channel_LandWaterMask = 3.0

(Source2)
Type = Tiff
SourceDir ="C:\Documents and Settings\Sharyn\My Documents\My Pictures"
SourceFile = "nr29_5K_0509w.tif"
Layer = None
ulxMap = 175.0504500
ulyMap = -39.9978992
xDim = 8.752E-6
yDim = 7.363E-6

[Destination]
DestDir = "E:\output"
DestBaseFileName = "wanganuiwater1"
DestFileType = BGL
LOD = auto

I am not sure where the problem lies or whether FSX requires a different format for the B&W images but if anyone could let me know where I am going wrong I would really appreciate it.


kind regards

Peter.:)
 
Messages
1,089
The thing I notice here is Channel_LandWaterMask = 3.0
The watermask here is source 2 so should be 2.0?
 
Messages
9
Thanks Toprob,

That elliminates the Ini file as the problem, it must be the properties of the Black and White Tiff file as the Ini works fine if I substitute the originals with sample photos provided by the the resample program.

This has me baffled for as far as I can tell the photo properties are the same as the samples ie: Black 000, White 255 , 8 bit gray scale and Tiff. If anyone has the time to explain what is now required for a water mask photo for FSX that would really help.


regards Peter.
 
Messages
558
Country
newzealand
Im doing the same thing right at the moment....ive run it and it appears OK in tmfviewer but i cant check it in FSX until tonight.

Here is my inf file
[Source]
Type = MultiSource
NumberOfSources = 2

[Source1]
Type = GeoTIFF
Layer = Imagery
SourceDir = "Raw"
SourceFile = "Whale_wgs84_400dpi.tif"
Nullvalue = 85,255,0
Channel_LandWaterMask = 2.0

[Source2]
Type = GeoTIFF
Layer = None
SourceDir = "Raw"
SourceFile = "Whale_8bitgsMask.tif"
SamplingMethod = Gaussian

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


This runs OK
Image is a Geotiff (NZMG projection, reprojected 'on the fly' to WGS84 in ArcGIS) 24bit colour
Mask is a Geotiff (NZMG projection, reprojected 'on the fly' to WGS84 in ArcGIS) 8bit grayscale

Im using coloured polygons as boundaries to make sure everything aligns and so i can easily recreate scenery. Im slowly building a good database of vector data around my area of interest as well.
Hope this helps
 
Messages
9
Hi,

Sorry but the problem is definately with the photo, I am using Photoshop to create the image but the resampler can not read it for some reason (see attachment) I basically create a mask, paint the water area Black 000 and the invert it and paint the remainder white 255 255 255, convert to gray scale 8 bit and save as a Tiff. But it still don't work!

baffled Peter.
 

Attachments

  • Resample Display.jpg
    Resample Display.jpg
    69.3 KB · Views: 494
Messages
11
Country
brazil
Hi Petter,


Photoshop don't is able to create a GeoTIFF image, but a simple TIFF imagery, that does not have GeoTIFF georeferencing tags.

You need put in Source section the parameters which determines the image boundaries (Lat/Long) and (Xdim/Ydim).


I’m sorry my bad English!!

regards Hely
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,789
Country
us-wisconsin
Sorry but the problem is definately with the photo, I am using Photoshop to create the image but the resampler can not read it for some reason (see attachment) I basically create a mask, paint the water area Black 000 and the invert it and paint the remainder white 255 255 255, convert to gray scale 8 bit and save as a Tiff. But it still don't work!

I don't know why you would save the watermask as a TIFF. Just save it as a greyscale bitmap ( 8-bit ).

Dick
 
Messages
558
Country
newzealand
I don't know why you would save the watermask as a TIFF. Just save it as a greyscale bitmap ( 8-bit ).

Dick

A tiff is a bitmap.

Hely: you are correct that when you edit a geotiff its Georeferencing tags are lost but Peter has defined his coordinates and extents in his inf file. If the coordinates and extent information is incorrect, the file should still compile but will be in the wrong place.


(you may have been looking at my inf file when you replied??)


Is your Inf tag correct? There are actually two types of tif file (.tiff and .tif)....try changing the tag to Type = tif .....or will that not work?
 
Messages
9
Hi RhumbaFlappy.

The reason I choose a Tiff/Tif format was that all the examples were Tiffs and I recall reading somewhere that was the correct format. However as you can see from the earlier screen shot it is diregarded by the resmpler. I have also tried RGB tiff, no change, RGB bitmap that went through but only had a water effect using my old scenery colour ( not the FSX colour) and finally gray scale BMP which the resampler chucked back at me! You can see my problem, the figures work but not the water image. The strange thing is that I compared my Tiff file to the MS Samples and their properties appear identical in Photoshop. If anyone has got a Watermask to work over basic photo scenery (not geotiff) can they tell me what was involved.

Thanks Peter.
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,789
Country
us-wisconsin
Hi Peter.

Please accept my apologies. I was wrong. If you use greyscale images for blending and LandWaterMask, they cannot be BMP ( bitmap ). They DO need to be converted to TIF.

I'll post an example, and make it a sticky.

Dick
 
Messages
11
Country
brazil
Timmo: You is right, I do mistake and just have been looking in your .inf file.


Peter: Just check the input/output filename and path so it doesn't have 'special' characters. Most 'special' characters are ok but there are a few that aren't so it is just as well to avoid all special characters.

Maybe your named patch isn’t recognized by LibTiff.


Hely
 
Messages
9
Thanks Dick and Hely,

I tried the name idea, even used one of the samples name but it still rejects the file data. If you look back at the screen shot (acouple of posts ago) is says something about the wrong "TAG" type, a bit beyond me but if you guys will keep throwing ideas
at my, I be only to glad to try them!

Kind regards Peter.
 
Messages
11
Country
brazil
Hi Peter,


This is my .inf file that work fine. I put everything (.inf file, imagery file, blend mask) inside same folder. I still believe that your named patch isn’t recognized by LibTiff, look back your attached Resample screen shot is says “H:\....” instead “C:\...” how mentioned in your .inf file. Try a simple patch.

I use GeoTIFF for the image and TIFF for the Blend Mask.



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

[Source]
Type = MultiSource
NumberOfSources = 2

[Source1]
Type = GeoTIFF
Layer = Imagery
SourceDir = "."
SourceFile = "Araruama_1.tif"
Variation = Day
NullValue = 255,255,255
Channel_BlendMask = 2.0



[Source2]
Type = TIFF
Layer = None
SourceDir = "."
SourceFile = "Araruama_1_BLD.tif"
ULXMAP = -42.39425353
ULYMap = -22.82935210
XDIM = 1.97591229577901e-005
YDIM = 1.97591229577902e-005
SamplingMethod=Gaussian




[Destination]
DestDir = "."
DestBaseFileName = "Araruama_1"
UseSourceDimensions = 1
 
Messages
9
Hi,

Tried that all in the same folder but still no difference. It is definately in the Tiff format. Here is a puzzel for you, I used Microsofts own landwatermask.tiff with my .ini and it worked fine. I opened the same file in photoshop 8, corel paint11 and MS Image studio 10, changed nothing, then saved as landwatermask1.tif and it has the same problems with the resampler as my photo. I tried it on 3 different machines. The problem must lie with the Tiff and the resample exe.
 
Messages
11
Country
brazil
Hi Peter,

Yes, you are right, I am getting the same warning message when I use my blendmask as a TIF format(No GeoTiff), but the compiled BGL file is OK for me, I just don't understand why it not work for you.

Note, this is a warning not an error. It doesn't mean there is anything wrong with the file, just that there is stuff in the file that isn't recognized by libtiff as baseline tags. Usually this is benign.

Regards Hely
 
Last edited:
Messages
9
Hi Hely,

Thanks for your last tip, you were right, I ran the program and it worked.
Two things I also found out. Firstly I had to turn the water effects in "Display Settings" up a notch to change the colour of the photo water.
Secondly, I have been playing with 2 levels of hi rez photo scenery and by turning up the "Scenery Detail" levels to 7cm made an amazing difference, so looking forwards to getting some great scenery done. (I will send some screenies)
Anyway thanks to all who helped it, it is greately appreciated!

kind regatds Peter.
 
Top