QGIS
QGIS copied to clipboard
Exporting a 3D scene results in a broken obj file
What is the bug or the crash?
The native export 3d scene feature of QGIS results in a broken 3d model (distorted terrain and extruded buildings) when displaying it in Blender or MeshLab.
For instance, the following scene looks like this in the 3d view :
When displaying the exported version of it in Blender it looks like this:
The terrain has been distorted and some of the buildings have missing pieces.
Steps to reproduce the issue
- Choosing a raster DEM as terrain
- Choosing a vector layer to use as extruded buildings
- Exporting the scene using the export option in the 3d view :
- Displaying the exported 3d scene in a 3d visualization software
Versions
Version de QGIS 3.36.1-Maidenhead Révision du code 3e589453 Version de Qt 5.15.3 Version de Python 3.9.18 Version de GDAL/OGR 3.8.4 Version de Proj 9.3.1 Version de la base de données du registre EPSG v10.098 (2023-11-24) Version de GEOS 3.12.1-CAPI-1.18.1 Version de SQLite 3.41.1 Version de PDAL 2.6.0 Version du client PostgreSQL 16.2 Version de SpatiaLite 5.1.0 Version de QWT 6.1.6 Version de QScintilla2 2.13.4 Version de l'OS Windows 10 Version 2009
Extensions Python actives BoundingBox 2.1 citygen 0.3 firstaid 3.1.0 idg 0.2.4 landxmlconvertor 0.2.0 model_generator_opendata 0.1 pluginbuilder3 3.2.1 plugin_reloader 0.9.4 qgis-maptiler-plugin 3.3 Qgis2threejs 2.7.3 quick_map_services 0.19.34 STL_Generator 1.0.0 valuetool 3.0.19 db_manager 0.1.20 grassprovider 2.12.99 MetaSearch 0.3.6 processing 2.12.99
Supported QGIS version
- [x] I'm running a supported QGIS version according to the roadmap.
New profile
- [x] I tried with a new QGIS profile
Additional context
No response
@AbdelghaniTamort Thanks for the report and the detailed information. Could you please share your data and your QGIS project?
Sure, here goes : Qgis 3d export issue.zip
@ptitjano any news on the issue? is it really a QGIS bug or an error related to the data I was using ?
update, the export tool is working fine in version 3.30:
What's the issue on 3.36.1 then ?
@AbdelghaniTamort I will try to take a look at it next week.
Appreciated !
@AbdelghaniTamort Thank you for sharing your trial. Exactly same issue has been occured to me and it works well with version 3.30 as you mentioned.
I have taken a look at it. It turns out this is a regression caused by https://github.com/qgis/QGIS/pull/52064 which fixed an other issue: https://github.com/qgis/QGIS/issues/50971
I have tried to solve it but this is not an easy task. I discussed it with @benoitdm-oslandia . He has not found any solution at the moment but he will try to take a look it when available. I cannot make any promise at the moment.
Just to let you know, I've tried the export task with version 3.34 too. It results in a broken OBJ file just as version 3.36 does.
@NearDuckyu thank you for taking the time to test it out! @ptitjano @benoitdm-oslandia understood, thank you in advance!
could I request something for when issue will be treated ? Can the output obj file be georeferenced in the same crs as the terrain?
Hi, is this still broken? I get some weird output on 3.38
tested in 3.30 = works fine :)
some more feedback, it seems when the terrain resolution goes higher, the model starts to break, this is at 1500:
At 4096 the file is corrupted. Around 500 works ok
This is not fixed for me in 3.38.3
Laz file I created the mesh with Export to raster (triangulation) and I want to import that in blender.
@Nekzuris , please try if the issue occurs also using QGIS 3.40.
Well I tried but the installer failed, it says I'm missing: libssl-1_1-x64.dll
, libcrypto-1_1-x64.dll
and qssapi64.dll
I tried reinstalling it but same errors.
Why 3.40 isn't there?
https://download.osgeo.org/qgis/windows/weekly/?C=M&O=D
Okay it works now, but only with a DEM. I tried simply with the Render as a Surface (Triangulate) option but it result in an empty file.
@Nekzuris, I think it would be more useful if you created a new issue report providing all the requested info and a project and layer(s) and parameters and step by step instruction in order to replicate the issue.