Board index FlightGear Development Scenery

osm2city.py development

Questions and discussion about enhancing and populating the FlightGear world.

Re: osm2city.py development

Postby powoflight » Fri Jan 03, 2020 4:11 pm

As far as i know lod should be default. Will try it tommorow.
powoflight
 
Posts: 115
Joined: Fri Mar 25, 2016 10:04 am
Location: LOWW
Version: 2019.2
OS: win7 Ubuntu 18.04

Re: osm2city.py development

Postby WoodSTokk » Fri Jan 03, 2020 6:17 pm

How does OSM2City generate the buildings/triangles?
Does OSM2City generate the buildings directly on the origin or generate the building on the XY plane with Z upward and rotate the finished object on its place (latitude/longitude)?
WoodSTokk
 
Posts: 434
Joined: Tue Oct 17, 2017 2:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: OE-WST
IRC name: WoodSTokk
Version: 2018.3.1
OS: Debian Buster/Sid

Re: osm2city.py development

Postby vanosten » Fri Jan 03, 2020 7:55 pm

WoodSTokk wrote in Fri Jan 03, 2020 6:17 pm:How does OSM2City generate the buildings/triangles?
Does OSM2City generate the buildings directly on the origin or generate the building on the XY plane with Z upward and rotate the finished object on its place (latitude/longitude)?


I am not sure what the context for your question is. They are done and placed the same way as any other object based on the .ac format would be placed - with the difference that a lot of buildings are combined into one single .ac-file ("mesh") in order to reduce the number of nodes in the scene graph.

How the shader based buildings work, I do not know.
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 441
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 WoodSTokk » Fri Jan 03, 2020 8:31 pm

I think the renderer (OSG?) have a problem with rotated objects.
The nose gear assembly of the Citation II has a similar problem.
The strut use the chrome-shader and this strut vanish if you rotate the view.
Here the strut is visible:
Image
Rotating the view down it vanish:
Image
In the ac file the gear assembly is contructed in retracted position.
On ground the assembly is rotated to the extended position.
But only the strut vanish, no other objects.
So, i believe the renderer has a problem with rotated object with shaders.

Therefore i asked if the building mesh is rotated or if the mesh is build on 0,0,0 without rotation.

EDIT:
I have now taken the strut out of the shader so it is normal textured and it vanish also.
I dont know why only the strut vanish and all other objects not.
But i think it has to do with rotation.
WoodSTokk
 
Posts: 434
Joined: Tue Oct 17, 2017 2:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: OE-WST
IRC name: WoodSTokk
Version: 2018.3.1
OS: Debian Buster/Sid

Re: osm2city.py development

Postby powoflight » Sat Jan 04, 2020 9:15 am

Dear wkitty42

this may or may not be related but what are your LOD settings, please... that's the only thing i can think of for objects to appear and disappear... oh but there may be something with object caching... can you try setting

--prop:/sim/rendering/max-paged-lod=400
do not change anything.

and slawekmikula write
Some notes. I've also encountered building from the whole tile dissapear - mostly the most dense areas as the one i'm testing right now. osm2tiles generated in May this year does have this issue. Nonetheless current build DO NOT have this issue as far as I'm testing but for sure I would find it, if it appears. So please check with the most recent generation.


and merspieler
I can confirm, that it doesn't happen (at least not for the tiles I've checked) with a current rebuild.


so problem should be something else?

Anyway how can i debug this item? I thing this now my main problem.
powoflight
 
Posts: 115
Joined: Fri Mar 25, 2016 10:04 am
Location: LOWW
Version: 2019.2
OS: win7 Ubuntu 18.04

Re: osm2city.py development

Postby wkitty42 » Sat Jan 04, 2020 4:53 pm

powoflight wrote in Sat Jan 04, 2020 9:15 am:Dear wkitty42

this may or may not be related but what are your LOD settings, please... that's the only thing i can think of for objects to appear and disappear... oh but there may be something with object caching... can you try setting

--prop:/sim/rendering/max-paged-lod=400
do not change anything.

ok, this indicatws that the objects are not being dumped out of the cache for overflow of counted objects... that's one possibility taken off the list...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 6133
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: osm2city.py development

Postby powoflight » Tue Jan 07, 2020 2:26 pm

All OSM Buildings disappear in a tile .

Now i found more or less the reason. It's a single *.ac file.
If I disable it in Buildings / 3203641.stg
then the whole tile will be loaded an do not disappear once again as allready discribed.

see: viewtopic.php?f=5&t=22809&start=1140#p358274

Here is an extract from 3203641.stg
Code: Select all
OBJECT_BUILDING_MESH_DETAILED e010n40_e015n46_3203641city00904.ac 15.48780 46.95415 312.65 0

# NOT OK   This is the ac file what gives troubles
#OBJECT_BUILDING_MESH_DETAILED e010n40_e015n46_3203641city00905.ac 15.49420 46.97631 320.10 0

# ok
OBJECT_BUILDING_MESH_DETAILED e010n40_e015n46_3203641city00906.ac 15.49318 46.99148 325.97 0


I tried to open the ac file with G3DViewer but i do not see any buildings like in the other ac files.

Is here somebody to take a look at the corrupted ac file?

Here is the ac file and the whole OSM data for tile 3203641 / LOWG
https://c.gmx.net/@327459158418791162/U ... LvN5etrQqA
powoflight
 
Posts: 115
Joined: Fri Mar 25, 2016 10:04 am
Location: LOWW
Version: 2019.2
OS: win7 Ubuntu 18.04

Re: osm2city.py development

Postby slawekmikula » Tue Jan 07, 2020 2:53 pm

powoflight wrote in Tue Jan 07, 2020 2:26 pm:If I disable it in Buildings / 3203641.stg
then the whole tile will be loaded an do not disappear once again as allready discribed


Thanks for spotting this ! I didn't have that dash to look this deep. I hope this will move thing forward :)
slawekmikula
 
Posts: 81
Joined: Sun Feb 19, 2017 9:31 am

Re: osm2city.py development

Postby merspieler » Tue Jan 07, 2020 4:03 pm

There are some vertices with extreme values in your file:
Code: Select all
1.89991e+07 5.00062 3.97409e+07
1.89991e+07 4.47083 3.97409e+07


And some material definitions with the same:
Code: Select all
1248 4.405e+05 0.7976
1252 -4.405e+05 0.7971


Not sure where they come from but I guess, this is what causes it.
Love at first flight A<380
Checkout Autopush. An improvment to the pushback to make your life easier.
Attempting an osm2city worldbuild... Coming soon to YOUR terrasync!
merspieler
 
Posts: 528
Joined: Thu Oct 26, 2017 10:43 am
Location: Wish to be in YBCS
Callsign: JST935. ORI1711
IRC name: merspieler
Version: next
OS: Debian Bullseye

Re: osm2city.py development

Postby powoflight » Tue Jan 07, 2020 5:23 pm

There are some vertices with extreme values in your file:

Not sure where they come from but I guess, this is what causes it.


I have run osm2city for 3203641.stg with

FLAG_STG_BUILDING_LIST = False

But i have found it original in your worldbuild.
More infos tomorrow.
powoflight
 
Posts: 115
Joined: Fri Mar 25, 2016 10:04 am
Location: LOWW
Version: 2019.2
OS: win7 Ubuntu 18.04

Re: osm2city.py development

Postby merspieler » Tue Jan 07, 2020 5:50 pm

Possible... I think vanosten might be able to tell, where in the code this is generated and might spot a problem with it.
Love at first flight A<380
Checkout Autopush. An improvment to the pushback to make your life easier.
Attempting an osm2city worldbuild... Coming soon to YOUR terrasync!
merspieler
 
Posts: 528
Joined: Thu Oct 26, 2017 10:43 am
Location: Wish to be in YBCS
Callsign: JST935. ORI1711
IRC name: merspieler
Version: next
OS: Debian Bullseye

Re: osm2city.py development

Postby vanosten » Tue Jan 07, 2020 6:24 pm

Well, thanks for the debugging so far. That really helped. By manipulating the values I was able to find out, that the root cause most probably is a skeleton roof of a specific building. Now I just need to find the same building in OSM within the tile - and hope that I find the same extreme values when reprocessing. But good to know that it is something within osm2city.
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 441
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 » Tue Jan 07, 2020 10:15 pm

Would be throwing an exception with the osmID help if a vertex value exceeds a threshold (ie. 10000)?

If it happens again, it would show up imideatly in the exceptions log
Love at first flight A<380
Checkout Autopush. An improvment to the pushback to make your life easier.
Attempting an osm2city worldbuild... Coming soon to YOUR terrasync!
merspieler
 
Posts: 528
Joined: Thu Oct 26, 2017 10:43 am
Location: Wish to be in YBCS
Callsign: JST935. ORI1711
IRC name: merspieler
Version: next
OS: Debian Bullseye

Re: osm2city.py development

Postby powoflight » Wed Jan 08, 2020 9:06 am

Now i analyzed from merspieler the worldscenery. -> e010n40

For all who want to get the old scenery, can get it here now: https://sourceforge.net/projects/osm2ci ... iles/v0.1/
Except the e010n40 tile which is too large for sourceforge. You can find it here: https://mega.nz/#F!K0tEQA7K!scHz82xzLTvqThI0t_mUyg


Here it happens in the same area
/mnt/D_HD/VMOrdner/OSM_OK/World/scenery/Buildings/e010n40/e015n46

Code: Select all
#OBJECT_BUILDING_MESH_ROUGH e010n40_e015n46_3203641city10905.ac 15.49434 46.97397 318.30 0 # not ok


Here is the ac file : https://c.gmx.net/@327459158418791162/f ... fMwZNszvkw

I have found more tiles with this "problem".
Should I also search for the corresponding ac file / positions there ?
Last edited by powoflight on Wed Jan 08, 2020 12:26 pm, edited 1 time in total.
powoflight
 
Posts: 115
Joined: Fri Mar 25, 2016 10:04 am
Location: LOWW
Version: 2019.2
OS: win7 Ubuntu 18.04

Re: osm2city.py development

Postby merspieler » Wed Jan 08, 2020 10:31 am

Seems to have the very same issue... huge numbers on some vertices

Let me unpack all the zip files and then run grep to find out, how often this occures.
Love at first flight A<380
Checkout Autopush. An improvment to the pushback to make your life easier.
Attempting an osm2city worldbuild... Coming soon to YOUR terrasync!
merspieler
 
Posts: 528
Joined: Thu Oct 26, 2017 10:43 am
Location: Wish to be in YBCS
Callsign: JST935. ORI1711
IRC name: merspieler
Version: next
OS: Debian Bullseye

PreviousNext

Return to Scenery

Who is online

Users browsing this forum: Google [Bot], www2 and 2 guests