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. How to load PLY file in QT,C++, QML

How to load PLY file in QT,C++, QML

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 373 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello everyone.

    I am quite new to QT and thanks for your supports in advance.

    I am working on a hobby Windows application using QT, QML, and C++. I have a .PLY file (Polygon File Format) that I would like to read and render it on the page. I have done days of researches on what is the easiest way to develop this and somehow lost the track of the best approach.

    I would appreciate if anyone has any experience or idea on how to implement this? Can we do it only using QML? or do we need to leverage OpenGL on C++ side to render .PLY file?

    Happy coding :)

    Pl45m4P 1 Reply Last reply
    0
    • ? A Former User

      Hello everyone.

      I am quite new to QT and thanks for your supports in advance.

      I am working on a hobby Windows application using QT, QML, and C++. I have a .PLY file (Polygon File Format) that I would like to read and render it on the page. I have done days of researches on what is the easiest way to develop this and somehow lost the track of the best approach.

      I would appreciate if anyone has any experience or idea on how to implement this? Can we do it only using QML? or do we need to leverage OpenGL on C++ side to render .PLY file?

      Happy coding :)

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @TheEhsanG said in How to load PLY file in QT,C++, QML:

      I have done days of researches on what is the easiest way to develop this and somehow lost the track of the best approach.

      Took me 5 seconds to find this topic:

      • https://forum.qt.io/topic/94131/how-to-load-ply-content-properly

      And 1 more minute to find this note in the documentation of Qt 3D's QMesh:

      Loads mesh data from external files in a variety of formats. Qt3DRender::QMesh loads data into a single mesh.

      In Qt3D 5.9, QMesh supports the following formats:

        * Wavefront OBJ
        * Stanford Triangle Format PLY
        * STL (STereoLithography)
      

      (https://doc.qt.io/qt-6/qt3drender-qmesh.html#details)

      While writing this I noticed that Qt3D is marked deprecated... I'm not sure what and in which way everything is replaced and set up in the future, but for your "hobby" projects, I would say, that it's still safe to use...
      Maybe it will be removed in Qt7 someday...

      If you are fine with QML, you can use Qt Quick 3D
      (Note that it's GPL or commercial only)

      • https://doc.qt.io/qt-6/qtquick3d-index.html

      Edit:

      Seems like it's not possible with QtQuick3D to directly render .ply file content, but there is a console tool to convert the output you get from Blender, 3DS Max or Maya into QML usable files and render it...
      This also includes .ply files.

      • https://doc.qt.io/qt-6/qtquick3d-tool-balsam.html

      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      ? 1 Reply Last reply
      1
      • Pl45m4P Pl45m4

        @TheEhsanG said in How to load PLY file in QT,C++, QML:

        I have done days of researches on what is the easiest way to develop this and somehow lost the track of the best approach.

        Took me 5 seconds to find this topic:

        • https://forum.qt.io/topic/94131/how-to-load-ply-content-properly

        And 1 more minute to find this note in the documentation of Qt 3D's QMesh:

        Loads mesh data from external files in a variety of formats. Qt3DRender::QMesh loads data into a single mesh.

        In Qt3D 5.9, QMesh supports the following formats:

          * Wavefront OBJ
          * Stanford Triangle Format PLY
          * STL (STereoLithography)
        

        (https://doc.qt.io/qt-6/qt3drender-qmesh.html#details)

        While writing this I noticed that Qt3D is marked deprecated... I'm not sure what and in which way everything is replaced and set up in the future, but for your "hobby" projects, I would say, that it's still safe to use...
        Maybe it will be removed in Qt7 someday...

        If you are fine with QML, you can use Qt Quick 3D
        (Note that it's GPL or commercial only)

        • https://doc.qt.io/qt-6/qtquick3d-index.html

        Edit:

        Seems like it's not possible with QtQuick3D to directly render .ply file content, but there is a console tool to convert the output you get from Blender, 3DS Max or Maya into QML usable files and render it...
        This also includes .ply files.

        • https://doc.qt.io/qt-6/qtquick3d-tool-balsam.html
        ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Hi Thanks for your help.

        @Pl45m4 said in How to load PLY file in QT,C++, QML:

        Took me 5 seconds to find this topic:

        https://forum.qt.io/topic/94131/how-to-load-ply-content-properly

        So this is using QWidget to render UI. I am not sure if I can use it in QML project. Can I ?


        @Pl45m4 said in How to load PLY file in QT,C++, QML:

        And 1 more minute to find this note in the documentation of Qt 3D's QMesh:

        I will try to see if I can use Mesh in QML to render PLY file.


        @Pl45m4 said in How to load PLY file in QT,C++, QML:

        Seems like it's not possible with QtQuick3D to directly render .ply file content, but there is a console tool to convert the output you get from Blender, 3DS Max or Maya into QML usable files and render it...
        This also includes .ply files.

        The problem I have with this approach is that the name of the PLY file can change, therefore, the name of the generated QML from using balsam will change as well and not sure how to use it in my QML (Basically this hobby project is to create a 3D-visualizer for PLY files, so user can drag and drop any PLY file into the app). I would be happy if you have any thoughts on this.


        Thanks :)

        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