External 3D models proposal

Hi everyone.

Polish stadium looks just great but, I think it’s too complicated for map users to edit such objects in osm. And also it’s too complicated for 3d artists to map such objects in osm with rather poor osm 3d instruments. Also there is no way to use textures which might be great for frescoes mosaics and so on.

Of course we can keep 3d model in separate project or data storage, such as wikidata. But it would be great to keep link between osm objects and external 3d models. Also any kind of render which tries to render building:parts and external models need to know, should it render building:part geometry or object’s geometry is covered by external model.

So I’ve tried to create proposal for link between osm objects and external 3d models. http://wiki.openstreetmap.org/wiki/Relation_3D:Model

Such approach allow you to specify different models, with different level of details for objects. Also it allows you to reuse one typical model for different osm objects.

I don’t know which format is better for architectural models, so this question is out of scope of this proposal. So, what you guys think about this?


interesting thoughts.
I don’t know how the stadium model was created, which tools were used. Perhaps somebody else can provide some tutorials on how to do that.
Another point is the insane complexity. I was wondering whether we should define an upper limit in terms of allowed number of nodes or ways for one single building. Question is, what would happen if all buildings looked like this. Would renderers still be able to handle it? Limiting complexity and implementing some rules would create a more homogenous data set.

The tag for linking external models (building:model=*) was included in the proposed building attributes, which has been apparently archived. Is is described somewhere else?
I think the idea was to link it to a KMZ file, which contains lat lon and heading values, as proposed by you.
However, having the location and orientation in OSM would allow for a more flexible usage and the possibility to include more formats (X3D, OBJ etc.)

Relations usually have members. What would be the members in your proposal?

Perhaps these tags can be merged into the proposed building relation

Another possiblity could be a node inside the building providing the coordinates (heading would be 0) and origin of the external model. This node could be contained in a building relation and reference to the external model.

I’m proposing the relation instead of tag (it’s no matter where tag is appeared on the building relation or on the building contour) to offer different models (with different level of details for example) for one object, or set of objects.

I’m not sure which approach is better: keep number of relations one for each model (hi/mid/low - poly) or use different sources for one model.

Members, in most cases will be - ways with building=* and building:part=*. This relation says to render: If you use this model (from src) do not render members’ models.

Member point as origin - good idea!

Add: I’ve updated wiki.

In S3DB we introduced building relation. That relation was intended to group all building parts together. So there is on sense in doing that once again inside 3d:model relation. I think we should introduce additional node into building relation. That node will mean center of external model. It could have tags which you proposed. If someone would like to add several models we could simply add next node with role ‘3d:model’ as building relation member.

I think there is no need to store numbers of polygons. It is possible to reduce number of triangles automatically inside software, so why do it manually? Tag azimuth should be optional or not used at all, it is easier to rotate model inside 3D editor then using that tag.

So it could be done like that:

  <node id='1' lat='...' lon='...'>
    <tag k='3d:model' v='some.url/to/model.obj' />
  <way id='2'>
    <nd ... />
    <tag k='building:part' v='yes' />

  <relation id='3'>
    <member type='way' ref='2' role='part' />
    <member type='node' ref='1' role='3d:model' />
    <tag k='type' v='building' />

But in realty if we would have nice user made models in 3d preview, we need to have center repository like Google Warehouse was. Simply linking to models split all over network it is not an solution.

Ok kendzi, you have a point. Azimuth tag or director point allows you to reuse one model, you even could add model without opening 3d editor, also if such points are parts of osm-way geometry 3d model will follow changes in osm. So if somebody rotate building way alongside a street, 3d model will follow this changes.

It’s impossible to do that with good quality.
For ex. you have model of building with columns. For high polygonal model you have column’s capital as 3d object in model, for low-polygonal model such details, and even columns should be add via textures.

I think to store models in wiki-data, it will allow to store in osm only 1 parameter for models collection and two optional parameters as a members of relation for reference point (it’s not a center of a model, at least not always) and for direction.

For instance, if we want to add a model to the bunch of buildings (often we have series of buildings with merely the same design).

<relation id='1'>
    <tag k='type' v='building' />
    <tag k='wikidata:3d_model' v='OSM/3d/Models/Templates:Hrushevka' />
    <member type='node' ref='1' role='3d:model:origin' />
    <member type='node' ref='2' role='3d:model:director' />

And in wikidata, for “OSM/3d/Models/Templates:Hrushevka” we could keep several models with different number of polygons and models meta-data.

And if we want to add a model for unique building:

<relation id='1'>
    <tag k='type' v='building' />
    <tag k='wikidata:3d_model' v='OSM/3d/Models/St_Peters_Basilica' />
    <member type='node' ref='1' role='3d:model:origin' />
    <member type='node' ref='2' role='3d:model:director' />

In case we have unique building we could drop “3d:model:director” and even “3d:model:origin” and store model in global crs. But I think, for 3d artists, it’s simple to work in local crs with meters with origin and director binded to some good recognizable and aligned with gps points.

(I haven’t talked about it yet with wiki teem but I think it wouldn’t be a problem)

I am with kendzi.
Just add some tags in building relation.
It doesn’t matteer how models have been created or simplified. But keeping track of the triangle count can get tedious. Categories such hi/mid/lo poly is sufficient. Anyway, this is meta data, which i haven’t seen in OSM so far.
As to the origin and diretor nodes: people might not be aware of the existance of the external models. If somebody moves around building outlines and address points because new imagery is available or for any other reason, the 3D model attached to it will also be moved. The origin point is not necessarily inside the building, causing confusion.
Yes, 3D artists work in local Cartesian CRS, because thats the only useful way to do it. But they should keep track of the exact position and orientation angle, e.g. by using reference points. So why not use simple tags values.

In wikidata: why does the reference URI not point to a specific file like xyz.x3d? How to see which models are available and which one to choose?

By whom? Who will move 3d model? When origin and director point are parts of building way (two corners alongside front wall for example), movement of 3d model will happens automatically.

To keep different models, in different formats with different detalization and it’s metadata all togeter/.

Deja vu. http://forum.openstreetmap.org/viewtopic.php?id=11806. А воз и ныне там (ru)…

avatar6, sad, but true.