OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2013-06-10 16:18:35

cmif4
Member
From: Paris
Registered: 2013-06-10
Posts: 121
Website

Real time 3D map using WebGL

Hi there,

we're working on a WebGL based rendering of OSM data hosted here.

We would be glad to have some feedback from the OpenStreetMap 3D community.

(if your browser or hardware does not support WebGL rendering it will fall back to OpenLayers)

Offline

#2 2013-06-10 16:47:56

!i!
Member
Registered: 2009-11-28
Posts: 3,293
Website

Re: Real time 3D map using WebGL

Sorry, I can't say that much, as the rendering disappears always after it's finished and I just see a blank canvas:
I used FF 20 and WebGL seems to work corresponding to the WebGL demos form Mozilla.
Maybe you can fix that?

I never heard about that company before, so excuse me, but who are you exactly? smile
And which Workflow, Data schema do you use?

Last edited by !i! (2013-06-10 16:51:41)


privater Account von KVLA-HRO-Mei

Offline

#3 2013-06-10 16:52:06

cmif4
Member
From: Paris
Registered: 2013-06-10
Posts: 121
Website

Re: Real time 3D map using WebGL

!i! wrote:

Sorry, I can't say that much, as the rendering disappears always after it's finished and I just see a blank canvas:
I used FF 20 and WebGL seems to work corresponding to the WebGL demos form Mozilla.
Maybe you can fix that?

I never heard about that company before, so excuse me, but who are you exactly? smile

This is a known issue in the post-process code we don't know why sometimes the graphic driver returns a broken RenderTarget, you can try with this link http://map.f4-group.com/#postProcess.enabled=false (it deactivates the outline post-process)

Last edited by cmif4 (2013-06-10 16:54:26)

Offline

#4 2013-06-10 17:07:42

!i!
Member
Registered: 2009-11-28
Posts: 3,293
Website

Re: Real time 3D map using WebGL

Thanks that one works fine for me big_smile

It looks really impressive due to the lightning/shadows and interaction (animation, camera perspective, ...). Great job!
So I checked the areas that I worked on (Rostock, Schwerin) and see that there seem to be small misinterpretations of the S3DB and that some tags arent't recognized yet (materials, some roof shapes and orientation, ...). Another problem seems to be clipping with overlaying building:parts. That can be even a modelling problem, but maybe this can be solved within the conversion automatically?

Currently I'm still suprised, that you come with this brilliant project, while a few devs already tried similar approaches but they didn't finished yet. So please, give us some more details smile


privater Account von KVLA-HRO-Mei

Offline

#5 2013-06-10 17:23:51

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

Re: Real time 3D map using WebGL

Really nice.

What is license of this project? Is any chance that trees models are open source and can by used?

Offline

#6 2013-06-10 17:32:11

cmif4
Member
From: Paris
Registered: 2013-06-10
Posts: 121
Website

Re: Real time 3D map using WebGL

kendzi wrote:

Really nice.

What is license of this project? Is any chance that trees models are open source and can by used?

I'm sorry but there is no chance to get the code source or models for free.

For performance reason we are not handling everything for now, this is a non exhaustive list:

buildings and roof color
roofs shapes (flat, pyramidal, hipped, gabled, pitched, dome, onion, mansard)
barriers (wall, fence and hedge)
forest, tree, tree_row
artwork (sculpture and statues)
chimney and nuclear water cooling
wind generators
fountains
cemeteries
lighthouses
power lines, poles and towers
...

We're glad you enjoyed our work.

Offline

#7 2013-06-10 17:40:58

!i!
Member
Registered: 2009-11-28
Posts: 3,293
Website

Re: Real time 3D map using WebGL

I highly recommend, that at least the interpretation of buildings should be checked against the S3DB schema and compared to OSM2World and Kendzi interpretation. Otherwise, people might start (wrong) editing, if you roll out, because they expect the tags on the buildings to be wrong. After a short check, currently none of my multipart buildings look completely right.

My questions is, why didn't you used one of the already existing converters, as OSM2World for example to create your vector tiles?

Concerning the question of kendzi, IMHO, your 3D object DB is derived from OSM dataset, thus it needs to be licensed under the terms of the OdbL? So I expect that Kendzi can take the models under the terms of OdbL?

P.S. Small note: Currently you lack osm attribution.

Last edited by !i! (2013-06-10 17:42:48)


privater Account von KVLA-HRO-Mei

Offline

#8 2013-06-10 18:02:14

j3d
Member
Registered: 2013-05-07
Posts: 53

Re: Real time 3D map using WebGL

!i! wrote:

Concerning the question of kendzi, IMHO, your 3D object DB is derived from OSM dataset, thus it needs to be licensed under the terms of the OdbL? So I expect that Kendzi can take the models under the terms of OdbL?

The question was about custom 3d models, placed as 'marker' the tree nodes. This does not make the models itself derived from Obdl data

Offline

#9 2013-06-10 18:21:23

!i!
Member
Registered: 2009-11-28
Posts: 3,293
Website

Re: Real time 3D map using WebGL

I'm definitly not a legal expert, but from my POV:
- OSM dataset is ODbL and the base for that computation
- It's enriched with 'magic' (extruding houses, applying 3d markers, ...)
- this new dataset is combined and saved in a 3D database

If you reflect the complexity of the single objects, I (personally) would expect that the whole dataset (and so every single object that is complex enough) is licensed under the same terms. But maybe this is a good question for OSMF LWG, this is just my intuitive feeling wink


privater Account von KVLA-HRO-Mei

Offline

#10 2013-06-10 18:33:46

j3d
Member
Registered: 2013-05-07
Posts: 53

Re: Real time 3D map using WebGL

Actually the building models are created on-the-fly from raw osm2pgsql data on the client, which I find really impressive smile

Regarding your concerns; would you say one has to make a font freely available when creating tiles for a custom map style? I would think this is an analogous case here

Last edited by j3d (2013-06-10 18:40:26)

Offline

#11 2013-06-10 18:44:44

cmif4
Member
From: Paris
Registered: 2013-06-10
Posts: 121
Website

Re: Real time 3D map using WebGL

!i! wrote:

I highly recommend, that at least the interpretation of buildings should be checked against the S3DB schema and compared to OSM2World and Kendzi interpretation. Otherwise, people might start (wrong) editing, if you roll out, because they expect the tags on the buildings to be wrong. After a short check, currently none of my multipart buildings look completely right.

Our 3d buildings extraction implementation is based on this wiki page http://wiki.openstreetmap.org/wiki/Simple_3D_Buildings and then we added a few fallback from this table http://wiki.openstreetmap.org/wiki/Roof … ranslation that's why we are not fully matching what you expect to see on the map.

!i! wrote:

I'm definitly not a legal expert, but from my POV:
- OSM dataset is ODbL and the base for that computation
- It's enriched with 'magic' (extruding houses, applying 3d markers, ...)
- this new dataset is combined and saved in a 3D database

....

My questions is, why didn't you used one of the already existing converters, as OSM2World for example to create your vector tiles?

We are not using a converter nor a '3D database', the extruded stuff you can see on the map is computed client-side on the fly.

!i! wrote:

P.S. Small note: Currently you lack osm attribution.

The osm copyright was displayed in the legal page but i just realized this page is not accessible anymore since the last UI refactoring (some heads will fall tomorrow...)

Concerning the "real" 3D models (the tree, the lighthouse, the Eiffel tower...) they were modelled in Maya and exported in a specific binary file format and so are property of our team.

Offline

#12 2013-06-10 18:47:10

OliverLondon
Member
Registered: 2008-04-04
Posts: 43

Re: Real time 3D map using WebGL

Yes, very impressive. Worked out of the box on Firefox 15 the first time, although going back a few hours later, I'm no longer offered the choice to switch between 2D and 3D.

I love the fountains and trees.  In Munich the river seems to be flowing the wrong way - is this a problem with the underlying ways?

Offline

#13 2013-06-11 13:28:10

Jazzzz
Member
Registered: 2013-06-11
Posts: 5

Re: Real time 3D map using WebGL

@OliverLondon maybe you could not switch between 2D and 3D because you were too far away, try to zoom in.

Offline

#14 2013-06-11 13:50:31

!i!
Member
Registered: 2009-11-28
Posts: 3,293
Website

Re: Real time 3D map using WebGL

I think there are currently 2 problems in your interpretation of S3DB that makes the results very different:
1. min_height ignored
2. Inheritance is applied differently
Please compare your results against the well mapped areas:
http://wiki.openstreetmap.org/wiki/Simp … #Demo_area

As J3D says, a on-the-fly interpretation is impressive smile


privater Account von KVLA-HRO-Mei

Offline

#15 2013-06-11 14:29:44

cmif4
Member
From: Paris
Registered: 2013-06-10
Posts: 121
Website

Re: Real time 3D map using WebGL

We're handling min_height as explained in the OSM wiki (check,Petronas Towers, Kuala Lumpur and 26 East 23rd Street, New York)

The inheritance issue may be due to the lack of relation in our database, we're handling building:part as building without any distinction.

Can you please link me some misinterpretation of the S3DB in our application so that we could have a look.

Offline

#16 2013-06-11 15:39:31

!i!
Member
Registered: 2009-11-28
Posts: 3,293
Website

Re: Real time 3D map using WebGL

Here my examples:
http://maps.osm2world.org/?h=128&view=S … ers=B0FFFF (Rostock Warnemünde)
http://maps.osm2world.org/?h=128&view=N … ers=B0TTFF (Schwerin castle and surroundings)
As far as I remember I didn't used a relation either, but of course my modelling can be wrong, too. But I make heavy use of inheritance, as IMHO we specified it at the 3D workshop.

Another aspect might be currently not within the S3DB specs: defaults
So kendzi/tordanik use yellow as basecolor for buildings. Even if your white looks really nice/modern we should try to unite the interpretations. Or no tool makes use of a default colour to show the user, that you need to specify everything?

Last edited by !i! (2013-06-11 15:55:27)


privater Account von KVLA-HRO-Mei

Offline

#17 2013-06-11 16:18:10

cmif4
Member
From: Paris
Registered: 2013-06-10
Posts: 121
Website

Re: Real time 3D map using WebGL

For now we used 2 default colors for walls and roofs when they're not specified with osm attributes, we specified a white/gray combo to get and architect sketch look.

I think the differences could come from our interpretation of building size:

total height (defined by 'height' or 'building:height' or ('building:levels'*3 + 'roof:levels'*3)).
roof height (defined by 'roof:height' or 'building:roof:height' or 'building:cullis:height' or 'roof:levels'*3 or 'building:roof:levels'*3)
wall heighttotal height - roof height [- min_height if specified]

Maybe it's a wrong interpretation of this page mixed with this one

In addition to that i think that the aspect ratio & camera fov differences between your rendering and our make the comparison quite hard.

EDIT:

I just found out that removing the polygons with id=209603824 and id=96820490 gives a mush better look for "Schwerin castle".
It seems that these 2 buildings are only partly rendered in osm2world.

orange10.jpg

Last edited by cmif4 (2013-06-11 17:00:08)

Offline

#18 2013-06-11 17:21:29

!i!
Member
Registered: 2009-11-28
Posts: 3,293
Website

Re: Real time 3D map using WebGL

cmif4 wrote:

For now we used 2 default colors for walls and roofs when they're not specified with osm attributes, we specified a white/gray combo to get and architect sketch look.

A understandable decision. Unfortunatly this is different from the way the dev community handles it currently, which can result in artifacts. In the case of the castle, it's really yellow. If a building is white, I wether specify it with building:colour=white

cmif4 wrote:

I think the differences could come from our interpretation of building size:
total height (defined by 'height' or 'building:height' or ('building:levels'*3 + 'roof:levels'*3)).
roof height (defined by 'roof:height' or 'building:roof:height' or 'building:cullis:height' or 'roof:levels'*3 or 'building:roof:levels'*3)
wall heighttotal height - roof height [- min_height if specified]

Maybe it's a wrong interpretation of this page mixed with this one
.

For now, only S3DB is the only semiformal agreement of the most of the devs. The levels should be only considered, if there is no other height information. Usually it's just to generate a texture of windows and we encourage users to use dedicated height values to describe the geometry.

cmif4 wrote:

In addition to that i think that the aspect ratio & camera fov differences between your rendering and our make the comparison quite hard.

This is somewhat true, but O2W (for what I can say) is highly customizable, so you explore areas in the same interactive way as within your client.
I guess you know, that tagging schemas are only semi-formal here at OSM. So you need to consider, how it is used in the wild. Thats why the 3D staff offered the demo areas and example files to show you, how the current interpretation should look like.

cmif4 wrote:

I just found out that removing the polygons with id=209603824 and id=96820490 gives a mush better look for "Schwerin castle".
It seems that these 2 buildings are only partly rendered in osm2world.

http://i81.servimg.com/u/f81/13/20/89/97/th/orange10.jpg

Sorry, I have no idea, what you removed sad 
But please take care of the "we don't tag for single renderers rule".


privater Account von KVLA-HRO-Mei

Offline

#19 2013-06-11 17:25:58

cmif4
Member
From: Paris
Registered: 2013-06-10
Posts: 121
Website

Re: Real time 3D map using WebGL

!i! wrote:

Sorry, I have no idea, what you removed sad 
But please take care of the "we don't tag for single renderers rule".

I removed it locally in my client triangulation to see what would happen, i won't change OSM data for my personal rendering wink

I checked the Schwerin castle in Kendzi3D and found that its rendering is matching mine.

Offline

#20 2013-06-11 17:38:57

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

Re: Real time 3D map using WebGL

!i! wrote:

Sorry, I have no idea, what you removed  
But please take care of the "we don't tag for single renderers rule".

It seams that by S3DB you should use relation for grouping building outline and building parts.

Offline

#21 2013-06-11 22:35:33

FvGordon
Member
Registered: 2009-08-29
Posts: 666

Re: Real time 3D map using WebGL

cmif4 wrote:

I think the differences could come from our interpretation of building size:

total height (defined by 'height' or 'building:height' or ('building:levels'*3 + 'roof:levels'*3)).
roof height (defined by 'roof:height' or 'building:roof:height' or 'building:cullis:height' or 'roof:levels'*3 or 'building:roof:levels'*3)
wall heighttotal height - roof height [- min_height if specified]

Hello,

I think, I have to correct you. You have defined 'roof:height' and 'building:cullis:height' as the same, but they are not! As seen on this wiki page the 'building:cullis:height' is the height of the top line of the wall just below the roof, not the height of the roof. I see it as the min_height of the roof.

Franz

Offline

#22 2013-06-12 02:50:53

j3d
Member
Registered: 2013-05-07
Posts: 53

Re: Real time 3D map using WebGL

Infact the code does it that way, the fallback for roof_height is building_height - cullis_height. I guess it really doesnt matter for now as in 99% of the cases cullis:height is used redundantly and for some other cases with wrong values (cullis_height > building_height - roof_height). It's not in S3DB, but for rendering it would be nice to handle the case where a gabled roof extends over the building outline, i.e. when cullis_height < building_height - roof_height. (at least that is my interpretation for roof/cullis height)

I'm missing roof:shape=skillion,roof:slope:direction for Notre Dame Cathedral and roof:shape=round smile

Offline

#23 2013-06-12 08:14:32

cmif4
Member
From: Paris
Registered: 2013-06-10
Posts: 121
Website

Re: Real time 3D map using WebGL

j3d wrote:

I'm missing roof:shape=skillion,roof:slope:direction for Notre Dame Cathedral and roof:shape=round smile

I saw your edit on Notre-Dame, i originally modeled it to test my geometry extrusion but it is based on this wiki page and these attributes are not defined there.

Offline

#24 2013-06-12 08:27:25

!i!
Member
Registered: 2009-11-28
Posts: 3,293
Website

Re: Real time 3D map using WebGL

Ok after reviewing lots of buildings, I really think, that the biggest problem is that you currently don't use inheritance.
So you get wrong results, if someone specify the building with a height x and pulls parts artifically down.

Here for example the Neptun hotel at Rostock Warnemünde:
http://maps.osm2world.org/?zoom=18&lat= … ers=B0TTFF
http://map.f4-group.com/#lon=1344410&la … phi=-1.719

P.S. For me it's often hard to recognize the shape of the roof, as it's often white, too. I'n most cases at least here in Germany a flat roof is grey and gabled/hipped roofes have a somewhat red/orange colour. Maybe this will help people and allow a better shading of roof elements.


privater Account von KVLA-HRO-Mei

Offline

#25 2013-06-12 08:45:15

cmif4
Member
From: Paris
Registered: 2013-06-10
Posts: 121
Website

Re: Real time 3D map using WebGL

Stop me if i'm wrong but to get building:part inheriting from its building you need to do a complex intersection code to see if they overlap and this is a time consuming process (we're extruding buildings in real time on client side).

Btw we handle the building:parts tag, when a polygon got this flag we consider it as the outline and it is not extruded (it would fix the Neptun Hotel)

We are not handling this part of the spec for performances reasons.

Note that if a building has at least one area tagged as building:part=yes, the building outline is no longer considered for volume rendering, unless it is also tagged as a building part.

Wiki source

Offline

Board footer

Powered by FluxBB