Hi there, I’d like to join the discussion because I think it would be awesome to have high-quality 3D models in the openstreetmap, but I’m not convinced that s3db and comparable attempts that try to introduce 3D capabilities in the existing osm database are the right tools for complex buildings/structures (for most of the buildings out there, s3db is already fine in it’s current form, but it will never work for the really interesting ones ;)).
So here’s my idea how to add 3D objects to the openstreetmap:
-
There will be a separate database that stores all metadata about a 3D scene that is required to display it on the map. Required fields are:
[list=*]
-
id (String): chosen by the contributor, but must be unique
-
minlat, maxlat, minlon, maxlon (decimal): defines location and extent of the whole scene
-
minheight, maxheight (decimal): lowest and highest point of the scene, relative to the ground level at (minlat, minlon)
-
model: the actual 3d model, as blob or reference to some other datastructure
-
integer-id, timestamp, changeset, user (whatever is required to properly support vcs)
[/*]
[*]I will not join the discussion about the best 3d model format, because that's not my expertise, but it'd be nice to have all data (except for textures) in a non-binary and uncompressed format to support diffs and therefore efficient version control (at least for the database, for the contributors it would be great to support as many formats as possible, which can be converted without losses in the internally used format).[/*]
[*]We need a platform where users can upload and tag 3D models. A framework like [https://sketchfab.com/](https://sketchfab.com/) would be awesome! Some more details on required capabilities:
-
The uploader will provide a unique name for the object (like files in mediawiki)
-
Uploaded files and metadata are under version control and can be edited by all registered users
-
There should be a user-friendly live-preview-kind-of-way to position the object on the map and set the correct scale. center, scale and ground offset may then be converted to the not-so-userfirendly but more precise database fields minlat, maxlat, minlon, maxlon, minheight, maxheight.
-
All metadata that goes beyond the required fields (e.g. description, license, ratings, etc.) will be stored in the (separate) database of this platform. The 3d model storage database should be kept free from all of this to make it as fast as possible.
[/*]
[*]No 3D model will be visible in the map until it's counterpart in the openstreetmap gets tagged with a reference to the object. This way, the 3D model and possible 3D structures generated from osm polygons will not be in conflict.
-
We’d need a new tag, e.g. “model=*” where * is the unique name of the 3d model in the database
-
The tag can be used on a single polygon or on a relation that combines multiple elements, so all of them get replaced by one 3D model (e.g. a detailed 3d model of a castle with a park should replace all building parts, walls, trees, fountains, etc.)
-
Further Advantages: Because all metadata is stored in the database, no additional tags are required to position the object. If someone creates a new 3d model, the old one doesn’t have to be overwritten or deleted. The osm database is kept free of 3D-data, existing polygons don’t need to be altered.
[/*]
[/list]
So, what do we gain here? We have a separate database for 3D models, which I think is a good thing, because we wouldn’t have to change the OSM database model and the planet files wouldn’t get polluted with 3D meshes and gigabytes of high-res textures (thereby dramatically increasing acceptance in the osm community). Still, the 3d models would be closely linked to the OSM database through the tag describing which elements are to be replaced by which 3d model in maps that support the display of 3d models.
For the geomodelling-community and all other interested contributors we’d provide a nice and easy to use platform, where models can be shared and integrated into the openstreetmap without too much effort.
For developers of 3d maps, there’d be a simple database schema available where the 3d models can be retrieved from. For 2D purists and all other applications where 3D models are irrelevant (e.g. routing algorithms), the overhead caused by 3d-related nodes and tags would be negligible.
OK, that’s it, what do you think about it?
Related stuff I’m curently thinking about:
-
Decoupling the location data from the actual 3D objects for better reuse. Ideas:
[list=*]
-
Express all of the location data in OSM tags (bad idea, locations shall never be stored in tags)
-
create a new polygon with only 3 tags: the 3d model reference, minheight and maxheight; the corners of the polygon define the extent of the model. Create a relation with a special type and roles, containing this polygon and the osm elements to replace (works, but quite complex)
-
allow multiple locations for one 3D object (locations go in a separate table of the database) and give each location a new name that may be referenced in the model tag, e.g. “model=tower:north”, “model=tower:south” (would require a changes of an object’s metadata rather than changes in the map, maybe not the right place?)
-
→ right now I’m in favor of the second approach (polygon with relation), though I would leave the location data attached to the 3d object (as default location and definition of size) and we’d need a JOSM plugin to get a polygon of correct size and preset with the correct model reference and height values.
[/*]
[*]3D models linked to tags: People should be able to create general-purpose models that can be used in 3D maps. They would require slightly different metadata (length, width, height instead of min/max lat/lon/height) and maybe some additional testing / approval by experienced users, but then we could get a variety of high-quality models of highly reusable objects like trees, mailboxes or objects that can be randomly placed on playgrounds, graveyards, construction sites etc.[/*]
[/list]