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 10: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: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: osm2city.py development

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

legoboyvdlp wrote in Sat Nov 17, 2018 10: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. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 540
Joined: Sat Sep 25, 2010 6:38 pm
Location: Denmark - but I am Swiss
Pronouns: he/his
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: osm2city.py development

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

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

C2P_PROCESS_STREETLAMPS
C2P_PROCESS_OVERHEAD_LINES
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2228
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: osm2city.py development

Postby vanosten » Sat Nov 17, 2018 7: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. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 540
Joined: Sat Sep 25, 2010 6:38 pm
Location: Denmark - but I am Swiss
Pronouns: he/his
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: osm2city.py development

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

Ok, thanks
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2228
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: osm2city.py development

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

Thorsten wrote in Fri Nov 16, 2018 8: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 2:45 pm, edited 2 times in total.
adam_one
 
Posts: 64
Joined: Tue Jan 05, 2016 3:41 pm
Version: alpha
OS: pirated

Re: osm2city.py development

Postby vanosten » Sun Nov 18, 2018 2: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. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 540
Joined: Sat Sep 25, 2010 6:38 pm
Location: Denmark - but I am Swiss
Pronouns: he/his
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: osm2city.py development

Postby vanosten » Sun Nov 18, 2018 2: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. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 540
Joined: Sat Sep 25, 2010 6:38 pm
Location: Denmark - but I am Swiss
Pronouns: he/his
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: osm2city.py development

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

vanosten wrote in Sun Nov 18, 2018 2: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 11:43 pm, edited 1 time in total.
adam_one
 
Posts: 64
Joined: Tue Jan 05, 2016 3:41 pm
Version: alpha
OS: pirated

Re: osm2city.py development

Postby stuart » Sun Nov 18, 2018 11: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: 1629
Joined: Wed Nov 29, 2006 10:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: osm2city.py development

Postby merspieler » Wed Nov 21, 2018 12:33 am

Does it make sense, to build tile wise or will that create artefacts on the broders?
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2228
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: osm2city.py development

Postby vanosten » Wed Nov 21, 2018 5: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. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 540
Joined: Sat Sep 25, 2010 6:38 pm
Location: Denmark - but I am Swiss
Pronouns: he/his
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: osm2city.py development

Postby merspieler » Wed Nov 21, 2018 8: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.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2228
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: osm2city.py development

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

@merspieler thank you for the scripts, hopefully that will help me get started using oms2city again.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7574
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: osm2city.py development

Postby merspieler » Sat Nov 24, 2018 1: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...
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2228
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

PreviousNext

Return to Scenery

Who is online

Users browsing this forum: No registered users and 5 guests