Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. GLB and GLTF file content screenshot
Forum Updated to NodeBB v4.3 + New Features

GLB and GLTF file content screenshot

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 3 Posters 662 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sridharan
    wrote on last edited by
    #1

    Hi,

    GLB and GLTF file format contains 3D model data. Is it possible to take screenshot of this content and save it as jpg or png format in QT ?

    Thanks,
    Sridharan

    jsulmJ 1 Reply Last reply
    0
    • S Sridharan

      Hi,

      GLB and GLTF file format contains 3D model data. Is it possible to take screenshot of this content and save it as jpg or png format in QT ?

      Thanks,
      Sridharan

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

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

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      S 1 Reply Last reply
      0
      • jsulmJ jsulm

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

        S Offline
        S Offline
        Sridharan
        wrote on last edited by
        #3

        @jsulm

        My qt application would load glb file and generate image for loaded glb file and save it in my known location.

        Later, my qt application would access the image path and use the image

        jsulmJ 1 Reply Last reply
        0
        • S Sridharan

          @jsulm

          My qt application would load glb file and generate image for loaded glb file and save it in my known location.

          Later, my qt application would access the image path and use the image

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Sridharan You can see here how to take a screenshot of a widget: https://stackoverflow.com/questions/10381854/how-to-create-screenshot-of-qwidget

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • W Offline
            W Offline
            wrosecrans
            wrote on last edited by
            #5

            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

            https://doc.qt.io/qt-6/qt3d-index.html

            S 2 Replies Last reply
            0
            • W wrosecrans

              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

              https://doc.qt.io/qt-6/qt3d-index.html

              S Offline
              S Offline
              Sridharan
              wrote on last edited by
              #6
              This post is deleted!
              1 Reply Last reply
              0
              • W wrosecrans

                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

                https://doc.qt.io/qt-6/qt3d-index.html

                S Offline
                S Offline
                Sridharan
                wrote on last edited by Sridharan
                #7

                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

                jsulmJ 1 Reply Last reply
                0
                • S Sridharan

                  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

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

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

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved