GLB and GLTF file content screenshot
-
@Sridharan said in GLB and GLTF file content screenshot:
Is it possible to take screenshot of this content
Take screenshot where? In your app? If so: screenshot of another app or do you load/show this data in your own app.
Please describe better what you want to do. -
@Sridharan You can see here how to take a screenshot of a widget: https://stackoverflow.com/questions/10381854/how-to-create-screenshot-of-qwidget
-
If you use Qt3D, you can render 3D scenes. It uses the Asset Importer library under the hood, which supports GLTF: https://github.com/assimp/assimp/blob/master/doc/Fileformats.md
-
This post is deleted!
-
Hi @wrosecrans @jsulm
Qt3D contains class QSceneLoader. We can load 3D file using setSource() function. On passing '.glb' filepath to setSource() function, I get 'no suitable importer error'. Plugins like assimpsceneimport.dll, gltfsceneexport.dll, gltfsceneimport.dll are available in my Qt installation. On passing '.dae' filepath to setSource() function, 3D model gets rendered.Does QSceneLoader supports '.glb' file format ? If not supported, is there any other way to render '.glb' file in QT ?
Thanks,
Sridharan -
@Sridharan https://doc.qt.io/qt-6/qt3drender-qsceneloader.html contains a link to https://assimp.sourceforge.net/main_features_formats.html
Glb seems to be supported. If it does not work for you you should check whether the plug-in responsible for loading these format could be loaded: set QT_DEBUG_PLUGINS to 1 and run your app, check its output. Could be that the plug-in depends on assimp library which is maybe not present on your machine.