Hi Nicholas, There are basically 3 ways of handling additional geometry formats in Qt3D.
* The first approach is through the use of sceneloaders plugins https://code.qt.io/cgit/qt/qt3d.git/tree/src/plugins/sceneparsers?h=dev SceneLoader plugins basically have to convert a scene format into a Qt3D subtree composed of QEntity/QGeometryRenders/QMaterials .... If you want to use your own custom materials, you'd have to traverse the tree once loaded and replace the materials by the ones you want to use or write your own sceneparser plugin. This is what's used by the glTF loader and the assimp loader (which handles all format the Assimp library supports). Please note that the glTF 2.0 loader is far from being fully glTF2 compliant. There is a fully compliant glTF2 importer for Qt3D as part of the Kuesa project. * The second approach is to create your own Qt3DRender::QGeometryRender/QGeometry loader, independent of any Qt3D plugin system. You basically have to create your own wrapper that instantiates the correct QAttributes/QBuffers to make up a valid QGeometry (essentially doing something similar to https://code.qt.io/cgit/qt/qt3d.git/tree/tests/manual/custom-mesh-cpp/main.cpp?h=dev). Please note that with this approach, you only focus on the geometry, you can then use any Qt3D material to render it. * The third approach is kind of a hybrid between the two approaches, creating a geometryloader plugin (https://code.qt.io/cgit/qt/qt3d.git/tree/src/plugins/geometryloaders?h=dev) When using the QMesh object (subclass of QGeometryRenderer), it uses the most relevant plugin to load a given mesh file. Note that we are talking about mesh level file formats (.obj) and not a scene file format (.gltf, collada ...). https://code.qt.io/cgit/qt/qt3d.git/tree/src/plugins/geometryloaders?h=dev Again this approaches only focuses on the geometry part. I hope that helps, Paul On 7/6/19 7:40 AM, Nicholas Yue wrote: > Hi, > > I read that Qt 5.13 will have glTF 2.0 support. > > I am interested to add a couple of additional geometry format to Qt. > > Where can I find out more about the design behind the general > support for 3D geometry formats e.g. OBJ, glTF, DAE etc. > > I am hoping to develop something I need (Alembic) that follows Qt3D > best practices so that I can concentrate on the geometry and leverage > the other aspect like material/shading that is already part of Qt3D > > Cheers > -- > Nicholas Yue > Graphics - Arnold, Alembic, RenderMan, OpenGL, HDF5 > Custom Dev - C++ porting, OSX, Linux, Windows > http://au.linkedin.com/in/nicholasyue > https://vimeo.com/channels/naiadtools > > _______________________________________________ > Interest mailing list > [email protected] > https://lists.qt-project.org/listinfo/interest -- Paul Lemire | [email protected] | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel: France +33 (0)4 90 84 08 53, http://www.kdab.fr KDAB - The Qt, C++ and OpenGL Experts
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Interest mailing list [email protected] https://lists.qt-project.org/listinfo/interest
