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

P3D v5 Converting lots of JP2 files into photoreal scenery

Messages
537
Country
us-missouri
I have a system to convert USGS imagery into photoreal scenery one 15-minute grid at a time. The process is pretty tedious and time consuming though, and it looks like Scenproc has come a long way on photoreal since I last did scenery. I read the manual and watched Arno's tutorial, which was quite helpful, but is there a way to import an entire 1-degree grid of JP2 files into Scenproc and have it convert the whole mess into photoreal BGLs? I have my script set up and am currently trying this, but the process seems to be stuck.

I wrote a script that can convert all the JP2s into TIFs in WGS 84 format, but with all the wonderful things Scenproc can do to the images and masks I'd love to see what all I can do.
 
Hi,

Can you show the script you already tried?

I think 1 degree night he too much to fit in memory at once.
 
Not doing the watermask step yet as I'm trying to figure things out one step at a time. The USGS data has four bands. TFC file is simple for now: Input --> Limit to three bands --> Output

ImportGDAL|F:\crush\tif\*|*|AUTODETECT
#
#ImportOGR|watermask.shp|*|*|NOREPROJ
#
ExportResamplePhotorealBGL|Photoreal.tf2|FTYPE="RASTER"|NONE|85|-1;-1;-1|-1;-1|-1;-1|DAY|*|F:\crush\Photoreal|34113

1695905774748.png
 
I see a problem with the output path, it seems to be two folders combined, I guess that might be a bug that absolute path is not supported well (I always use relative path myself).
 
Thank you for your response Arno. I see what my problem is; Scenproc is drawing the path from where the .SPC file is located. I moved that file to where I wanted the scenery and the problem was fixed.

Using just one file (out of the 256 necessary to make a one-degree tile of photoreal) I was able to make a BGL in just a few seconds. Processing all files at one is taking quite a while. Is there a way to compile them one at a time and create 256 separate BGLs?
 
I will fix the bug that the absolute path is not working.

You should be able to run the script in batch mode to make multiple files based on a different input each time.

But I think I would try to reduce the number of bgl files a bit. Have 256 per degree tile sounds like a lot.
 
Thank you so much for the quick solutions Arno! I looked through the manual and didn't see an example of how to write the script so it processes one file at a time from within the folder. And I am not finding a good solution from searching the site either. What would be the best way to write this so I can compile the 256 BGLs one at a time?
 
Did you have a look at chapter 9 of the manual? It explains the batch mode.

Basically you will use @0@ in the script for the filename and then you can pass the value of the filename as an argument each time you run the script.
 
I almost have it working, but I'm getting an error message that it can't find resample path. Verified that it is still in the options, and I can't find a different place where the resample path would be empty.

Starting job: F:\crush\TIF\NEW.spc
10:11:08 AM Information SceneryProcessor Variable @0@ Value F:\crush\TIF\m_3411301_se_12_1_20150531_20151022.tif
10:11:08 AM Information ImportGDAL Reading file F:\crush\TIF\m_3411301_se_12_1_20150531_20151022.tif
10:11:08 AM Information ImportGDAL Read 1 features from file
10:11:08 AM Error ExportResamplePhotorealBGL Resample path not specified, please set it in the options
10:11:08 AM Information SceneryProcessor scenProc finished processing
10:11:08 AM Information SceneryProcessor 0.00 seconds for ImportGDAL
10:11:08 AM Information SceneryProcessor 0.00 seconds for ExportResamplePhotorealBGL
10:11:08 AM Information SceneryProcessor 0.00 seconds total
Job done: F:\crush\TIF\NEW.spc
==================================================================
 
Humm, that's weird. Are you running from scenproc or using the batch runner and a worker?
 
Copy, the worker has no way to specify the path at the moment. It relies on finding the SDK path in the registry which is apparently not present on your system. I guess I need to add options to the worker as well.
 
I wonder if the problem is on my end... I have set up a registry entry for P3D V4 so I can install my version 4 aircraft into version 5. The registry entry points to P3D v5 I think. Is there a trick to point Scenproc to my v5 SDK, or could I install v4 SDK?
 
Hi,

I think you are missing the SDK registry entry indeed. Reinstalling the SDK should fix that indeed. But I still think the worker should also have a way to set such settings.
 
I have fixed the issue with the absolute path now, that will work in the next development release.
 
I reinstalled the v5 SDK and now the batch process is working. But it is overwriting the same file over and over. Is there something I can add to the basename to get the program to output the filename from the original file or at least add sequential numbers?

ExportResamplePhotorealBGL|Photoreal.tf2|FTYPE="RASTER"|NONE|85|-1;-1;-1|-1;-1|-1;-1|DAY|*|F:\crush\Photoreal|34113
 
You could use the variable for the filename without extension. Then you add the image extension on import and can also use it as base name for the bgl file.
 
I've looked for how to implement your solution, but I am stumped. I can't find information on how to do this in the manual. Is there another place I can look so I'm not wearing you out and can figure it out for myself?

Solving these kind of issues and learning how to make the computer work for you is half the fun of scenery design for me.
 
Hi Chris,

The solution I described can not fully be done from the batch runner UI at the moment. To add the files without their extension to the job list would require manual editing of the saved job list. But I also realized that after I posted the message, so I have just implemented a way to do it from the user interface. Besides that I have also just finished the change that allows you to set the worker options. I will push both of these changes to the development release soon.
 
Back
Top