Recommended Posts

Posted (edited)
Hey guys,
 
I modified Ortho4XP version 1.30 to enable support for FSX/P3D. The main advantage over FSEarthTiles is that water masks are created dynamically and accurately from OpenStreetMap data at extremely high detail (no more slaving over creating accurate water masks). I will try to add creation of night and seasonal masks in the future (no ETA as I'm very busy).
 
All that it requires is ticking the box "Build for ESP (FSX/P3D)" before clicking on batch build. The BGL files will be placed inside the main program directory\Orthophotos\. From there, find the folder which contains the orthophotos for the area just downloaded. In that folder will be an ADDON_SCENERY folder. This can be renamed to whatever name you wish and added to FSX/P3D scenery.
 
The program requires resample.exe from the FSX/P3D SDK. You can install the SDK from Lockheed Martin's website if you have P3D. If you have FSX, the SDK comes on one of the discs of the deluxe edition or in the gold/acceleration pack disk.
 
In Ortho4XP.cfg, you need to change the last line (ie
ESP_resample_loc=F:\\ortho4xpvm\\resample.exe
)
And type in the location to your resample.exe from the SDK after the equals sign, deleting the current location that is already there. Notice that backslashes need to be escaped with another backslash, so make sure to always put two backslashes instead of one for windows paths.)
 
I have provided a binary built using pyinstaller in the dist folder. If you don't trust it, then feel free to install all the required modules manually and run Ortho4XP_v130.py in the main folder with python.
 
Forks and pull requests are welcome with bug fixes/feature improvements. I plan to add creation of night masks and season masks by porting over these algorithms from the masking scripts of the new version of FSEarthTiles.
 
Please notify me of any bugs here, so that I have a better chance of seeing it.
 
Here is a link to the github where you can download the code and the binary (note, you need to download the whole repository even if you just want the binary):
 
 
Finally, and this is pretty obvious, use at your own risk :).
Edited by kjjj11223344
  • Like 2
  • Upvote 2

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Does this allow the display of autogen over the orthophoto in P3D?

Share this post


Link to post
Share on other sites
1 hour ago, AirborneZed said:

Does this allow the display of autogen over the orthophoto in P3D?s

Not yet, that is a feature I hope to add in the future. If you want to add accurate autogen right now from OpenStreetMap, I suggest looking at scenproc: https://www.scenerydesign.org/scenproc/

  • Like 3

Share this post


Link to post
Share on other sites

Outstanding!

 

Haven't tried ScenProc before. Is it difficult?

Share this post


Link to post
Share on other sites
4 hours ago, OzWookiee said:

Haven't tried ScenProc before. Is it difficult?

I have used it for AeroflyFS2. Use as such for limited areas is quite easy, however, you need a good script for interpreting which features should translate into which autogen objects (which depend on the simulator, of course). AeroflyFS2 associated developer Rodeo provides such a script for AeroflyFS2 as a start which works quite well for "ordinary/average" cities (I could create my home town pretty well using it). However you have to modify it when it comes to special regions (say historic old towns, dedicated industrial areas etc.)

However, it's well possible there are already appropriate scripts available for Prepar3d which I didn't check. Besides, these scripts are just open ASCII files which you can edit, thus it's not rocket science to adapt them to your need and talented people should be able to provide good templates.

Kind regards, Michael

Share this post


Link to post
Share on other sites

Outstanding work! Just made a test tile for the southern part of the Netherlands. And I'm very enthusiastic about this!
Looking forward to the point at witch autogen is/can be added

Share this post


Link to post
Share on other sites

This looks pretty neat but I balk at the complex install.

Is there a dummy 'click on .exe to install' version?

Share this post


Link to post
Share on other sites

VB you've taken the words right out of my mouth. Tried it in XP and pretty user friendly (didn't even have to use 'Python' ....) reading the instructions for this version its way beyond a non-pcwhizzkid like myself .... made me feel like running off and hiding under a rock .... hopefully in time it might be dumbed down for mere mortals ..... great news though!

Share this post


Link to post
Share on other sites
38 minutes ago, AKStirling said:

VB you've taken the words right out of my mouth. Tried it in XP and pretty user friendly (didn't even have to use 'Python' ....) reading the instructions for this version its way beyond a non-pcwhizzkid like myself .... made me feel like running off and hiding under a rock .... hopefully in time it might be dumbed down for mere mortals ..... great news though!

What's better than having source code on github and you can help fixing bugs and adding new features as you go?

Share this post


Link to post
Share on other sites
Posted (edited)
1 hour ago, AKStirling said:

VB you've taken the words right out of my mouth. Tried it in XP and pretty user friendly (didn't even have to use 'Python' ....) reading the instructions for this version its way beyond a non-pcwhizzkid like myself .... made me feel like running off and hiding under a rock .... hopefully in time it might be dumbed down for mere mortals ..... great news though!

Actually, I did create a self contained exe that is simple to run:). I admit, the instructions aren't very good. I wrote them too quickly and are difficult to understand. They are mainly for if you dont trust my exe and want to read the code and build it yourself. But the exe works by simply double clicking. Simply download the folders from github, and run the exe from within the dist directory.

Edited by kjjj11223344
grammar

Share this post


Link to post
Share on other sites
Posted (edited)

rethought and removed reply ........

Edited by AKStirling
reconsideration

Share this post


Link to post
Share on other sites

Just one question though, the tool generates two folders - terrain/ and texture/. How do you add these to P3D?

Share this post


Link to post
Share on other sites

I can't find this line "ESP_resample_loc=F:\\ortho4xpvm\\resample.exe" in Ortho4xp.CFG and I couldn't find "Build for ESP"

Share this post


Link to post
Share on other sites
3 minutes ago, Raheem Adeleke Quadri said:

I can't find this line "ESP_resample_loc=F:\\ortho4xpvm\\resample.exe" in Ortho4xp.CFG and I couldn't find "Build for ESP"

resample.exe is in fsx/p3d sdk.

Share this post


Link to post
Share on other sites
4 minutes ago, Cai Zicheng said:

resample.exe is in fsx/p3d sdk.

I know that, I can't find the line that should be edited in ortho4xp.cfg, and also I cant see any box like BUILD FOR ESP.

Share this post


Link to post
Share on other sites

Hi kjjj

This program has the potential to be a real game changer for P3D but I am having problems getting it to work right.

1)   Python3.5 and all required packages are installed correctly

2)   resample.exe is in place

3)   ortho4xp.cfg modifiedas instructed to locate resample.exe

4)   latest version of your program in use and ortho4xp_v130.exe  from the dist folder runs without errors and outputs "stuff" (see d) and e) below).

BUT

a)   there is no sign of "Build for ESP" an a check box

b)   BGLs are not created/output to the orthophotos folder  

c)   there is no sign of an ADDON_SCENERY folder

d)  the orthophotos folder contains downloaded orthoimagery JPGs 

e)   the tiles folder contains (for area +49-001:

earth nav data folder

terrain folder containing .TER files

textures folder containing DDS and PNG files

ortho4xp_+49-001.cfg

Data+49-001.mesh

Data+49-001.poly

Data+49-001.node

Data+49-001.alt

Data+49-001.apt

 

What have I done wrong???

Aussibob

Share this post


Link to post
Share on other sites

Great program, Ortho looks great in P3D.

Although it takes extremely long time to generate a tile. Generating a ZL16 tile would generally take me 10-20 minutes for X-Plane but generating a ZL16 tile for P3D took me 2 hours and 30 minutes. Any reason for this?

Share this post


Link to post
Share on other sites
3 hours ago, aussibob1 said:

Hi kjjj

This program has the potential to be a real game changer for P3D but I am having problems getting it to work right.

Here's what I have figured out. You have to compile the scenery into bgl files yourself using P3D SDK. I have written a MATLAB script to do so in batch and parallel, and you can translate into whatever language you code in.

 

clear classes;close all;clc
sceneryFolder = "H:\Ortho4XP_FSX_P3D-airport_auto_patch\Orthophotos\+30-100\+30-098\BI_18";
resampleFilePath = "C:\Program Files\Lockheed Martin\Prepar3D v4 SDK 4.3.29.25520\World\Terrain\resample.exe";
fileList = dir(sceneryFolder);
fileList(1:2,:) = [];
infList = [];
infFolder = fileList.folder
for index = 1:size(fileList,1)
	if strcmp(extractAfter(fileList(index).name,"."),'inf')
		infList = [infList;fileList(index).name];
	end
end
fprintf("Inf Search Complete\n")
parfor infIndex = 1:size(infList,1)

	cmdStr = strcat('"',resampleFilePath,'"'," ",infFolder,"\",infList(infIndex,:))
	system(cmdStr)

end

 

Share this post


Link to post
Share on other sites
On 7/14/2018 at 3:38 PM, Cai Zicheng said:

Just one question though, the tool generates two folders - terrain/ and texture/. How do you add these to P3D?

If you select build for esp, it will create an ADDON_SCENERY folder inside the folder for the area you selected inside the Orthophotos folder.

Share this post


Link to post
Share on other sites
On 7/14/2018 at 4:24 PM, Raheem Adeleke Quadri said:

I can't find this line "ESP_resample_loc=F:\\ortho4xpvm\\resample.exe" in Ortho4xp.CFG and I couldn't find "Build for ESP"

Weird, can you try the download again? I will post a video with the steps required.

Share this post


Link to post
Share on other sites
15 hours ago, 09tir98 said:

Great program, Ortho looks great in P3D.

Although it takes extremely long time to generate a tile. Generating a ZL16 tile would generally take me 10-20 minutes for X-Plane but generating a ZL16 tile for P3D took me 2 hours and 30 minutes. Any reason for this?

What step took the longest? Besides creating different image formats than for xplane, the only extra step that’s extra for P3D is running resample, which can take a while.

Share this post


Link to post
Share on other sites
17 hours ago, aussibob1 said:

Hi kjjj

This program has the potential to be a real game changer for P3D but I am having problems getting it to work right.

1)   Python3.5 and all required packages are installed correctly

2)   resample.exe is in place

3)   ortho4xp.cfg modifiedas instructed to locate resample.exe

4)   latest version of your program in use and ortho4xp_v130.exe  from the dist folder runs without errors and outputs "stuff" (see d) and e) below).

BUT

a)   there is no sign of "Build for ESP" an a check box

b)   BGLs are not created/output to the orthophotos folder  

c)   there is no sign of an ADDON_SCENERY folder

d)  the orthophotos folder contains downloaded orthoimagery JPGs 

e)   the tiles folder contains (for area +49-001:

earth nav data folder

terrain folder containing .TER files

textures folder containing DDS and PNG files

ortho4xp_+49-001.cfg

Data+49-001.mesh

Data+49-001.poly

Data+49-001.node

Data+49-001.alt

Data+49-001.apt

 

What have I done wrong???

Aussibob

I will post a video with a quick tutorial :).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now