Read Me
ORTHO4XP version alpha 2
Le 14 juillet 2015.
En trois points les vraies nouveautés de cette version :
- il s'agit maintenant d'un mailleur à part entière, plus besoin de partir
d'un dsf existant.
- plus de surcharge due au recouvrement des textures, comme on crée les
triangles nous mêmes on s'arrange dès le départ pour que tout se passe
bien au niveau des bords des orthophotos.
- le traitement des bords de mer est arrivé à un stade satisfaisant et qui
permettra à tout un chacun de faire ses tuiles sans besoin d'être un
expert en retouche de photo.
Deux autres évolutions mineures :
- le français redevient la langue par défaut !
- plus besoin de lancer l'interpréteur python, pour créer la tuile Ouessant
on tape en ligne de commande :
Ortho4XP build_tile 48 -6
Pour lancer la commande ci-dessus, l'unique prérequis en dehors de l'archive
ici sur sourceforge est python3 avec les modules requests (téléchargements
http), overpy (téléchargement openstreetmap) et gdal (traitement des fichiers
d'altitude au format tiff). Ils s'installent par pip3 ou easy-install en une
instruction.
Un manuel plus ou moins détaillé suivra suivant le nombre de jours de pluies
de cet été...
______________________________________________________________________________
ARCHIVE DE LA VERSION ALPHA 1
______________________________________________________________________________
INSTALLATION INSTRUCTIONS FOR ORTHO4XP
FIRST :
-------
A.1 : [Linux derived from Debian]
In a terminal issue (that may vary slightly with your distribution)
apt-get install python3
apt-get install pip3
pip3 install requests
apt-get install imagemagick (should be >= 6.8, check your distribution or choose Debian ;-)
apt-get install 7z
Your DSFTool build is in the repo, directory 'Utils'.
A.2 : [Windows ]
NOTICE: The proposed method here below is based on cygwin. Some instabilities of this emulator habe been
reported (https://www.cygwin.com/faq.html#faq.using.bloda).
Download cygwin at www.cygwin.com and install it to the disk where you'll want your Ortho4XP dir to be (1GB for the
full install).
During installation, you'll be asked which software you want to include, in addition to the base ones.
Choose (at least) the following :
- in the "search" field type python3, then select (for simplicity) all python3 modules
(click on 'Default', it will change to 'Install')
- in the "search" field type git, then select '+Devel' and inside it select 'git'
- in the "search" field type imagemagick, then select '+Graphics' and inside it select '6.9.0' (or newer if updated)
- in the "search field type 7z, then select '+Archive' and inside it select 'p7zip'
Finish the installation.
Then to setup Ortho4XP :
- Launch the cygwin64 terminal and issue :
cd /home
mkdir oscarpilote
cd oscarpilote
mkdir Ortho4XP
git clone git://git.code.sf.net/p/ortho4xp/code .
Congratulations your are done !
Now still in the terminal issue
python3
from Ortho4XP_alpha1 import *
Ortho4XP('+45+006')
and you should see you first example tile being built (with low resolution for your first tile!).
A.3 : [Mac Os X]
Install python3, imagemagick, git (to download this code) and 7zip (if you wish to use compressed dsf).
--> Important notice :
To have nice water transitions we need more 9 plane coordinates for vertices than is available in the online version
of DSFTool. The consequence is that the complied version available at developer.x-plane.com cannot be used.
--> I have included the Linux, Win7 and Os X 10.6 64 bit builds in the repo here, I expect that they would work for similar platforms (i.e. Win > 7 or Os X > 10.5), but I don't have easy ways to check that.
------
If for some reason you want to recompile your own, follow the instructions on
http://developer.x-plane.com/code/ and follow instructions, and after you get
the source code, you should make the following change :
replace the 8 by a 10 at line 51 (as of June 4th 2015) of DSFPointPool.h regarding MAX_TUPLE_LEN
(you can preview the file at http://dev.x-plane.com/cgit/cgit.cgi/xptools.git/tree/src/DSF/DSFPointPool.h)
The two 'make' commands listed on B. Supnik's tutorial will do too much work for our purposes (and will last long),
you can just build zlib for the libs, and DSFTool for the second make (we don't need WED
and so on here!). Compilation time is a few seconds.
You are advised to force gcc to make 32bit code, DSFTool is knwon to be buggy in its 64bit version ('Could
not sink vertex' bug)
------
SECOND :
--------
Read the preamble of the file Ortho4XP_alpha1.py for instructions of use and more. You can also try to read the source if you wish to modify it or understand how it works.
Additional functions are in the code which are not documented in the preamble, in particular build_texture_region which might be helpful.
!!!!!!!!!!!!!!!!!!!!!!!!!
! BEWARE :
!!!!!!!!!!!!!!!!!!!!!!!!!
Python is very handy and easy to learn (I started this Spring) but also very sensitive to indentation
(remove a white space can often result in a code that won't run). Don't do things in a rush of without first
reading a bit on python, or be prepared for bug tracking (that happens all the time to me though).
THIRD :
-------
This alpha1 release does not contain the sources named FR, IT, BE, SP, CH in the code. Trying to use them will thus
result in failure. All necessary material is included though (in particular sometimes tricky coordinate change) except for
the http requests addresses. They will be added when additional code related to dealing better with country borders will be ready, and
when we become more confident that the servers behind those services will support that.
Also, as mentioned earlier, a simple way to blend water and orthophotos was implemented here. It works ok for lakes or rivers
which are covered by orthophotos, but its present state is not satisfactory on the sea at the distance where most orthophoto sources
start to put white images and/or other trash. I am working on improving this, in the meantime you can comment out the call to create_water_overlay
and you'll be back to 'traditional' X-Plane water.
Finally, a graphical interface and more complex geographical choices (you can already use polygons instead of rectangles for region selection,
two basic examples are in Border_polygons) are on the todo list, but using an 'orthophoto targeted' meshtool replacement is
higher on my priority list.
Best wishes,
Oscar Pilote
June 6th 2015
Last edited June 10th 2015.
Acknowledgements:
-----------------
Many thanks to Pascal P. from XPFR for early Windows testing and nice suggestions.