Board index FlightGear Development Scenery

osm2city.py development

Questions and discussion about enhancing and populating the FlightGear world.

Re: osm2city.py development

Postby legoboyvdlp » Mon Jan 08, 2018 4:44 pm

Code: Select all
SpawnPoolWorker-1 root INFO     writing cluster w010n50\w008n55\2827339city00603
 with 25 buildings
25 25 100.0%
SpawnPoolWorker-1 root ERROR    Exception occurred while processing tile 2827339
.
Traceback (most recent call last):
  File "C:\Users\Redpath\Documents\GitHub\osm2city\build_tiles.py", line 136, in
 process_scenery_tile
    buildings.process_buildings(the_coords_transform, my_fg_elev, my_blocked_are
as, my_stg_entries, file_lock)
  File "C:\Users\Redpath\Documents\GitHub\osm2city\buildings.py", line 654, in p
rocess_buildings
    cluster_elev, cluster_offset, prepare_textures.roofs, stats)
  File "C:\Users\Redpath\Documents\GitHub\osm2city\building_lib.py", line 1231,
in write
    ac.write(ac_file_name)
  File "C:\Users\Redpath\Documents\GitHub\osm2city\utils\ac3d.py", line 291, in
write
    f = open(file_name, 'w')
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/Redpath/Docume
nts/FlightGear/Custom Scenery/projects/NI\\Buildings\\w010n50\\w008n55\\w010n50\
\w008n55\\2827339city00603.ac'
SpawnPoolWorker-1 root ERROR    ******* Exception in tile 2827339 - to reprocess
 use boundaries: -7.25_55.125_-7.0_55.25 *******
Traceback (most recent call last):
  File "C:\Users\Redpath\Documents\GitHub\osm2city\build_tiles.py", line 136, in
 process_scenery_tile
    buildings.process_buildings(the_coords_transform, my_fg_elev, my_blocked_are
as, my_stg_entries, file_lock)
  File "C:\Users\Redpath\Documents\GitHub\osm2city\buildings.py", line 654, in p
rocess_buildings
    cluster_elev, cluster_offset, prepare_textures.roofs, stats)
  File "C:\Users\Redpath\Documents\GitHub\osm2city\building_lib.py", line 1231,
in write
    ac.write(ac_file_name)
  File "C:\Users\Redpath\Documents\GitHub\osm2city\utils\ac3d.py", line 291, in
write
    f = open(file_name, 'w')
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/Redpath/Docume
nts/FlightGear/Custom Scenery/projects/NI\\Buildings\\w010n50\\w008n55\\w010n50\
\w008n55\\2827339city00603.ac'
SpawnPoolWorker-1 root INFO     ******* Finished tile 2827339 *******


Full exception log once it finishes. It actually created the directory structure this time but all folders are empty.

Log:
https://pastebin.com/v1B6JKrM
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 » Mon Jan 08, 2018 6:50 pm

It must be a problem with how you specify paths I guess. I have never had problems using something like C:\\FlightGear\\fg_customscenery\\TEST, but then again I used something outside of C:\User and without blanks. Unfortunately I do not have a Windows computer at hand right now, maybe you have to write C:\\\User\\bla to escape unicode.
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 542
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 legoboyvdlp » Mon Jan 08, 2018 9:32 pm

Ok. Will try it then.
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 » Wed Jan 24, 2018 9:31 pm

I have closed a long time issue. Buildings with inner rings are now displayed correctly again with holes. The following pictures shows parts of Stockholm, where there are lots of inner rings due to the way OSM mapping is done.
Image
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 542
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 paju1986 » Wed Jan 24, 2018 10:18 pm

woww! I was wating a long time for this issue to be resolved great job vanosten! :)

Regards!
paju1986
 
Posts: 246
Joined: Sun Oct 30, 2011 8:42 pm
Location: Badajoz (Spain) - LEBZ
OS: Arch Linux

Re: osm2city.py development

Postby Thorsten » Tue Jan 30, 2018 9:15 am

Hi Rick,

I've finally tried to the bottom of the road lighting issues you are seeing, and I believe now the fact that a normal map was requested by the effect but not actually supplied caused some oddities.

I've now disabled the normal map request in the effect and the result looks more reasonable to me - please give it a check,

There's some oddities in the test area (Prague) you sent as such, for instance there's small patches of different road type inserted into a highway and in the classic renderer some small patches are shown highly emissive (just a segment really...) - can't do anything about these, they're embedded into the incoming model already.

Also, the road mesh is fairly coarse and blocky, so even working diffuse shading generates sharp discontinuities in color where the road slope changes from segment to segment. You ought to be able to pass a flag to the 3d model to instruct the shader to smooth these - not sure how much it improves though, the smoothing sometimes does funky things as well.

There's yet more subtly going wrong - I can confirm the bug with cloud shadows, but I'm somewhat mystified by that one, because it definitely is working with random buildings and the technology is pretty much the same and I don't see obvious bugs. Will keep looking.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: osm2city.py development

Postby vanosten » Tue Jan 30, 2018 8:22 pm

Thorsten wrote in Tue Jan 30, 2018 9:15 am:Hi Rick,

I've finally tried to the bottom of the road lighting issues you are seeing, and I believe now the fact that a normal map was requested by the effect but not actually supplied caused some oddities.

I've now disabled the normal map request in the effect and the result looks more reasonable to me - please give it a check,


Thank you very much for the investigations and corrections. I will try in the weekend, when I have access to a capable computer.

There's some oddities in the test area (Prague) you sent as such, for instance there's small patches of different road type inserted into a highway and in the classic renderer some small patches are shown highly emissive (just a segment really...) - can't do anything about these, they're embedded into the incoming model already.


I did not think about continuity of road types - I definitively need to improve that part. I hope that some of the small patches will go away once I have a better land-use model behind the scenes. That is what I am currently working on - a bit optimistically for 2018.1 (will not require changes on the FG side).
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 542
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 » Sat Feb 03, 2018 9:15 am

Thorsten wrote in Tue Jan 30, 2018 9:15 am:Hi Rick,

I've finally tried to the bottom of the road lighting issues you are seeing, and I believe now the fact that a normal map was requested by the effect but not actually supplied caused some oddities.

I've now disabled the normal map request in the effect and the result looks more reasonable to me - please give it a check,


I can confirm that it looks good now. Thanks a lot! The rest of the residuals are osm2city residuals.
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 542
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 Thorsten » Sat Feb 03, 2018 7:22 pm

Okay - glad it was so simple...
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: osm2city.py development

Postby vanosten » Sat Feb 17, 2018 10:36 am

I have introduced code to rectify the angles of buildings. See the related description in the manual. I was confident enough with the code to set parameter RECTIFY_ENABLED to True by default. If you see any odd behaviour then please let me know.

PS: there will be no changes in e.g. textures for the upcoming FG version 2018.1. So everything running for version 2017.2 is still fine. However as was discussed in some recent posts: I am planning to change considerably how textures are used. More about that when I have POC code to show.

Within the next 2 weeks or so I hope to be able to provide something like in the following image:
Image

The yellow buildings not being in OSM, but instead set by some heuristics (mainly land-use information (grey) and street information (amber)). This will make it possible to populate areas, where there are no mapped buildings in OSM. At least a first step into the right direction.
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 542
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 Thorsten » Sat Feb 17, 2018 12:15 pm

This will make it possible to populate areas, where there are no mapped buildings in OSM.


Sweet :-)

Now we 'just' need to solve the storage and distribution problem of the bazillion terabyte this will need for the whole planet :mrgreen:
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: osm2city.py development

Postby vanosten » Sat Feb 24, 2018 1:09 pm

Image

osm2city generated buildings (intentionally without textures), where there are no buildings in OSM: https://www.openstreetmap.org/relation/ ... /-159.4581.

Next step is to improve land-use type recognition - which needs to be more fine grained than what OSM offers.

If someone with strong 3D coordinate system knowledge and C++/Python experience has a bit time to spare, then I would be glad if you would ping me. I have the basic code to read BTG files ready in order to get land-use info, where OSM does not have (e.g. https://www.openstreetmap.org/relation/ ... /-159.3896 is lacking "grey" background for residential zones). However my transformation code from the specific cartesian coordinate system to global lon/lat has bugs, which I cannot resolve.
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 542
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 Catalanoic » Sat Feb 24, 2018 2:21 pm

Really nice feature to be implemented, step forward for osm2city into FG. Don't care about online hdd space, temporal constraint.. dont stop!
User avatar
Catalanoic
 
Posts: 1099
Joined: Mon Mar 05, 2012 1:33 am
Location: Barcelona (LEBL)
Callsign: Catalanoic
Version: 2017.3
OS: Lubuntu/Windows 7

Re: osm2city.py development

Postby Thorsten » Sat Feb 24, 2018 7:03 pm

However my transformation code from the specific cartesian coordinate system to global lon/lat has bugs, which I cannot resolve.


Feel free to send me a few details, due to a few year of spacefight I'm usually quite good with coordinate transformations...
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: osm2city.py development

Postby paju1986 » Mon Mar 05, 2018 1:26 pm

Hi vanosten.

Very nice work.
I want to ask how it will behave when you already have buildings on osm, will it respect the real buildings?. or you have to manually tell what zone needs to be fill with "fake" buildings?.

Maybe a way will be to consider the "building density" of a determined zone, if the landuse tells that is a urban area but it has a very low building density on osm, then the procedural buildings kicks in.

Regards!
paju1986
 
Posts: 246
Joined: Sun Oct 30, 2011 8:42 pm
Location: Badajoz (Spain) - LEBZ
OS: Arch Linux

PreviousNext

Return to Scenery

Who is online

Users browsing this forum: No registered users and 6 guests