Hi all, During the fifth week of the summer of code I made a lot of progress implementing the 3D scenes export feature. Here is my report for the week:
- - Tasks done: - Got exporting the vector layer data working. - Saw how the flat terrain is generated and how the level of details system works. - Exported visible terrain tiles by taking the Qt3DRender::QAttribute objects directly and parsing the data. - Exported invisible terrain tiles by generating geometries manually. - Exported DEM terrain tiles (I had some troubles with non square height maps giving me wrong values but I eventually fixed the problem). - Discovered smooth edges parameter in the wavefront .obj standard and implemented it (I'm following this very useful spec obj-spec <http://fegemo.github.io/cefet-cg/attachments/obj-spec.pdf>) - Gave the user the ability to choose at which level of details he wants to export. - Made initial UI and classes for the scene export settings. - Switched from the user specifying the level of details to specifying the resolution of the terrain (more predictable in terms of loading speed and vertex count). - Made a separate class named Qgs3DExportObject that will handle the object name and various 3D data (to handle absence of texture coordinates data in a better way in the future). - Gave each object in the scene it's own object name in the .obj file so that blender users can edit the scene in a better way. - Documented the code and made a draft pull request that you can find here: https://github.com/qgis/QGIS/pull/37588 - Discussed what I implemented with mentors. - Screenshots: - DEM terrain inside QGIS: https://imgur.com/aZl0E03 - Exported DEM terrain (smoothing option to the left): https://imgur.com/Jkl9kfu - Exported vector layer with a flat terrain: https://imgur.com/LWBtHqf - Tasks to be done: - Export other types of layers (mesh layers, 3D symbol layers...). - Handle exporting of normals. - Handle exporting of texture coordinates. - Export textures as displayed in the scene to an image file. - Manage material file (.mtl) construction. - Blocking issues: Not really a blocking issue but I wanted to do export scene hierarchy in the .obj file but that didn't seem to work in blender :(. Any suggestion or feedback is always welcome. Best wishes, -- Belgacem Nedjima 4th year computer science and engineering student. https://github.com/NEDJIMAbelgacem
_______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer