minorua / Qgis2threejs

3D map visualization and web export plugin for QGIS
http://minorua.github.io/Qgis2threejs/docs/
495 stars 91 forks source link

Feature Request: Export three.js scene to standard 3D format (OBJ, Collada) #251

Closed vovchykbratyk closed 3 years ago

vovchykbratyk commented 3 years ago

Hi, I'd like to request ability to export a qgis2three.js scene not just to a local .js file, but to Collada (preferred) or OBJ.

There is an exporter demonstration here, going from a three.js scene to .dae:

https://threejs.org/examples/misc_exporter_collada.html

and there is also an OBJ exporter here:

https://github.com/mrdoob/three.js/blob/3510fdd91725f7681db845efd889c5e29e6e7446/examples/js/exporters/OBJExporter.js

This would be really helpful for going from QGIS terrain to eventual use in something like Blender or Maya, a workflow that is very poorly supported at this time.

vovchykbratyk commented 3 years ago

Sorry, update - I didn't realize Collada export was built-in part of Three.js now (https://threejs.org/docs/#examples/en/exporters/ColladaExporter) it only needs to be exposed in Qgis2threejs as export option.

larsgrobe commented 3 years ago

Hi Vovchyk,

I would recommend to export glTF meshes. They are very compact and maintain textures. You can import them into typical modelling software.

Best, Lars.

Sorry, update - I didn't realize Collada export was built-in part of Three.js now (https://threejs.org/docs/#examples/en/exporters/ColladaExporter https://threejs.org/docs/#examples/en/exporters/ColladaExporter) it only needs to be exposed in Qgis2threejs as export option.

vovchykbratyk commented 3 years ago

Thanks Lars! I ran through the process and it worked pretty well. Going to go ahead and close this, as the .glb binary actually performs even better than a Collada object.