Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting a 3D scene results in a broken obj file #57437

Open
2 tasks done
AbdelghaniTamort opened this issue May 15, 2024 · 11 comments
Open
2 tasks done

Exporting a 3D scene results in a broken obj file #57437

AbdelghaniTamort opened this issue May 15, 2024 · 11 comments
Labels
3D Relates to QGIS' 3D engine or rendering Bug Either a bug report, or a bug fix. Let's hope for the latter! Regression Something which used to work, but doesn't anymore

Comments

@AbdelghaniTamort
Copy link

AbdelghaniTamort commented May 15, 2024

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 :
image

When displaying the exported version of it in Blender it looks like this:
image

The terrain has been distorted and some of the buildings have missing pieces.

Steps to reproduce the issue

  1. Choosing a raster DEM as terrain
  2. Choosing a vector layer to use as extruded buildings
  3. Exporting the scene using the export option in the 3d view :
    image
  4. Displaying the exported 3d scene in a 3d visualization software

Versions

Version de QGIS
3.36.1-Maidenhead
Révision du code
3e58945
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

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

@AbdelghaniTamort AbdelghaniTamort added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 15, 2024
@ptitjano
Copy link
Contributor

ptitjano commented May 15, 2024

@AbdelghaniTamort Thanks for the report and the detailed information. Could you please share your data and your QGIS project?

@AbdelghaniTamort
Copy link
Author

Sure, here goes :
Qgis 3d export issue.zip

@benoitdm-oslandia benoitdm-oslandia added the 3D Relates to QGIS' 3D engine or rendering label May 15, 2024
@AbdelghaniTamort
Copy link
Author

@ptitjano any news on the issue? is it really a QGIS bug or an error related to the data I was using ?

@AbdelghaniTamort
Copy link
Author

update, the export tool is working fine in version 3.30:
image

What's the issue on 3.36.1 then ?

@ptitjano
Copy link
Contributor

ptitjano commented Jun 5, 2024

@AbdelghaniTamort I will try to take a look at it next week.

@AbdelghaniTamort
Copy link
Author

Appreciated !

@NearDuckyu
Copy link

@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.

@agiudiceandrea agiudiceandrea added the Regression Something which used to work, but doesn't anymore label Jun 10, 2024
@ptitjano
Copy link
Contributor

I have taken a look at it. It turns out this is a regression caused by #52064 which fixed an other issue: #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.

@NearDuckyu
Copy link

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.

@AbdelghaniTamort
Copy link
Author

@NearDuckyu thank you for taking the time to test it out!
@ptitjano @benoitdm-oslandia understood, thank you in advance!

@AbdelghaniTamort
Copy link
Author

could I request something for when issue will be treated ? Can the output obj file be georeferenced in the same crs as the terrain?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3D Relates to QGIS' 3D engine or rendering Bug Either a bug report, or a bug fix. Let's hope for the latter! Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

No branches or pull requests

5 participants