OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

Announcement

A fix has been applied to the login system for the forums - if you have trouble logging in please contact support@openstreetmap.org with both your forum username and your OpenStreetMap username so we can make sure your accounts are properly linked.

#26 2018-04-09 23:06:26

-karlos-
Member
Registered: 2016-05-29
Posts: 41

Re: 3D Model Repository

There is a new visible 3D model   /9 . It has to be scaled yet.

And there is an error in the Javascript code, to be investigated.

https://osmgo.org/go.html?lat=46.114687 … e=montagne

church in OSMgo


-karlos-

Offline

#27 2018-04-10 19:42:29

-karlos-
Member
Registered: 2016-05-29
Posts: 41

Re: 3D Model Repository

In the last days, some models have been uploaded. Rendering them and implementing was a challenge, may questions raised. Some user of 3dmr.eu missed descriptions. This is a collection of topics. Please check them, if I am correct. We should place the user documentation to a Wiki page and work it out incrementally. It’s not done, the more difficult obstacles are still on the way. (I did not code the replacement of relations and building:parts yet.)

1. Create and upload Zip-file
2. Tag model in OSM
3. Fine tune parameters metadata of the model


1. Create and upload Zip-file
* Edit your own 3D model or find a good one. In this case clarify the copyright!
* The file format actually is OBJ and MPL. Both should have the same name. There may be multible material files JPG, PNG? No unused and none missing please. It would be better, if the images sizes are  power of two (i.E. 512x256). Don’t add extra data, as macOS used to do! (You may clean the zip by the two commands:   zip -d name.zip \*.DS_Store   zip -d name.zip "__MACOSX*”)
* Put all the files on one ZIP file. Do not use any path, just a flat list. There mustn’t any path in the MTL file to!
* Later we may also support other file formats like Collada
* Login into www.3dmr.eu with you OSM login. (AOout??)
* Add a new model by “Upload Model”. Give it a name, description, tags and categories (more hints needed)
* If it is a uniq object, set its position by map or values. The GPS position is NOT the position used by the renderer, only to find repository models in an given bounding box.
* You may already know the scale
* A model like a bench should have its origin at the center, to make rotation possible. To adjust this, you may set the offset origin values now or later by testing it out. The meaning of the 3 values are: with/right ,  dept/back , elevate up. Their unit is the models unit before scaling, not afterwards in Meter.

* The rotation value may be needed to let the modes direct to the expected side (like a bench is directed to the view you have, if you sit on it. All instances of i.e. a bench should have its direction tag. So both values later are added by the renderer. The direction tag may also be “along” to place a bench along the nearest way it is placed to.
* A unique model like the Eiffel Tower may only use the repository value.
* Licensing: More Info!
* And finally upload the ZIP file

2. Tag model in OSM
* Multiple used models like a benches usually placed by an OSM Node. So just add the Tag “3dmr” = “id-number” (or uuid, mesonic name, in discussion) For objets like a bench, an Tag “direction” is recommended. See the wiki page for all the options. - The default symbol or object, the Node usually is shown will not get rendered but replaced by the model.
* A model may also be tagged to an OSM way, like a “building" or an small "amenity". Never on open ways? How is the “center” of an area calculated? All renderers should use the same algorithm. Maybe we need an pseudo code for it. If it is a unique used model, the origin Metadata may fit the model to the right place. - The default object, the Way usually is shown will not get rendered but replaced by the model. That includes all building:parts inside this area, partial to?
* An OSM relation is NOT adequate to place a model because it does not have a defined position. But the “outer” member as an are is fine. In this case, all member objects of the relation will not get rendered but replaced by the model, also including building:parts. If the area, a relation covers does not fit to the model, the model should be divided in multiple parts, an extra relation for a model should be avoided.

3. Fine tune parameters metadata of the model
* Depending on the data refresh cycle of the used 3D renderer, that may be a view minutes with overpass, the model should now be visible.
* Changing the Metadata in the repository should be valide at once. Refresh the rendering (mind the cache!) and repeat this until the model is placed accurate. The 3D renderer may provide an interactive fine-tuning of the model and set direct or show you the values to edit into the metadata.


-karlos-

Offline

#28 2018-04-11 10:54:33

-karlos-
Member
Registered: 2016-05-29
Posts: 41

Re: 3D Model Repository

Now scaling is also posible. cool
The controls are soft now, the display unified for all values

Fine tuning of a 3D model, rendered out of http://www.3dmr.eu
Click the model to select. Start to find out its metadata
<> rotate/direction    ^v scale
shift <>^v and pageUp/down to place origin (right,back,up)
0 or o reset all

Tweet with movie:  https://twitter.com/OSM__go/status/984003969071673346  big_smile


-karlos-

Offline

#29 2018-05-08 09:42:25

-karlos-
Member
Registered: 2016-05-29
Posts: 41

Re: 3D Model Repository

How to get from a model in 3dwarehouse.sketchup.com to 3dmr

In 3dwarehouse:

    If no Collada.dae file is present, download the SketchUp.skp
    Open skp in SketchUp (I user 2017)
    File Export 3D Model to *.dae .... wait
    Set the Options! Two-Side, NO Edges, Export textur maps
    Next to the Name.dae will be a folder Name with the textures.

Open Blender

    Erase the block and import the dae. Textures are NOT visible
    Export to OBJ .... wait
    Set the Options! NOT include Edges, Write Materials
    You will see a Name.obj and Name.mtl but NO Textures. Use the folder from SketchUp

For 3DMR.eu you need more steps:

    Move obj and mtl into the folder from SketchUp
    Edit the Name.mtl and remove (Text replace all) all path at the texture files
    Create a ZIP with obj, mdl and all textures and upload it to 3DMR.eu

If you check the log output of OSM-go you will see a lot of warnings because the texture sizes are not Power-of-Two. It works anyway. To be perfect, resize the textures to the values of the warnings before you ZIP the model.


-karlos-

Offline

#30 2018-05-18 23:34:15

Rinaldum
New Member
Registered: 2018-05-18
Posts: 1

Re: 3D Model Repository

Hi all,
when I try to login at https://3dmr.eu/ I got a "Server Error (500)"....

Offline

#31 2018-05-19 06:20:14

-karlos-
Member
Registered: 2016-05-29
Posts: 41

Re: 3D Model Repository

Login is broken? After Logging in by OSM, I get Error 500.


-karlos-

Offline

Board footer

Powered by FluxBB