Tuesday, May 1, 2012

Adding autogen automatically to FSX photoreal scenery



These days I am working on a huge project, creating a FSX photoreal scenery covering my home country. One of the problem I faced was adding autogen to the textures. As adding it manually would have taken ages I have been looking from start for some automatic solution that can do it for me.
After some long searches I have found it. Actuall it is a combination of a couple of programs, but the end result was adding autogen to over 70%  of the country, in just three days, and without too much work from my side.

So here is how I did it:



Method 1 - scenProc

This is in my opinion one of the greatest programs written for FSX. It is a simple commnand line program without a interface, but what it does, is just magic. ScenProc takes as input a shape file from OpenStreetMaps  and based on a short config file detailed here creates autogen based on that shape file content.

In my case I took a shapefile containing all the forest surfaces in my country as polygons and fed it to the program which generated autogen files with the forests afteer 1.5 days of processing. Then I took a second shape file containing building footprints for larger cities and the result was buildings in my FSX cities (well in the big cities, but still something).
The only problem was that my computer had to run for 3 days non  stop to achieve this, but still better that me working 3 months with the annotator.

The only other problem I had, beside the long processing time, was that sceneproc was unable to process very large shape files due to some memory limitations, so I recommend not combining more than 1 shape file at once (except if they are small surfaces). In my case combining two 25mb shape files crashed the program after a day, but individually they worked.

If the shape file is too big you can split it using a free GIS software, like Quantum Gis. Using QGis I was also been able to export some points of interest, like hotels, buildings, ruins, etc. in csv format, from another shape file, with coordinates and then I manually assigned a GUID to each and created with excel formula a xml file for BGL compiler. This way I added around 6000 landmarks in my country.

A quick tutorial from the author on how to use scenProc:


For better results I combined this method with the next one, but that required me to have the scenery compiled first for FS2004 (with individual textures rather than a single BGL file like FSX does it). I was lucky to have both FSX and FS2004 versions of the scenery.


Method 2  -  Autotrees

As mentioned this works with FS2004 scenery as it requires to open each tile texture from the photoreal scenery. Also the agn files are created in fs2004 format but it also works in FSX.
This program opens each individual texure file and adds automatically autogen trees based on an image recognition algorithm. It is quite good if you have good resolution textures. It can run in batch mode on over 50000 textures and it managed to fill the gaps that scenProcs left quite well. Takes a while to run but again still better than manual work ;)


9 comments:

Anonymous said...

Have a look at www.virtual-aerospace.com went there 2 weeks ago. had THE most amazing flight in a Boeing 737 800 TDeane

Anonymous said...

http://www.PlusFlightSimulators.blogspot.com/

Zackery Sprague said...

Hey Bro,

Nice blog man! I leanred a lot from the methods you have created. You have given me a lot insight for my future blogs in the future.

Ron said...

Hey fantastic article about flight simulation.
Did you know that the first flight simulator was commercialized in 1929 by Edwin Albert Link. It was called the “Blue Box” or “Link Trainer”, which started the now multi-billion dollar flight simulation, and flight simulator game industry we have today. Have you seen this other site on flight simulation, it's similar to yours Proflight Simulator Game, Cheers.

Anonymous said...

Thank you I will try this Tuto, regards FM

Abid Ali said...

The post is really very informative.
Flights to Pakistan

Pat Sharp said...

Hello, You have wrote a really good article. I will come back often to read your blog. Great work.

John Nowaj@FlightSimulator said...

Great Simulator
for Google Earth

Atlanta web design said...

This is one of the highly attractive, informatics, well-written and highly crisp blog that has been explained in fabulous manner to help out reader and visitors. All information found here is genuine and realistic.

http://www.bestwebchoice.com/