You are not logged in.

Announcement

*** NOTICE: By 30th of September 2022 the forum.openstreetmap.org will be retired, please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators. We expect the migration of data will be finished by that date, you can follow its progress here.***

#1 2014-02-24 21:18:28

Aschilli
Member
Registered: 2013-03-16
Posts: 18

help needed on implementing S3DB

Hi,

after adding support for colors in OSG-Explorer, I noticed many visual artifacts in some test areas. These artifacts result from z-fighting between multiple faces with different colors, so I assume that not all ways that are only intended as outline for 2D maps are filtered out for my 3D reconstruction yet. This is especially visible in the test area Schwerin. Other 3D renderers seem to have no problems with it.

In particular, i try to figure out how to filter out way
http://www.openstreetmap.org/way/96820490
It is tagged as building, but covers many smaller building parts, so I assume it should not be used for 3D rendering. However, I could not find an outline tag. There is a building relation connecting to it but the role is empty. What am i missing here?

Another example:
http://www.openstreetmap.org/way/96820491
It hides an overlapping building part with different height and color, but sharing same edges. My renderer fails to remove it from 3D rendering because it finds no outline tag or role.

how can I fix this?
btw, I think that this area looks great already with all these details.

Last edited by Aschilli (2014-02-24 21:44:08)

Offline

#2 2014-02-24 22:24:56

kendzi
Member
Registered: 2008-08-20
Posts: 250

Re: help needed on implementing S3DB

Basically we have two main approach:

Algorithm inside O2W and F4:
1. Draw outline polygon (building=yes)
2. Cut of all building parts form outline polygon (building:part=yes which are inside outline or connected with outline)
3. Create 3d model from remains of outline
4. Create 3d model from building parts

So no relations are need.

Algorithm inside Kendzi3d:
1. Crate 3d models for building outlines or building parts which are not members of relation (type=building)
2. If relation contains any building part member, create 3d model for building parts from relation
3. If relation doesn't contains any building part member, create 3d model for building outline from relation

So relations only collect outlines and parts, no roles are need. Role is determined from tags on members (tags building=yes or building:part=yes)

Personally I'm fan of relation approach.

Offline

#3 2014-02-25 10:59:47

Aschilli
Member
Registered: 2013-03-16
Posts: 18

Re: help needed on implementing S3DB

Thanks for the concise answer

kendzi wrote:

Basically we have two main approach:

Algorithm inside O2W and F4:
1. Draw outline polygon (building=yes)
2. Cut of all building parts form outline polygon (building:part=yes which are inside outline or connected with outline)
3. Create 3d model from remains of outline
4. Create 3d model from building parts

So no relations are need.

Hm, since I am not running a database or specialized 3D server, this approach might be too complicated for this app. The spatial operations you describe require at least a spatial index structure for avoiding n to n comparisons and handling of complex polygons for computing geometric intersections and differences. That's quite expensive.


kendzi wrote:

Algorithm inside Kendzi3d:
1. Crate 3d models for building outlines or building parts which are not members of relation (type=building)
2. If relation contains any building part member, create 3d model for building parts from relation
3. If relation doesn't contains any building part member, create 3d model for building outline from relation

So relations only collect outlines and parts, no roles are need. Role is determined from tags on members (tags building=yes or building:part=yes)

Personally I'm fan of relation approach.

I need to stick with the second approach and see how many issues i can fix with this. Actually its just a minor modification of my implementation. I was relying on the outline tag to be present.
Still, it won't fix this one, for which I cannot find a building relation.
http://www.openstreetmap.org/way/96820491
I could fix it manually by adding a relation myself, but if the remains of the outline after the cutting operation are still used for 3D rendering as you described, I would break the visualization in O2W and F4, or wouldn't I? I need to try.

Offline

#4 2014-02-25 18:54:50

kendzi
Member
Registered: 2008-08-20
Posts: 250

Re: help needed on implementing S3DB

I added missing relation for that building. Relation wont brake rendering inside O2W or F4 as they don't use relations.

Offline

Board footer

Powered by FluxBB