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

Maps2Bgl cmd.exe warning?

Messages
28
Country
unitedstates
Getting a warning on Command Execution when building bgl's with Maps2Bgl?
Any ideas? Heres the warning: " 1600000.tif: warning, incorrect count for field "Datetime" The tif image was a modified tif Maps2Bgl made, Added black on it for water as a blend mask. Blend mask= 3

Thanks.
Tim M/.
 
Did you save it as a 255 bit greyscale? By default, Maps2Bgl sets Channel_BlendMask = 2.0 in the .inf file.
 
Last edited:
No, just added black color 0 to the " tif " where the rivers and lakes are, and changed the channel blend mask to = 3 in it's inf. Hopping to make holes to display the stock vector scenery water under it. Do you think I should change it to a grey scale? just learning how to photo real.
I'm thinking the blend channel should equal 2.3.. But no change in the warning. I've been reading archive posts on this topic. Following the post

"" Anything you want to NOT show as photoreal, needs to be set with a blendmask... this includes default water and land. You can "blend" holes in the photreal to allow default water and land to show through. ""

and

"" If you had an image with a single alphachannel, which you would like to use as a blend ( with black as a hole to allow default water to show through ) then you need to put this in your SOURCE section of the INF file:

Channel_BlendMask = 3

...then the single blendmask should allow black to be a hole for default water ( or land ) to show through. ""

I have no idea how to prepare an image to blend holes in the photo real,
all I've done to the tif image is add black to i, it's just white and black image as the second source.
Don't think the tif has an alpha channel. I'm wondering if SbuilderX310 OR PhotoSceneryMakerX wound be a better program to work with? What do you all think of Maps2Bgl?

And do you want to see the image?



[Source]

Type = MultiSource
NumberOfSources = 2

[Source1]

Type = BMP
SourceDir = "."
SourceFile = "16_000000.bmp"
Layer = Imagery
Variation = Day
NullValue = 255,255,255
ulxMap = -87.978515625
ulyMap = 43.0688877741697
Nrows = 4096
Ncols = 4096
Xdim = 2.14576721191406E-05
Ydim = 1.56837515564359E-05
PixelIsPoint = 0
SamplingMethod = gaussian
Channel_BlendMask = 3

[Source2]

Type = TIFF
Layer = None
SourceDir = "."
SourceFile = 16_000000.tif
ULXMAP =-87.978515625
ULYMap = 43.0688877741697
xdim = 5.23868948221207E-09
ydim = 3.82904090733297E-09
Nrows = 4096
Ncols = 4096
SamplingMethod = Gaussian

[Destination]

DestDir = "C:\Maps2Bgl_X\bglcache"
DestBaseFileName = "16_16752_24064"
DestFileType = BGL
CompressionQuality = 80
LOD = Auto


Thank you for the reply.
 
Last edited:
Tim,

This is the way I do it using Paint Shop Pro:

If the bmp colour image is good and shows graduated water colours, I convert it to greyscale and paint the land white.



If the colour is poor or there is no graduation in water colour:

I paint the water black

convert it to greyscale

select all black areas with the magic wand

invert the selection

flood-fill with white.



In both cases, I save the image in tiff format overwriting the original file.

There is no need to change the inf file, just re-run the bat.

BTW. You will probably need to remove the default coastlines and water polys then create new ones. I use SbuilderX to do this.
 
Last edited:
O - ok thanks for the reply, from what I've gathered from your reply is it need to be in grey scale. The image looks like yours the second one - Black water, White land - . Removing the default coast lines and water polys I think is done with vector scenery. I've been look at SbuilderX --> having the program, and it looks like it will handle vector scenery just like FSX to KML, but as one program -vector and photo real . Thanks again for the help. Much appreciated..!
 
Last edited:
Create exclusion polygons in SBuilderX then using the tiff file as a background create the water polys by tracing around the outline:



 
Success! Thanks so much for your help. Would have took alot longer with out ya. I'll will definitely give you and FSDeveloper credit for all the help. Heres what you helped me do, the pic is a little fuzzy:

2009-8-10_0-37-39-864.jpg
 
The blend channel's best use is to blend the edges of your image to the underlying landclass texture. Sharp masking for water can be done by the use of the NullValue:

NullValue = 255,255,255

The above is the default of SBuilderX's INF files... but it could be changed to and RGB color. 255,255,255 is white. 0,0,0 is black.

Using the default NullValue of white will mask any pure white area of the bitmap or tiff as a void, allowing the underlying ground ( or water ) to show through. There is no need for an alpha channel or separate greyscale bitmap if simple masking is needed.

Code:
[Source]
   Type = BMP
   Layer = Imagery
   SourceDir = "."
   SourceFile = "smiley.bmp"
   Variation = All
   NullValue = 255,255,255
   SamplingMethod = Gaussian
   ulyMap =  42.5890057
   ulxMap = -88.702671
   xDim =  5.62542124542095E-05
   yDim =  5.39903225806595E-05

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

The source and result below. Note the white area is "nulled" or masked. No multi-sourced INF needed, or other images or alpha channels.
 
Last edited:
The pic I displayed above wasn't very good, just a test and example.

Here in the inf I used to mask an area for the water to show through the bmp.

[Source]

Type = MultiSource
NumberOfSources = 2

[Source1]

Type = BMP
SourceDir = "."
SourceFile = "16_000000.bmp"
Layer = Imagery
Variation = All
NullValue = 255,255,255
ulxMap = -114.43359375
ulyMap = 39.6395375643668
Nrows = 4096
Ncols = 4096
Xdim = 2.14576721191406E-05
Ydim = 1.65320622614682E-05
PixelIsPoint = 0
SamplingMethod = gaussian
Channel_BlendMask = 2.0

[Source2]

Type = TIFF
Layer = None
SourceDir = "."
SourceFile = 16_000000.tif
ULXMAP =-114.43359375
ULYMap = 39.6395375643668
xdim = 5.23868948221207E-09
ydim = 4.03614801305376E-09
Nrows = 4096
Ncols = 4096
SamplingMethod = Gaussian

[Destination]

DestDir = "C:\Maps2Bgl_X\bglcache"
DestBaseFileName = "16_11936_24896"
DestFileType = BGL
CompressionQuality = 80
LOD = Auto

The second cource source is a balck and white tif image grey scaled.
The black as water, the hole. And white as land.
So if the null value is =0,0,0 it will make the white void holes in the image with a standard nongrey scale tif. of bmp.?
Just trying to clear that up, because mine is already has a NullValue = 255,255,255 ... But it would not work with out making it a grey scale at NullValue = 255,255,255.
 
Last edited:
The NullValue only affects the Source1 image... it has nothing to do with the Channel_BlendMask ( Source2 ).

There are 2 separate ways to mask off an area, using either the NullValue or a Channel_BlendMask/MultiSource. You can use both in a photoreal.

The use of a Channel_BlendMask only is of real use when you wish to blend the edges of the photoreal into the underlying landclass texture. That's why it uses 256 greyscale values... to achieve the increasingly transparent blend.

It's much easier to NOT use a Channel_BlendMask for water masking...just use the NullValue for water, making it whatever RGB color you would like. Why have 2 images when 1 will do? 255,0,0 is red. 0,0,255 is blue. Just paint the color where you want the mask to go. Then adjust the INF if needed.

In the INF you showed, you used a Channel_BlendMask, so the second image will be used as a mask, as well as the NullValue. The convention for that is white is no-mask, and black is full-mask, greys are transparent in-between.

The NullValue line can be deleted from the INF if you don't need to use it.

SBuilderX just includes it because the SDK used it in their example... but it works fine as it eliminates anything pure white.

If the SDK had used 0,0,0, then we'd all be using that, and pure black would be voided ( actually a better idea, as this is similar to the old FS9 methods of using black in an alpha-channel; and black is used in the FSX Channel_BlendMask as a void ).

Because SBuilderX, and I think all other INF-building programs, use 255,255,255... then just paint masked areas white, and skip the use of a Channel_BlendMask, unless you want a blended ( degrees of transparency ) edge to your photoreal.

If you look at the millenniumimage3.tif in the SDK, you'll see there are white areas at the edges, as if the image were reprojected to WGS84 lat-long projection from UTM projection, and the image doesn't line up quite right at the edges. The NullValue=255,255,255 voids those areas from the photoreal. That's why they used that value, for that example.

Dick
 
I get it, sorry for misunderstanding. The null value is voiding any color it is set to , it will void that color on that image, the first image.
And use the grey scale image for blended on the edges, still set to grey scale. if I've under stood correctly.

You both have helped me quite a bit,thanks for the education.
Not wanting to keep bothering you but do you have any idea why the photo real is lite at night, with the stock scenery around it dark?
Do I need to use another source image for night that is darkened for night. I think I kinda see how streets and citys are lite at night. Maby?
 
Last edited:
Do I need to use another source image for night that is darkened for night. O I think I kinda see how streets and citys are lite at night. Maby?
You set the Variation parameter in the inf file to "Day" or "Night".
 
NumberOfSources = 3
When adding a second image source 2 for night textures, and keeping the tif image as a grey scale blend channel source 3, the inf should state blend channel = 3.0 for source 1 (day), and source 2 (night) if that tif is source 3, right or wrong?
 
NumberOfSources = 3
When adding a second image source 2 for night textures, and keeping the tif image as a grey scale blend channel source 3, the inf should state blend channel = 3.0 for source 1 (day), and source 2 (night) if that tif is source 3, right or wrong?

Yes.

Code:
[Source]
   Type = MultiSource
   NumberOfSources = 3
   
[Source1]
   Type = TIFF
   Layer = Imagery
   SourceDir = "."
   SourceFile = "MyDay.tif"
   Variation = Day
   Channel_BlendMask = 3.0
   NullValue = 255,255,255
   ulyMap =  42.5661962
   ulxMap = -88.7210525
   xDim =  3.34521484375017E-05
   yDim =  2.68220703125016E-05
   
[Source2]
   Type = TIFF
   Layer = Imagery
   SourceDir = "."
   SourceFile = "MyNight.tif"
   Variation = Night
   Channel_BlendMask = 3.0
   NullValue = 255,255,255
   ulyMap =  42.5661962
   ulxMap = -88.7210525
   xDim =  3.34521484375017E-05
   yDim =  2.68220703125016E-05

[Source3]
   Type = TIFF
   Layer = None
   SourceDir = "."
   SourceFile = "MyBlendmask.TIF"
   NullValue = 255
   SamplingMethod = Gaussian
   ulyMap =  42.5661962
   ulxMap = -88.7210525
   xDim =  3.34521484375017E-05
   yDim =  2.68220703125016E-05

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

This gave me what I wanted ( I think ). The NULL areas ( pure white ) must be the same in each image source... even in the blendmask. This allows a hole to show through all the layers in the BGL, both day and night.

Dick
 
Thanks again for the replys, If the Compression Quality is changed. I'm thinking it makes smaller bgl's, but will that sacrifice quality of the scenery?
 
Maps2Bgl cmd.exe execution

I just searched google for "Maps2Bgl cmd execution" and found this interesting thread. Great. I will read it.

But still, it is possible to start Maps2Bgl from command line with argument to open kml file and auto-start download? It would be nice to have it.
 
Back
Top