[section]Orthographic[/section]\r
\r
-A utility to generate photorealistic satellite imagery of any location in the world. Aimed to be an alternative for ortho photos in flight simulators, such as X-Plane or Microsoft Flight Simulator. Written in Python.\r
+A utility to approximate satellite imagery of any location in the world. Aimed to be viable alternative for ortho photos in flight simulators, such as X-Plane or Microsoft Flight Simulator, with the main purpose to eliminate challenges with actual orthophotos. Written in Python.\r
\r
While tools like Ortho4XP or AutoOrtho can provide next-level realism into X-Plane, the idea still falls short when it hits photos that were stitched together. In one or many ortho photos, you will see parts of the specific area of which the photo was not taken at the same time as another part, resulting in what is known as discoloration. Sometimes you will also find clouds in the photos, or remnants of buildings or attractions which show perspective distortion. This is a huge immersion-breaker for me and many others. A problem I wanted to tackle for my flight simulator - Orthographic may just be the solution that does away with all issues when it comes to ortho photos in flight simulators.\r
\r
-Currently, three zoom levels are implemented, which are practically all cases suited well enough for the purpose of flight simulation: 16, 17, 18. I used zoom level 16 for areas I fly over, and 18 for areas close to an airport.\r
+Currently, zoom level 18 is implemented.\r
\r
[section]Wait, just what are ortho photos?[/section]\r
\r
- Covert each mask layer to a photo-realistic layer\r
- Merge (blend) all layers from bottom to top\r
\r
-Orthographic creates zoom level 18 tiles for everything it encounters - but at the end, once all orthos are generated, zoom level 16 photos will be the final product as this is in almost all cases sufficient to fly in many altitudes.\r
+Orthographic creates zoom level 18 tiles for everything it encounters. If you want scenery to be generated, it can also optionally create normal maps for your flight simulator which makes the tiles appear more realistic without using additional geometry. For example, in X-Plane, normal maps not only define the "bumpiness" of a texture, it also defines its shininess or specularity. This is defined by the alpha value of each pixel, in the normal map image.\r
\r
-However, around airports, it will keep the original zoom level 18 tiles so that you have more detail when you fly into, and away from, airports.\r
+The final tile images are stored in DDS format with standard DCX-1 compression, which should be usable by X-Plane and Microsoft Flight Simulator.\r
\r
-This is achieved by "memorizing" all airports with ICAO codes it encounters along its journey, then determining which ortho tiles to keep at zoom level 18.\r
+If you want to deep-dive into the technical details of the software, you can download my whitepaper in PDF format on the project here: [link]WP-URL[/link]\r
\r
\r
[section]Important things to note[/section]\r
\r
Orthographic does its very best to approximate good-looking ortho photos, as if they were taken by a satellite. However it is what it is: an approximation - it cannot replace or even get close to the actual, real world. I have tried my very best to bring in some variety, and make it so that every part generated does not repeat or look the same - like it is the case with other ortho packages I have tried, apart from Ortho4XP / AutoOrtho.\r
\r
-It is, at the end of the day, for a flight simulator. Orthographic can strike the right balance between accuracy of the part of the world you fly in, and looks.\r
+It is, at the end of the day, for a flight simulator. I believe Orthographic can strike the right balance between accuracy of the part of the world you fly in, and acceptable yet somewhat realistic looks.\r
\r
Prior to publishing, there have been many iterations and hours of testing the generation of buildings. While the current state is far from perfect, it is as best I can make it - and I think we can agree that it looks good enough... for flight simulators. With the right tools in place, buildings will most likely be placed on many of these locations anyways.\r
\r
+Also, prior to publishing, there has been extensive testing of the code that generates the normal maps to make water as best looking as possible. And trust me, this has been an interesting challenge (to say the least).\r
+\r
\r
[section]Where it excels[/section]\r
\r
\r
At this time, it also falls short in generating the 3D geometry for a tile. It is specialised to generate ortho photos - or in other words, textures for existing geometry.\r
\r
-Buildings are usually generalized and show up with the same pattern. I need to work on that.\r
+Buildings are a challenge still - but in time the code for buildings has grown to the way it is now, and I think when blended with actual 3D geometry, the generated orthos really shine (provided the 3D geometry for buildings used the same OSM data than I did).\r
\r
-Apart from that I am aware that the code is most likely not the best and can be optimized. It is my first serious Python project.\r
+Apart from that I am aware that the code is most likely not the best and can be optimized. It is my first bigger Python project I dare publishing.\r
\r
\r
[section]Requirements[/section]\r
\r
-- Current Python version\r
-- Pillow for Python\r
-- SQLite must be available to Python. On Windows it is by default, you may need to install the sqlite3 developer libraries on your distribution, then compile Python to automatically avail of this built-in module.\r
+- Current Python version (3.10 and up)\r
+- Python modules: Pillow (formerly PIL), wand, numpy\r
+- SQLite must be available to Python. On Windows it is by default, you may need to install the sqlite3 developer libraries on your distribution, then compile Python to automatically avail of this built-in module. On my Endeavour OS install, SQLite was already built-in to the Python package.\r
\r
\r
[section]Configuration[/section]\r
\r
-- Open the file defines.py\r
-- Change mstr_datafolder to where you want the data of Orthographic to be stored and placed\r
-- Change mstr_airport_radius to an amount in zoom level 18 tiles. Areas around airports with ICAO code will get aerials with zoom level 18. I recommend to leave the default at 5\r
-- You can turn console logging on or off by changing the variable mstr_show_log\r
+Open the file defines.py .\r
+\r
+You will find various configuration options, each of which is documented what it does.\r
\r
In this file you can also define how large you want the final products to be - you can choose between 4k resolution (2048px) or 16k resolution (4096). The choice you make here should be based on 1) how much detail you want, and 2) how much VRAM your GPU has. The larger a texture, the more VRAM is needed, and the more processing is required by the GPU. I personally go with 2048, as I have a RTX2060, so my VRAM is limited. When at altitudes of 10,000 feet and above, you will most definitely not notice the difference between 4096 and 2048.\r
\r
\r
[section]Improving the code[/section]\r
\r
-As I have hosted this on my private but publicly accessible gitweb (which is the same tool kernel.org uses btw), it should be clear that I am making the code available to everyone. Of course, you are free to improve (I am sure the code needs some optimisation). If you changed or improved something, and you publish it (no matter where), you MUST adhere to the license this software ships with, which is OSL 3.0.\r
+As I have hosted this on my private but publicly accessible git repository, it should be clear that I am making the code available to everyone. Of course, you are free to improve (I am sure the code needs some optimisation). If you changed or improved something, and you publish it (no matter where), you MUST adhere to the license this software ships with, which is OSL 3.0.\r
\r
-As it is hosted on my private gitweb, and not in a public instance like GitHub, I need to be very careful and clear about this. In short it means, also legally, that you cannot download the current snapshot, post the content somewhere else, and claim you made it. Respect the time, work and energy I have invested into this project :)\r
+As it is hosted on my private gitweb, and not in a public instance like GitHub, I need to be very careful and clear about this. In short it means, also legally, that you cannot download the current snapshot, post the content somewhere else, and claim you made it. Respect the time, work and energy I have invested into this project :) .\r
\r