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

Problems with Resample (FSX)

Messages
866
Country
australia
Alrighty, running test after test after test and I think I may have found a bug with resample.exe...

In the SDK it states...

Code:
Resample [-i, -q, ?] file1.INF[file2.INF…fileN.INF]

will compile data into one BGL...

Working with the resample tool though on a range of photoscenery files it appears this is very buggy... It reads all the data from the source and destination sections of the files but for some reason it's placing the first image repeatedly over each cell...

Code:
resample.exe -i 4QEJ730850_tif.inf 4QEJ745835_tif.inf destination.inf

Code:
File "4QEJ730850_tif.inf"

[Source]
Type=MultiSource 
NumberOfSources=4 

[source1]
Type=GeoTIFF
SourceDir="G:\ProVFR\Watermapping\image"
SourceFile="4QEJ730850_tif.TIF"
Layer=Imagery
Variation=Day
NullValue=10,20,60
Channel_BlendMask = 3.0 
Channel_LandWaterMask = 4.0

[Source2]
Type=GeoTIFF
SourceDir="G:\ProVFR\Watermapping\lightmap"
SourceFile="4QEJ730850_tif.TIF"
Layer=Imagery
Variation=Night
NullValue=10,20,60
Channel_BlendMask = 3.0 
Channel_LandWaterMask = 4.0

[Source3]
Type=GeoTIFF
Layer = None 
SourceDir="G:\ProVFR\Watermapping\blendmask"
SourceFile="lm_4QEJ730850_tif.TIF"
SamplingMethod=Gaussian

[Source4]
Type=GeoTIFF
Layer = None 
SourceDir="G:\ProVFR\Watermapping\watermask"
SourceFile="lm_4QEJ730850_tif.TIF"
SamplingMethod=Gaussian

Code:
File "4QEJ745835_tif.inf"

[Source]
Type = MultiSource 
NumberOfSources = 4 

[source1]
Type=GeoTIFF
SourceDir="G:\ProVFR\Watermapping\image"
SourceFile="4QEJ745835_tif.TIF"
Layer=Imagery
Variation=Day
NullValue=10,20,60
Channel_BlendMask = 3.0 
Channel_LandWaterMask = 4.0

[Source2]
Type=GeoTIFF
SourceDir="G:\ProVFR\Watermapping\lightmap"
SourceFile="4QEJ745835_tif.TIF"
Layer=Imagery
Variation=Night
NullValue=10,20,60
Channel_BlendMask = 3.0 
Channel_LandWaterMask = 4.0

[Source3]
Type=GeoTIFF
Layer = None 
SourceDir="G:\ProVFR\Watermapping\blendmask"
SourceFile="lm_4QEJ745835_tif.TIF"
SamplingMethod=Gaussian

[Source4]
Type=GeoTIFF
Layer = None 
SourceDir="G:\ProVFR\Watermapping\watermask"
SourceFile="lm_4QEJ745835_tif.TIF"
SamplingMethod=Gaussian

Code:
File "destination.inf"

[Destination]
DestDir="."
DestBaseFileName="Oahu1"
DestFileType=BGL
LOD=3,17
CompressionQuality=85
UseSourceDimensions = 1

The end result is:

resamplebug.jpg


In the shot it shows the first source image, watermask, nightmap and blendmask is being overlaid over the co-ordinates from the 2nd *.inf file...

Does anyone have any idea why it's not working as advertised in the SDK;'s?

From where I sit everything should be reading fine and geo-referencing things fine but for some reason it's grabbing the first source imagery and placing it into the lat/lon from the GeoTIFF referencing from the second.inf file's bounds...

Turning the usesourcedimensions=0 causes the render not to compile, turning it to usesourcedimensions=1 causes it to render but with the problems mentioned above, turning off "usesourcedimensions=" altogether (which is 0 by default) will cause it to render ok...

I'm completely lost here as to what the problem is...
 
Last edited:
Hi Folks

Dean -
Could your use of destination be confusing resample ?

The way I'd read it, :)
destination is not a standalone .inf file,
but required as a section within each .inf file.

EDIT -
i.e.
Still needs to be there,
but i only uses the last version.



Although you've supplied two data inf files
there are two of each [Source#]

Doesn't the second batch [Source#] need to be 5, 6, 7, 8 ?



Had your posted method worked previously ?



HTH
ATB
Paul
 
Last edited:
negatory, according to the SDK it's all based upon the [source] and [destination] headers in each *.inf file and the sourceN.inf's and final destination.inf don't really matter, however I will run another test to see if that might do the trick...

when resample reads it the -i switch says ignore all [destination] headers until the final one...

Resample is reading everything okay from those files and when I get a chance to get to the desktop render system again I can copy and paste the info that shows it appears to be reading each section correctly...

I did do one render for Utah a while back with just imagery (no night,water,blend) and it also jumbled the imagery and placed one or two images in the wrong location... On that test I did have each *.inf with a [destination] tag in all *.inf files...

I'll keep testing and this is something I should have chased up with the ESP team while it was still fully functioning...

From the ESP SDK at http://msdn.microsoft.com/en-us/library/cc707102.aspx (i.e. same as FSX SDK)
Multiple .inf files are allowed because it is possible for the [Source] and [Destination] sections to be in separate files. This is convenient when you want to generate different resolutions of data from a single source file. Build an .inf file for the source data and multiple .inf files with [Destination] sections for each destination file. To generate one destination file from multiple source files, create an .inf file with a [Source] section for each file and a .inf file with a [Destination] section and list them all on the command line with the destination .inf file listed last.
 
Last edited:
Hi Folks

Dean -
I hadn't realised you'd posted whilst I was editing.

I thought quick-edit would refresh to display or at least warn of additional posts. :)

EDIT -
I've just spotted your info in the FSX SDK.



ATB
Paul
 
Last edited:
Hmm no joy on adding the destination to each section and naming them different things then adding the -i switch still gives the same results...

I'll try your idea of the sourceN numbers being sequential but I don't think that's going to solve a whole lot either...

My choices are to manually generate 'strips' of data with separate strips of data for night/water/blend sources and reduce the file counts, or generate the alpha channels for the water/blend masks in photoshop and use libgeotiff tools and script our software to plug back in the geospatial data, or to just snag the .prj and .tfw data and plug that into the .inf source sections...

*sigh*

(edit) no joy on the sequential test either, has to be source1 source2 source3 source4 in each inf, so basically she don't work as advertised :( I might try manually adding the geotags in tomorrow after I've had some sleep but i'm starting to think that building the 2 alpha channels in photoshop and just plugging in the .prj/.tfw data will be the quickest and easiest approach...
 
Last edited:
Back
Top