Board index FlightGear Development Scenery

osm2city.py development

Questions and discussion about enhancing and populating the FlightGear world.

osm2city.py development

Postby radi » Wed Apr 23, 2014 12:16 pm

Image

Following Mathias' suggestion at FS Weekend 2013, I've now changed the code such that it merges all buildings per (osm2city) tile into one object, reducing the number of drawables from O(10k) to O(10). That indeed gives a nice speed-up. In fact, I'm overwhelmed by what's possible now -- here's a scene looking down at LOWI from FL300 showing 60k buildings. I've lost LOD and textures underway, but will fix that soon. Plain Scenery 2.0 gives 19 fps on i7 Intel HD 5000 2560x1440. WIth buildings framerate goes down to 14.

Image
This one went from 30 fps without buildings down to 20 fps.

Update 13 June 2014:
There are two texture packs now:
  • The texture folder contains textures that will be used by the generated models. Distribute this to your users.
  • The tex.src folder contains textures from which osm2city will create a texture atlas (which then will be stored in the above texture folder). You'll need this only if you are actually running osm2city.
Last edited by radi on Fri Jun 13, 2014 1:16 am, edited 1 time in total.
OSM buildings for LOWI, EDDC
Custom scenery for VHXX YMML
Edit .stg via the FG Object Placement Tool
radi
 
Posts: 621
Joined: Mon Aug 25, 2008 4:24 pm
Location: YMML, EDDC

Re: osm2city.py development

Postby psadro_gm » Wed Apr 23, 2014 1:16 pm

Indeed - modern GPUs can push ridiculous amounts of triangles - They just need to be batched together :) Work continues to try to batch more in the terrain as well. Then, we need to figure out how to get cockpit and shared scenery modelers on board.
8.50 airport parser, textured roads and streams...
psadro_gm
 
Posts: 750
Joined: Thu Aug 25, 2011 2:23 am
Location: Atlanta, GA USA
IRC name: psadro_*
Version: git
OS: Fedora 21

Re: osm2city.py development

Postby ludomotico » Wed Apr 23, 2014 1:26 pm

Nice! I'm using your script in my custom scenery, so I'm very excited with these enhancements on performance! I will stay tuned!
User avatar
ludomotico
 
Posts: 1002
Joined: Tue Apr 24, 2012 1:01 pm
Version: git
OS: Debian GNU/Linux

Re: osm2city.py development

Postby Hooray » Wed Apr 23, 2014 5:31 pm

you may want to update your wiki article, upload the screen shots there - and maybe add a few things to the upcoming newsletter.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11192
Joined: Tue Mar 25, 2008 8:40 am

Re: osm2city.py development

Postby f-ojac » Wed Apr 23, 2014 5:45 pm

Congratulations. Hopefully one day we'll find a solution to give users the possibility to use it "on demand" and widely.
--
If you want to support my Terrasync server, hosted on a private server, you can donate here: http://ns334561.ip-5-196-65.eu/WS2.0/WS ... 2.0.1.html
f-ojac
 
Posts: 1271
Joined: Fri Mar 07, 2008 9:50 am
Version: GIT
OS: GNU/Linux

Re: osm2city.py development

Postby Soitanen » Wed Apr 23, 2014 6:28 pm

Great news!
By the way, osm2city folder contents osm2pylon.py file. How to use it? Or it's not usable now?
Boeing 737-300. Reworked cockpit, FDM, autopilot and much more. WIP.
Boeing 737-800. WIP. Canvas PFD and ND.
Antonov An-24B. Made from scratch. Very good FDM. 3D model by Adrian. WIP.
Project Russia (some cities, based on OSM with custom objects).
Soitanen
 
Posts: 487
Joined: Sat Jun 16, 2012 6:50 am
Location: Saint-Petersburg, Russia
Version: git
OS: Linux Mint 17

Re: osm2city.py development

Postby f-ojac » Wed Apr 23, 2014 6:47 pm

Note that we know have an automated import tool for power pylons able to add all worldwide OSM pylons into scenemodels and align them properly. We just have more testing to do before going into production.
--
If you want to support my Terrasync server, hosted on a private server, you can donate here: http://ns334561.ip-5-196-65.eu/WS2.0/WS ... 2.0.1.html
f-ojac
 
Posts: 1271
Joined: Fri Mar 07, 2008 9:50 am
Version: GIT
OS: GNU/Linux

Re: osm2city.py development

Postby radi » Wed Apr 23, 2014 11:14 pm

give users the possibility to use it "on demand" and widely.

That remains my long-term goal. Autogen cities based on OSM with a level of detail comparable to X-Plane 10, created on the fly within FG. We'll get there.

osm2pylon.py is vanosten's work. I understand that it (also) aims at importing ski lift pylons. Maybe he can comment?
OSM buildings for LOWI, EDDC
Custom scenery for VHXX YMML
Edit .stg via the FG Object Placement Tool
radi
 
Posts: 621
Joined: Mon Aug 25, 2008 4:24 pm
Location: YMML, EDDC

Re: osm2city.py development

Postby anonymous2 » Thu Apr 24, 2014 8:18 am

.
Last edited by anonymous2 on Thu Oct 02, 2014 9:01 am, edited 1 time in total.
anonymous2
Retired
 
Posts: 49
Joined: Sun Jan 31, 2010 2:19 pm

Re: osm2city.py development

Postby radi » Thu Apr 24, 2014 8:30 am

disabling the power pylons and chimneys (with smoke) models

Quick'n'dirty hack: delete/rename the corresponding shared model.
Or make a script along the lines
Code: Select all
for stg in *.stg; do
sed 's/OBJECT_SHARED Models/Power/generic_pylon_/#OBJECT_SHARED Models/Power/generic_pylon_/' $stg > tmp.stg
mv tmp.stg $stg
done
OSM buildings for LOWI, EDDC
Custom scenery for VHXX YMML
Edit .stg via the FG Object Placement Tool
radi
 
Posts: 621
Joined: Mon Aug 25, 2008 4:24 pm
Location: YMML, EDDC

Re: osm2city.py development

Postby anonymous2 » Thu Apr 24, 2014 9:01 am

.
Last edited by anonymous2 on Thu Oct 02, 2014 9:01 am, edited 1 time in total.
anonymous2
Retired
 
Posts: 49
Joined: Sun Jan 31, 2010 2:19 pm

Re: osm2city.py development

Postby Thorsten » Thu Apr 24, 2014 9:07 am

That looks pretty cool - so - what was the framerate for 60k individual objects?
Thorsten
 
Posts: 9997
Joined: Mon Nov 02, 2009 8:33 am

Re: osm2city.py development

Postby f-ojac » Thu Apr 24, 2014 11:19 am

evilslut wrote in Thu Apr 24, 2014 8:18 am:
f-ojac wrote in Wed Apr 23, 2014 6:47 pm:We just have more testing to do before going into production.

Quite a bit more yes, many many places with either very strange locations and/or very very high quantities of those things which seem incorrect.

The tool I was talking about is NOT in production, so this meens you have no way to see the result via Terrasync for instance. The pylons in TS are here since ages, and imported with an "old" tool you can find on the git repo.
--
If you want to support my Terrasync server, hosted on a private server, you can donate here: http://ns334561.ip-5-196-65.eu/WS2.0/WS ... 2.0.1.html
f-ojac
 
Posts: 1271
Joined: Fri Mar 07, 2008 9:50 am
Version: GIT
OS: GNU/Linux

Re: osm2city.py development

Postby radi » Thu Apr 24, 2014 1:13 pm

Thorsten wrote in Thu Apr 24, 2014 9:07 am:the framerate for 60k individual objects?

The first scene runs at 5 fps, the second at 6 fps. Plus, loading takes much longer. However, the comparison is not entirely fair, since the old code creates gable roofs while the new one doesnt (yet), so the vertex count is higher. OTOH, the old code uses LOD, which should speed up things at least for the second scene.
OSM buildings for LOWI, EDDC
Custom scenery for VHXX YMML
Edit .stg via the FG Object Placement Tool
radi
 
Posts: 621
Joined: Mon Aug 25, 2008 4:24 pm
Location: YMML, EDDC

Re: osm2city.py development

Postby vanosten » Fri Apr 25, 2014 4:37 pm

osm2pylons is meant to be a companion for osm2city. Unfortunately I have not had time to work on it for many months - hopefully this will change the coming weeks. It is meant both for power pylons (including cables) and aerialways etc. Currently the cable part is missing and for aerialways I use street furniture as a replacement for missing shared models. My plan is to make some shared models and cables in osm2pylons. However that will be it. It seems to me that others are working on on-the-fly generation of scenery based on OSM data - and I might join those ideas seeing the python stuff as proof of concept.
Maintaining osm2city
vanosten
 
Posts: 344
Joined: Sat Sep 25, 2010 5:38 pm
Location: Denmark - but I am Swiss
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Next

Return to Scenery

Who is online

Users browsing this forum: No registered users and 4 guests