Board index FlightGear Development Scenery

osm2city.py development

Questions and discussion about enhancing and populating the FlightGear world.

Re: osm2city.py development

Postby legoboyvdlp » Sat Nov 17, 2018 9:34 am

It essentially was putting houses where in real life there were only mountains. The houses also had incorrect elevation - some of the were floating in midair halfway down the mountain as it obviously queried the elevation further up. This also occurs without owbb - I think I posted a screenshot . (is it possible to query terrain slope to resolve this?)
User avatar
legoboyvdlp
 
Posts: 5826
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: osm2city.py development

Postby vanosten » Sat Nov 17, 2018 10:47 am

legoboyvdlp wrote in Sat Nov 17, 2018 9:34 am:It essentially was putting houses where in real life there were only mountains. The houses also had incorrect elevation - some of the were floating in midair halfway down the mountain as it obviously queried the elevation further up. This also occurs without owbb - I think I posted a screenshot . (is it possible to query terrain slope to resolve this?)


Ok, that screenshot I have seen. And I might have an explanation for at least why houses are placed in odd areas later this weekend, because I found the reason why no additional houses got populated near Honolulu: for some reason ca. 2 weeks ago I messed up previously working code for gettin gBTG land-use - now the projection is plain wrong. Most probably an easy fix.

So if someone is considering building new scenery with plausible buildings: please wait a bit.

PS: code added last week to make sure that buildings in airports do not look too "arbitrary" and only have gabled roofs if OSM tells so.
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

Re: osm2city.py development

Postby merspieler » Sat Nov 17, 2018 6:01 pm

I've set the following parameters to True but i don't see any change....

C2P_PROCESS_STREETLAMPS
C2P_PROCESS_OVERHEAD_LINES
Love at first flight
Checkout Autopush. An improvment to the pushback to make your life easier.
merspieler
 
Posts: 169
Joined: Thu Oct 26, 2017 10:43 am
Location: GCLP
Callsign: LH454, HG3840, LX64
IRC name: merspieler
Version: 2018.3.1
OS: Linux

Re: osm2city.py development

Postby vanosten » Sat Nov 17, 2018 6:27 pm

It is because these are written to a folder called "Details". If you want to use it, then you have to rename the folder to "Objects". Future FG versions might get a switch in the rendering dialog.
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

Re: osm2city.py development

Postby merspieler » Sat Nov 17, 2018 6:55 pm

Ok, thanks
Love at first flight
Checkout Autopush. An improvment to the pushback to make your life easier.
merspieler
 
Posts: 169
Joined: Thu Oct 26, 2017 10:43 am
Location: GCLP
Callsign: LH454, HG3840, LX64
IRC name: merspieler
Version: 2018.3.1
OS: Linux

Re: osm2city.py development

Postby adam_one » Sun Nov 18, 2018 1:36 pm

Thorsten wrote in Fri Nov 16, 2018 7:09 am:
Why is my scenery generating so slowly? I'm playing Los Angeles on the California package and the buildings aside from a couple of miles out have not yet generated, and I have let the simulator run for 20 minutes?


Because there's a LOD range definition - beyond a certain (configurable) distance no buildings won't be loaded no matter how long you wait.

Why do you believe that I dont understand LOD-ranges?


Back to the subject; if I set my high LOD-range for several kilometers, then nothing generates in between. The question was not: why is nothing generating passed LOD-limit, but: why is everything generating so slow?

Are you still upset over the argument we had six months ago? I'm sorry Thorsten. Does that make you feel any better?
Last edited by adam_one on Sun Nov 18, 2018 1:45 pm, edited 2 times in total.
adam_one
 
Posts: 64
Joined: Tue Jan 05, 2016 2:41 pm
Version: alpha
OS: pirated

Re: osm2city.py development

Postby vanosten » Sun Nov 18, 2018 1:43 pm

What do you mean by "generating"? I guess you mean rendering in FlightGear and not what I would call generating in osm2city. My observation is that if you just stand still on the spot, then scenery is not necessarily loaded. A bit of movement or looking around might help.

If you mean scenery generation, then you can blame me, as osm2city is still using Python (instead of e.g. C++) and I spend time on features instead of performance.
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

Re: osm2city.py development

Postby vanosten » Sun Nov 18, 2018 1:46 pm

i have corrected code reading from FlightGear BTG files version 10 or higher. Now generating scenery including generating plausible buildings should be fine again (tested on Hawaii's main island.
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

Re: osm2city.py development

Postby adam_one » Sun Nov 18, 2018 1:53 pm

vanosten wrote in Sun Nov 18, 2018 1:43 pm:What do you mean by "generating"? I guess you mean rendering in FlightGear and not what I would call generating in osm2city. My observation is that if you just stand still on the spot, then scenery is not necessarily loaded. A bit of movement or looking around might help.

If you mean scenery generation, then you can blame me, as osm2city is still using Python (instead of e.g. C++) and I spend time on features instead of performance.

I've got news for you, sir, you can look and fly around over tens of miles around the Los Angeles area, to the town north of and back, and very slowly will things start to render. There are some 'hoods that render faster, and a dense, urban area will ultimately load after perhaps 30 minutes.

    Framerate drops to about 10 per second when looking at a dense area.
    Also seems to intefere with tile-rendering

Update: Ok, I set my LOD-settings to default, and it has speeded up process. Good enough for now.
Last edited by adam_one on Mon Dec 03, 2018 10:43 pm, edited 1 time in total.
adam_one
 
Posts: 64
Joined: Tue Jan 05, 2016 2:41 pm
Version: alpha
OS: pirated

Re: osm2city.py development

Postby stuart » Sun Nov 18, 2018 10:08 pm

adam_one: I think you're just hitting the limitations of loading time for the large model files that osm2city is generating, unfortunately. There's also an interaction with OSG's PagedLOD which can result in models being unloaded earlier than you might want.

Rick and I have been discussing how to address this, and I've just pushed a change for 2018.4 which would allow using shaders for the OSM buildings: https://sourceforge.net/p/flightgear/ma ... /36470886/

-Stuart
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1432
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: osm2city.py development

Postby merspieler » Tue Nov 20, 2018 11:33 pm

Does it make sense, to build tile wise or will that create artefacts on the broders?
Love at first flight
Checkout Autopush. An improvment to the pushback to make your life easier.
merspieler
 
Posts: 169
Joined: Thu Oct 26, 2017 10:43 am
Location: GCLP
Callsign: LH454, HG3840, LX64
IRC name: merspieler
Version: 2018.3.1
OS: Linux

Re: osm2city.py development

Postby vanosten » Wed Nov 21, 2018 4:20 pm

You do not have to adhere to tile borders when choosing the extent of scenery generation. osm2city will automatically take care of cutting to tile borders. However, at the borders you will always find some overlap (e.g. if most of a house is within the boundary, then the whole building is drawn, a road or electrical line will make it to the next point (which might be inside or outside of the boundary). If you tweak the Python code and bypass the tile boundaries, then you will find residuals (in older versions of FG and/or osm2city not adhering to tile boundaries resulted in loading/unloading of the scenery within seconds). FG scenery is AFAIK tied to tiles - so adhering to that constraint is a good thing.

PS: if this answers your question, but is not clear from the documentation, then please suggest where and how the docs should be updated. Thanks in advance.
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

Re: osm2city.py development

Postby merspieler » Wed Nov 21, 2018 7:54 pm

I've created a bunch of scriptes that are intended to make it easier for beginers(and non console used persons) to use osm2city
I'm aware of the fact, that there are already some scripts... but they didn't seem to me like beeing great for beginers... They miss out some things like installation.

I've got inspired by easy-rsa and how easy it is to use.
You can find it here.

I've tested it so far on debian stretch and debian buster.
Love at first flight
Checkout Autopush. An improvment to the pushback to make your life easier.
merspieler
 
Posts: 169
Joined: Thu Oct 26, 2017 10:43 am
Location: GCLP
Callsign: LH454, HG3840, LX64
IRC name: merspieler
Version: 2018.3.1
OS: Linux

Re: osm2city.py development

Postby wlbragg » Sat Nov 24, 2018 4:15 am

@merspieler thank you for the scripts, hopefully that will help me get started using oms2city again.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4183
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: osm2city.py development

Postby merspieler » Sat Nov 24, 2018 12:03 pm

@wlbragg if you stuble over something that could be more user friendly, tell me... as well...
I'm thinking about makeing a tutor (like vimtutor)

And just out of boredom I'm creating a web front end for it... So this could be put on a server and users can click a build of an area they like to have...
Love at first flight
Checkout Autopush. An improvment to the pushback to make your life easier.
merspieler
 
Posts: 169
Joined: Thu Oct 26, 2017 10:43 am
Location: GCLP
Callsign: LH454, HG3840, LX64
IRC name: merspieler
Version: 2018.3.1
OS: Linux

PreviousNext

Return to Scenery

Who is online

Users browsing this forum: No registered users and 5 guests