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

Creating Photo Scenery From Older Satellite Images

Messages
803
Hi,

I'm trying to create a photo ground scenery using an older satellite image but it won't compile because it says nothing was selected. But I did select the map as I usually do. SbuilderX does not have the older image so I got it from Earth Explorer. I imported the image into SbuilderX and calibrated it. When I tried to compile it and the BGL Compilation box appears, the Photo Scenery is not checked for highlighted. Therefore, it won't compile, although I selected the image. The only thing I can think of is that the map must be added from Background, but adding from background is not highlighted. Is there a way, and how can I use this older image to create a photo ground scenery?

Ken.
 
Messages
6,629
Country
us-illinois
Hi Ken:

In a PM here, if you attach- (or link to an external download URL)- 1 or more *.ZIP, 7-ZIP (*.7z), or WinRAR (*.RAR) files of the SBuilderX: :pushpin:

* saved project file (*.SBP)

* export file (*.SBX )

* the source imagery you are trying to Add from Disk, Select, and Compile to BGL

...then I may be able to offer a better-informed opinion on how to troubleshoot your work-flow. ;)

GaryGB
 
Messages
212
Country
germany
Hi Ken,

GaryGB is right, without initial data a help is hardly possible.

To me it sounds like the inf file for the photo background is missing.
So no bgl file can be created.

By adding a map as background, no inf file is created.
This file must then be created by you.

But without exact source dates it is only a speculation of mine.
 
Messages
803
Hi Ken,

GaryGB is right, without initial data a help is hardly possible.

To me it sounds like the inf file for the photo background is missing.
So no bgl file can be created.

By adding a map as background, no inf file is created.
This file must then be created by you.

But without exact source dates it is only a speculation of mine.

Hi Mike,

I do have an xml file that may be beneficial, and I'll sent that to Gary. I'm not sure how to go about creating that INF, unless you're referring to the INF template I can use. Thanks for remembering me about that. I think I can download some other data too.

Ken.
 
Messages
6,629
Country
us-illinois
Hi Ken:

I have identified, located, downloaded direct from EarthExplorer, and processed ...the source file you attached above. ;)

In the PM, I posted a link to a ZIP file containing all source files and utilities used to process a GeoTIFF output after re-projecting the original to (EPSG:4326).

Note also, that there is a ready-to-use Hi-Res imagery BGL in the output sub-folder chain; just add it as a new Area in Scenery Library GUI. :santahat:

GaryGB
 
Messages
212
Country
germany
Hi Ken,

If you want to create a photo background (bgl-file) with SBuilderX...

Here is how it works...

For this purpose the background image (24bit-bmp-file) and the corresponding TXT-file must be copied to SBuilderX / Tools / Work.

Because only from this Work folder SBuilderX can create a Photo-BGL.
In this folder SBuilderX creates the inf-file which is needed by the Resemple.exe.

The TXT file for the background image (bmp) is created by calling up the Map Properties of the image and clicking on "Data Fiele" at the bottom.
This TXT file has the advantage that if you have to import the same background again (because you have changed something in the photoground), you don't have to align the background image again.
The SbuilderX aligns the image with the TXT file.

In the Map Properties are also all relevant data for the inf file, which you need to create the Photo-BGL.

But I would prefer to create the inf-file manually.
Because here you have the possibility to use masks (for better transitions), seasons and night textures.
The SbuilderX is very useful for aligning the photo background.
 
Messages
803
Hi Ken,

If you want to create a photo background (bgl-file) with SBuilderX...

Here is how it works...

For this purpose the background image (24bit-bmp-file) and the corresponding TXT-file must be copied to SBuilderX / Tools / Work.

Because only from this Work folder SBuilderX can create a Photo-BGL.
In this folder SBuilderX creates the inf-file which is needed by the Resemple.exe.

The TXT file for the background image (bmp) is created by calling up the Map Properties of the image and clicking on "Data Fiele" at the bottom.
This TXT file has the advantage that if you have to import the same background again (because you have changed something in the photoground), you don't have to align the background image again.
The SbuilderX aligns the image with the TXT file.

In the Map Properties are also all relevant data for the inf file, which you need to create the Photo-BGL.

But I would prefer to create the inf-file manually.
Because here you have the possibility to use masks (for better transitions), seasons and night textures.
The SbuilderX is very useful for aligning the photo background.


Hi Mike,

The reason I was not able to compile it is because it kept saying that nothing was selected, and I did have it selected. Everything in the BGL Compilation box was blanked out and there's no way to compile it unless the Photo Scenery check box is highlighted. There were 2 reasons for this. One, is that I did not type in Photo in the Map Properties box. Two, the image was a tiff file, and apparently it will not compile tiff files. I converted it to a bitmap and it worked. Every time I try to use the tiff file, the BGL Compilation Box would say that nothing was selected, and I though it supported tiff files. Anyway, I was able to compile and it created an inf file. Now, when I move the inf file over to resample.exe, it will not compile it and convert to a bgl file. I was told that the resample.exe only compiles images that are WGS84 projected, and it must be in that format to compile. The image is not WGS84 and I don't know how to go about re-projecting it. I wish SbuilderX would have the older images so that I would not have to go through all this trouble, and I need someone to give me or show me step by step how to re-project UTM images over to WGS84. I can't think of no other way to do this, and it will not compile that inf photo scenery file.

Ken.
 
Messages
6,629
Country
us-illinois
Hi Ken:

As I explained in our PM communications related to this thread, SDK Resample (and SDK SHP2VEC as well !) require source data in a specific GIS projection.


Re-projecting your USGS imagery from UTM projection, NAD83 (Alabama HPGN) datum to Geographic projection, WGS84 datum requires a GIS application.


Perhaps others with the time and patience to allocate for learning how to use the QGIS and/or OSGEO4W GIS platform ...might provide a tutorial here ? :teacher:

GaryGB
 
Last edited:
Messages
212
Country
germany
Hi Ken,

I can try to help you.
We will do it step by step.

SBuilder is only used to calibrate the image.
It doesn't matter if a 24bit BMP or a 24bit TIFF is used as image.
But when creating with Gimp you should use the following export settings so that resemple.exe can handle it.

24bit BMP
Gimp-BMP-24bit.jpg


24bit TIFF
Gimp-TIFF-24bit.jpg


We create the inf file ourselves.

First we create only the BGL with the photo background.
If that works, next comes the blend mask.
After that we add seasons and water masks if desired.
 
Messages
803
Hi Ken,

I can try to help you.
We will do it step by step.

SBuilder is only used to calibrate the image.
It doesn't matter if a 24bit BMP or a 24bit TIFF is used as image.
But when creating with Gimp you should use the following export settings so that resemple.exe can handle it.

24bit BMP
View attachment 65989

24bit TIFF
View attachment 65990

We create the inf file ourselves.

First we create only the BGL with the photo background.
If that works, next comes the blend mask.
After that we add seasons and water masks if desired.


The correct export settings were already set;

Ken.
 
Messages
212
Country
germany
Okay...

Open your project in SbuilderX.
Then open your image with "File -> Add Map -> From disk" and calibrate it.

After the image is aligned mark it and right click on the green border to open the properties.
The opening window should look like this...

SBuilderX_Map_Properties.jpg


From the "Map Properties" window we need the following entries for the inf file...
- North Lat
- West Lon
- CellXDimensionDeg
- CellYDimensionDeg


Here two simple test.inf...
Once for the BMP image and once for the TIFF image.

for BMP
[Source]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "test_photo.bmp"
Variation = all
ulyMap = North Lat
ulxMap = West Lon
xDim = CellXDimensionDeg
yDim = CellYDimensionDeg

[Destination]
DestDir = "."
DestBaseFileName = "test_photo_bmp"
DestFileType = BGL
LOD = 8,18
CompressionQuality = 85

for TIFF
[Source]
Type = TIFF
Layer = Imagery
SourceDir = "."
SourceFile = "test_photo.tif"
Variation = all
ulyMap = North Lat
ulxMap = West Lon
xDim = CellXDimensionDeg
yDim = CellYDimensionDeg

[Destination]
DestDir = "."
DestBaseFileName = "test_photo_tiff"
DestFileType = BGL
LOD = 8,18
CompressionQuality = 85


The inf files are designed in a way that the source images must be in the same folder as the inf file.
The BGL is then also created in the same folder.

The green written text lines you have to adjust with your source image.
The red written text lines you have to use the values from the "Map Properties" window of SBuilderX.

DestBaseFileName = "the name of the output BGL file

If all entries are correct, open the inf file with the resemple.exe.
Now a BGL file should be created.

resemple.jpg


Open the finished BGL file with "tmfviewer.exe".
The background image should now be visible.

If this is the case, log the created BGL file into a Scenery folder in the P3D and inspect the result in the P3D.

I am away on business until Friday.
So you can test extensively.
And tell me your result.
 
Messages
803
Okay...

Open your project in SbuilderX.
Then open your image with "File -> Add Map -> From disk" and calibrate it.

After the image is aligned mark it and right click on the green border to open the properties.
The opening window should look like this...

View attachment 66011

From the "Map Properties" window we need the following entries for the inf file...
- North Lat
- West Lon
- CellXDimensionDeg
- CellYDimensionDeg


Here two simple test.inf...
Once for the BMP image and once for the TIFF image.

for BMP
[Source]
Type = BMP
Layer = Imagery
SourceDir = "."
SourceFile = "test_photo.bmp"
Variation = all
ulyMap = North Lat
ulxMap = West Lon
xDim = CellXDimensionDeg
yDim = CellYDimensionDeg

[Destination]
DestDir = "."
DestBaseFileName = "test_photo_bmp"
DestFileType = BGL
LOD = 8,18
CompressionQuality = 85

for TIFF
[Source]
Type = TIFF
Layer = Imagery
SourceDir = "."
SourceFile = "test_photo.tif"
Variation = all
ulyMap = North Lat
ulxMap = West Lon
xDim = CellXDimensionDeg
yDim = CellYDimensionDeg

[Destination]
DestDir = "."
DestBaseFileName = "test_photo_tiff"
DestFileType = BGL
LOD = 8,18
CompressionQuality = 85


The inf files are designed in a way that the source images must be in the same folder as the inf file.
The BGL is then also created in the same folder.

The green written text lines you have to adjust with your source image.
The red written text lines you have to use the values from the "Map Properties" window of SBuilderX.

DestBaseFileName = "the name of the output BGL file

If all entries are correct, open the inf file with the resemple.exe.
Now a BGL file should be created.

View attachment 66012

Open the finished BGL file with "tmfviewer.exe".
The background image should now be visible.

If this is the case, log the created BGL file into a Scenery folder in the P3D and inspect the result in the P3D.

I am away on business until Friday.
So you can test extensively.
And tell me your result.




Hi Mike,

Sorry it took me some time to get back with you. I've done all of those things and it still will not compile, unless I'm not entering the correct information in some other things that have not been explained. I've noticed in the inf test you show above, you show numbers in red that need to be entered. The only information I have are the coordinates from the text file. As far as the information regarding the xDim and xDim and Cell X and Y Dimension Deg, I do not have that information and it automatically shows the cell dimensions after I enter the coordinates:

xDim = CellXDimensionDeg
yDim = CellYDimensionDeg

I do not have no idea what these mean and where you get the information, and has not been explained. I just know that the numbers come up after I enter the coordinates, but I don't know if they're correct or not. I assume that if I enter the correct coordinates, the cell dimensions are correct. Or, do I need to enter that myself?

Also, After entering the coordinates in the Map Properties and click on Calibrate, another box pops up called Map Calibration:


Photo Ground Scenery.jpg




This shows Lat/Lon X/Y for Point 1 and for Point 2. I'm not sure if I'm putting in the correct coordinates but I put in the same coordinates as I entered in the Map Properties and after I put them in, the map looks correct. What is the difference between this box and the Map Properties box, and where do the Points for Pt 1 and 2 come from? So, other than that, if I'm doing these correctly, then something else is causing the problem. Gary has stated that it requires source data in a specific GIS projection, and that appears to be my problem. But I need help in understand more about this and how to re-project the image to the correct WSG84, I think it's called. Remember, I pulled my image, not from the SbuilderX but from Earth Explorer, and apparently that is why SbuildX is prompting me to re-calibrate. But I've always thought that after it was calibrated, that puts it in the correct WSG84 projection, and I guess my understanding on this is not quite right.

Ken.
 
Last edited:
Messages
6,629
Country
us-illinois
Hi Ken:

As I explained in our PM communications related to this thread, SDK Resample (and SDK SHP2VEC as well !) require source data in a specific GIS projection.


Re-projecting your USGS imagery from UTM projection, NAD83 (Alabama HPGN) datum to Geographic projection, WGS84 datum requires a GIS application.


Perhaps others with the time and patience to allocate for learning how to use the QGIS and/or OSGEO4W GIS platform ...might provide a tutorial here ? :teacher:

GaryGB

Hi Ken:

Mike's nicely detailed tutorial that he so generously provided is a good procedural guide for what one can do with imagery source files after they have been properly formatted in the GIS projection required by SDK Resample.

You are correct that one must re-project the particular imagery you downloaded from EarthExplorer before it can be processed via the SBuilderX Add Map > From Disk feature.

Note that the SBuilderX feature may impose a requirement for the source file to be a BMP and in a Mercator projection / WGS84 datum in order to display and be accessible within the SBuilderX GUI work-space.

During internal processing, SBuilderX will re-project that BMP imagery Map to the Geographic projection / WGS84 datum GIS format required by SDK Resample.

CAVEAT: Re-projection involves spherical trigonometric functions and changes of Geo-referencing coordinates which can only be performed via GIS applications, thus one should not attempt to approximate imagery formatting or positioning by trial-and-error methods using "fudged" calibration or "rubber sheeting cheating" methods. ;-)

GaryGB
 
Last edited:
Messages
803
Hi Gary and Mike,

I just happen to realized something that I keep saying and I may be causing some confusion here. First of all, I keep saying that my image will not compile. That is not correct. It WILL compile in SbuilderX and generate the INF file. The problem I'm having is that when drag the INF file over to the resample.exe to convert it to a BGL file, it will not re-sample, and that's the problem I'm referring to. The DOS screen only comes up for a split second and is gone, and that generally means that something is not right in the INF file. So, does the Re-projection have anything to do with that issue? I hope that clears up some things.

Ken.
 
Messages
6,629
Country
us-illinois
Hi Ken:

SBuilderX outputs imagery source files and BGLs into:

[SBuilderX install path]\Tools\Work

When an attempted SDK Resample fails, one would indeed see the brief CMD window, but a BGL is not compiled (for reasons normally explained within the CMD window ...before it is closed).

One might wonder whether SBuilderX had already output the source files and conveyed them to SDK Resample and a BGL had been successfully compiled, then the subsequent attempted manual BGL compile failed, because SDK Resample could not over-write the existing BGL file of the same name specified in the *.INF file ...already located within that same output folder ? :scratchch

GaryGB
 
Last edited:
Messages
803
the subsequent attempted manual BGL compile failed, because SDK Resample could not over-write the existing BGL file of the same name specified in the *.INF file ...already located within that same output folder ? :scratchch

GaryGB


I don't understand what you're saying, and a BGL file was never created when I compiled the ground scenery in SbuilderX. It just created an INF file in the Tools/Work folder. I would normally take that INF file and drag it to the resample.exe and it would always create a BGL file for my ground scenery, but it's not doing that now. Anytime I've used the Add From Background, resampling has always worked. Now that I'm using an image from Earth Explorer and had to use the Add From Disk in SbuilderX, it won't resample. Since I did not make myself clear and corrected what I've been saying, does the WGS84 format we've been talking about still apply here, and that's why it's not resampling, or is it because something is wrong in the INF file created?

Ken.
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
4,776
Country
us-wisconsin
Use a batch file or a command window (DOS window) to compile... type "resample filename.inf" the window should stay open to see the error. Resample wouldn't care about the projection used.
 
Messages
212
Country
germany
Hi Ken,

It doesn't matter if your background image is in WGS84 format.
You can bring any image into the simulator.
You just have to align it in SbuilderX so that it fits.

To illustrate, I just took a Santa picture from the net in jpeg format.
Converted it to bmp format....
Placed it in SbuilderX...
Created an inf-file and resampled the whole thing...

This is how the result looks like in P3D.
2020-12-20_13-38-11-55.jpg


To make the transition better, I added a blend mask.
2020-12-20_13-50-55-831.jpg


CellXDimensionDeg and CellYDimensionDeg can be found in SbuilderX.

Calibrate the imported image in SbuilderX.
You have found that.

To find CellXDimensionDeg and CellYDimensionDeg...
Select the image, it will be green bordered...
2020-12-20_134004.jpg


Right click on the green border and select Properties...
2020-12-20_134125.jpg


In the next window you will find CellXDimensionDeg and CellYDimensionDeg.
2020-12-20_134156.jpg


This value depends on your background image size in pixels.

If you change your image size (pixel) and import it again in SbuilderX (with the same coordinates),
then the CellXDimensionDeg and CellYDimensionDeg value will change.
 
Messages
6,629
Country
us-illinois
Hi Ken:

Since your goal is not merely to get 'any' tile of custom photo-real imagery to display in the general vicinity of its real world location, and are instead needing to align the area of this current project with the nearby KBHM custom photo-real imagery project you have been working on for years, I am making the case for precision as an advocate on your behalf, as you undergo the learning of what is required to achieve your overall projects goals.

Because your imagery downloaded from EarthExplorer requires re-projection to a format which can be worked with via the SBuilderX work-space GUI, a GIS application must be used to accurately re-format that imagery before you use Add Map > From Disk.

The fact that one can use the SBuilderX "Calibrate" feature during import of 'any' imagery supported by the Add Map > From Disk means that one must have previously re-projected the imagery in a GIS application, so that any changes to the imagery "shape" and Geographic corner coordinates are correctly updated in the newly re-projected Geo-Referencing metadata before they are used to enter corner pixel coordinates in that SBuilderX "Calibrate" feature dialog box.

Once your imagery downloaded from EarthExplorer is accurately projected and displayed via the SBuilderX work-space GUI, you can process it as Mike describes above.


AFAIK, from the point you select and commit the imagery displayed via the SBuilderX work-space GUI to be processed, SBuilderX will internally perform an additional re-projection to the actual GIS format required by SDK Resample, as it writes a *.BMP, *.TXT and *.INF file into:

[SBuilderX install path]\Tools\Work

If you arbitrarily choose to Calibrate imagery via Add Map > From Disk that has not previously been re-projected, and successfully "trick" SBuilderX into displaying and processing it to output source files for SDK Resample, you are more likely going to have inaccurate results. :alert:


If SDK Resample does not complete its task of creating a BGL, there is always a reason, and it nearly always will be displayed in the CMD window.

Be cause that CMD window may only be on screen briefly, one may not be able to read it before it closes.

Bearing in mind that if SDK Resample is provided with a proper set of source files, it completes its task and CMD messages need not be read.

Although you 'could' manually attempt to Drag-And_Drop or Copy-And-Paste the *.INF file onto SDK Resample.exe, that fact that a BGL was not output by SDK Resample.exe is evidence that there was a problem.

While it is true that one might get more info on what may have gone wrong with the compilation process by keeping the CMD window on screen when manually attempting to compile source files that IMHO, likely already have a problem, I suggest that it would be more practical to focus initially on learning how to get your imagery downloaded from EarthExplorer accurately projected and displayed via the SBuilderX work-space GUI.


I am in the process of performing hardware upgrades to my main development computer and will be limited in my access to a functioning software environment in which I might otherwise be able to assist you with a step-by-step troubleshooting guide for at least another day or 2.

As I mentioned above, you must first re-project your imagery downloaded from EarthExplorer before attempting to use Add Map > From Disk to Calibrate it ( using ONLY the newly re-projected Metadata from the GIS application- and NOT that from the original EarthExplorer download ! ) so it can be displayed in / selected from, then semi-automatically processed / compiled to BGL ...via the SBuilderX work-space GUI.

Hi Ken:

As I explained in our PM communications related to this thread, SDK Resample (and SDK SHP2VEC as well !) require source data in a specific GIS projection.


Re-projecting your USGS imagery from UTM projection, NAD83 (Alabama HPGN) datum to Geographic projection, WGS84 datum requires a GIS application.


Perhaps others with the time and patience to allocate for learning how to use the QGIS and/or OSGEO4W GIS platform ...might provide a tutorial here ? :teacher:

GaryGB

PS: Note that my quoted procedure immediately above is for re-projection to a GIS format that is manually / directly submitted to SDK Resample.

IIUC, your goal is to process imagery downloaded from EarthExplorer so it can be displayed / processed via the SBuilderX work-space GUI.

IIRC, to re-project your imagery downloaded from EarthExplorer so it is accurately projected before one uses Add Map > From Disk and the Calibrate dialog, so it can be displayed via SBuilderX work-space GUI, the GIS format must be a Mercator type projection (preferably EPSG:3857).

GaryGB
 
Last edited:
Messages
1,510
Country
unitedstates
No you don't need to reproject to WGS84, if you're saving your .tif as a .bmp and calibrating that in SBuilder the NAD83 projection will work fine. Resample will choke on a NAD83 .tif when that info is stored in the .tif as geodata but a .bmp can't store geodata so as long as the coords and xDim yDim are correct it will carry out the resample regardless of the projection. Sbuilder does exactly this every time you "add map from background" and resample it to a photoreal. There's something else wrong and if SBuilder is outputting an .inf but not a .bgl then it's choking on the same error you're getting when you try to drop the .inf on resample.exe manually. My bet is the .bmp is coming out of Gimp and "write color space information" is the problem.
 
Top