Resample.exe not working

#1
For some reason when I try to drag the INF file over the resample.exe a black window opens suddenly and then closes. No bgl is created. I've checked that every source file and directory is correct. I've also tried using some of the resample examples. I've also moved the folder to the desktop and it still doesn't work. I have windows 10
 
#2
Hi Jason:

Try using a "DOS" (aka command mode) batch file as explained by rhumbaflappy:

https://www.fsdeveloper.com/forum/threads/multichannel-multisource.16118/post-104733

Copy the sourceses, the INF, and resample to the same directory. Then make a batch file in that directory:

Code:
resample MyPhotoreal.inf
pause
Save the text of the batch file as MyPhotoreal.bat, and double-click it. Resample will do it's thing, and then pause, leaving the cmd window open.

Or just search your Windows directory for cmd.exe, and copy it to your work folder. Double-click on the cmd.exe icon, and a dos window will open up. Then type: resample MyPhotoreal.inf

Dick
FYI: You can use Windows NotePad to create the text above, then save it as a *.BAT file extension so it will act as a 'batch' file:

CAVEAT: When saving one's work in NotePad, one must set the 'Save as type' to "All Files (*.*)" in order for the *.BAT file extension to be used instead of the *.txt file extension utilized by NotePad as a default.

Any error message can then be seen in the messages written out bu SDK Resample within that "CMD Mode" task session window.

GaryGB
 
Last edited:
#3
Hi Jason:

Try using a "DOS" (aka command mode) batch file as explained by rhumbaflappy:



FYI: You can use Windows NotePad to create the text above, then save it as a *.BAT file extension so it will act as a 'batch' file:

CAVEAT: When saving one's work in NotePad, one must set the 'Save as type' to "All Files (*.*)" in order for the *.BAT file extension to be used instead of the *.txt file extension utilized by NotePad as a default.

Any error message can then be seen in the messages written out bu SDK Resample within that "CMD Mode" task session window.

GaryGB
I'm definitely now getting a box and seeing things so that's good. However this is what I get when I run it:
Resample Info File: 'Photo01.inf'
[Destination] DestDir = '"C:\Users\Jasonz\Desktop\Airport\Photo01.INF"'
[Destination] DestBaseFileName = 'Photo01.INF'
[Destination] LOD = 'Auto'
[Destination] DestFileType = 'BGL'
[Destination] UseSourceDimensions = 1
[Destination] CompressionQuality = 85
Source Data required.
Press any key to continue . . .

And no file is created

I also tried with the Resample Examples and instead of Source Data required it says "Unable to open data source 'C:\Users\Desktop\Airport\SourceData\DeathValleyTif.Tif: Cannot Open. Failed to create data source
 
Last edited:
#4
Hi Jason:

There are no less than 4 different possible causes for the SDK Resample error message string: "Unable to open data source".

If you ZIP a copy of the Photo01.INF file cited above and attach it to a reply here, we would be better able to help you troubleshoot this. ;)

GaryGB
 
Last edited:
#5
Just in case you are copy/pasting the error message, and they are exactly as you've posted:
One of your quoted paths starts "C:\Users\Jasonz\Desktop\" and the other starts "C:\Users\Desktop\" which might point to a problem.
 
#6
Just in case you are copy/pasting the error message, and they are exactly as you've posted:
One of your quoted paths starts "C:\Users\Jasonz\Desktop\" and the other starts "C:\Users\Desktop\" which might point to a problem.
Found out the problem! For the DestDir you are not supposed to put the whole path, simply the path to the folder. If you put the whole path including the file at the end it doesn't work. So for example it should be "C:\Folder\" not "C:\Folder\File". Additionally everything but source 1 (day map) should be in TIFF because apparently GIMP exports problematic BMPs that can't be read for some reason so that's why there was an unable to open error.
 
#7
Hi again:

Although it may sometimes be necessary to use long and explicit paths to a source or destination folder (aka "directory"), this may increase risk for typos, use of paths which exceed the Windows internal 32-bit long file name limits for a file name string length.


Most FS developers will purposely put all required files and SDK Resample.exe in the same folder, then direct Resample to read and write into that same folder path by using the "DOS" / CMD Mode path variable "." to indicate 'this same folder path' as discussed here:

https://www.fsdeveloper.com/forum/threads/resampling-question.427216/post-647799


...and as shown in this FS SDK Resample example:

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


Hope this helps a bit more with the learning process. :)

GaryGB
 

Deano1973

Resource contributor
#8
For some reason when I try to drag the INF file over the resample.exe a black window opens suddenly and then closes. No bgl is created. I've checked that every source file and directory is correct. I've also tried using some of the resample examples. I've also moved the folder to the desktop and it still doesn't work. I have windows 10
I got this once, drove me mad for days trying to figure it out. Solution was that .bmp files needed to be opened in a simple art package like Paint, and then saved. That was all. It seems that some packages like GIMP save images with formatting that resample doesn't like. Give it a try :)
 
#9
Hi again:

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
 
Last edited:
Top