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. Qt3D mesh loading works only from *.obj files
QtWS25 Last Chance

Qt3D mesh loading works only from *.obj files

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt3d
10 Posts 4 Posters 5.1k 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.
  • P Offline
    P Offline
    pcspets
    Qt Champion 2021
    wrote on 27 Nov 2015, 07:18 last edited by pcspets
    #1

    Hi

    I'm trying to load some mesh files (Qt 5.5) but strangely only *.obj types work. I have tried *.3ds, *.dxf, *.blend, etc. Some of them crash, some of them just don't load anything. The trouble with the .obj files is that they don't contain materials.

    I don't find any forum posts nor bug reports on it. Has anyone tried loading mesh files other than .obj?

    Regards
    Lauri

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 27 Nov 2015, 23:43 last edited by
      #2

      Hi,

      AFAIK, it should be possible if you have ASSIMP installed on your system. IIRC, there's an example using it coming with Qt3D

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pcspets
        Qt Champion 2021
        wrote on 30 Nov 2015, 08:25 last edited by
        #3

        Aah, is it needed to install assimp libs myself? Qt is so unified and bundled framework that one can sometimes forget that extra libs are needed.

        Do you know if there is a guide somewhere that I could follow? Searched a little bit but couldn't find any.

        PS. I guess that must also be the cause why some plugins are not loaded:
        -/
        Failed to load scene parser plugin "C:/Qt/5.5/mingw492_32/plugins/sceneparsers/assimpsceneparser.dll"
        Failed to load scene parser plugin "C:/Qt/5.5/mingw492_32/plugins/sceneparsers/gltfsceneparser.dll"
        /-

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 30 Nov 2015, 08:44 last edited by
          #4

          After a quick look at the module, assimp is part of the 3rdparty however I don't know if it was part of the 5.5 tech preview release. If you can, can you recheck with the 5.6 beta ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • P Offline
            P Offline
            pcspets
            Qt Champion 2021
            wrote on 30 Nov 2015, 09:29 last edited by
            #5

            Yes, I checked the same, and it is already part of Qt 5.5. I think I was missing the point "Mesh vs SceneLoader" when loading models from files. The documentation is quite limited right now and confusion is easy to come. Mesh works with ".obj" files but SceneLoader is needed for the rest - if I'm right.

            Anyway, there seems to be some issues with SceneLoader as well (loaded models not complete, crash, etc) but at least I can see that it should work and almost works :)

            I guess I will give it try and see if Qt 5.6 has any improvements.

            W 1 Reply Last reply 25 Nov 2016, 09:51
            0
            • P Offline
              P Offline
              pcspets
              Qt Champion 2021
              wrote on 9 Dec 2015, 08:23 last edited by
              #6

              Tried with Qt 5.6 alpha. Loading and rendering models is a lot more stable.

              The only strange thing left now is that the rendered scene is so bright. I tried loading some models that definitely worked with the older Qt3D version - and the same effect - too bright. Can that be tuned somehow?

              K 1 Reply Last reply 9 Dec 2015, 09:40
              0
              • P pcspets
                9 Dec 2015, 08:23

                Tried with Qt 5.6 alpha. Loading and rendering models is a lot more stable.

                The only strange thing left now is that the rendered scene is so bright. I tried loading some models that definitely worked with the older Qt3D version - and the same effect - too bright. Can that be tuned somehow?

                K Offline
                K Offline
                kshegunov
                Moderators
                wrote on 9 Dec 2015, 09:40 last edited by
                #7

                @pcspets
                I don't think so, but my test lamp mesh (with phong material) doesn't look too bright to me. If you're using lights, I believe they have the intensity property. There might be something in your configuration/setup. Are you using a shadow mapping or shaders, that could be causing it?

                Read and abide by the Qt Code of Conduct

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  pcspets
                  Qt Champion 2021
                  wrote on 11 Dec 2015, 11:15 last edited by
                  #8

                  @kshegunov
                  I'm not using any shaders explicitly. But it seems that "assimp" includes more light info from the files now than the old Qt3D importer used to. When I export .obj file from 3DS MAX with the tick "Force black ambient" - then everything is OK and the mesh is not overburned in Qt3D. I would like to export *.3ds (it's smaller and loads faster) but there I haven't figured out what kind on lighting I need to disable to get rid of the burning. I tried adding a dummy light source and disabled it in 3DS Max (to get rid the default light that Max adds) but that didn't do the trick. Perhaps it's something how the materials are defined.

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kshegunov
                    Moderators
                    wrote on 11 Dec 2015, 14:56 last edited by
                    #9

                    @pcspets
                    Well, I don't really know what might be causing the problem. Maybe try exporting without any lights, and then add your light in your program? Aside from that, you could try to post your question through the Qt Interest mail group.

                    Read and abide by the Qt Code of Conduct

                    1 Reply Last reply
                    0
                    • P pcspets
                      30 Nov 2015, 09:29

                      Yes, I checked the same, and it is already part of Qt 5.5. I think I was missing the point "Mesh vs SceneLoader" when loading models from files. The documentation is quite limited right now and confusion is easy to come. Mesh works with ".obj" files but SceneLoader is needed for the rest - if I'm right.

                      Anyway, there seems to be some issues with SceneLoader as well (loaded models not complete, crash, etc) but at least I can see that it should work and almost works :)

                      I guess I will give it try and see if Qt 5.6 has any improvements.

                      W Offline
                      W Offline
                      wind_n
                      wrote on 25 Nov 2016, 09:51 last edited by
                      #10

                      @pcspets Hi, I have a question,can you help me?
                      When I use SceneLoader import .3ds fiel. How am I supposed to render the different blocks of the file?

                      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