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 handle millions of items ?

how to handle millions of items ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
19 Posts 7 Posters 4.7k Views 3 Watching
  • 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
    student
    wrote on last edited by
    #3
    This post is deleted!
    aha_1980A 1 Reply Last reply
    0
    • S student

      This post is deleted!

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #4

      @student said in how to handle millions of items ?:

      or is there any example ?

      https://doc.qt.io/qt-5/qtwidgets-graphicsview-chip-example.html

      Qt has to stay free or it will die.

      S 1 Reply Last reply
      0
      • aha_1980A aha_1980

        @student said in how to handle millions of items ?:

        or is there any example ?

        https://doc.qt.io/qt-5/qtwidgets-graphicsview-chip-example.html

        S Offline
        S Offline
        student
        wrote on last edited by
        #5

        @aha_1980 thanks, I tried this example before, when I increase the number to 4 millions, it's also very slow . it doesn't help too much.

        aha_1980A 1 Reply Last reply
        0
        • S student

          @aha_1980 thanks, I tried this example before, when I increase the number to 4 millions, it's also very slow . it doesn't help too much.

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #6

          @student

          Have you thought that each element needs memory too? Holding 4 million objects in memory may be challenging.

          If you really need so many items, you will need to invest some more energy.

          Qt has to stay free or it will die.

          S 1 Reply Last reply
          3
          • aha_1980A aha_1980

            @student

            Have you thought that each element needs memory too? Holding 4 million objects in memory may be challenging.

            If you really need so many items, you will need to invest some more energy.

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

            @aha_1980 yes, actually i have more than 4 millions of objects (polygon shapes) that could be 100000000. i want to show a blurred picture unless zoom in.
            i see many EDA tools, like synopsys, cadence, they can show billions of polygon shapes.

            jsulmJ 1 Reply Last reply
            0
            • S student

              @aha_1980 yes, actually i have more than 4 millions of objects (polygon shapes) that could be 100000000. i want to show a blurred picture unless zoom in.
              i see many EDA tools, like synopsys, cadence, they can show billions of polygon shapes.

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

              @student said in how to handle millions of items ?:

              they can show billions of polygon shapes

              I doubt that. It is simply not possible to see so many objects on a display (a display does not even has so many pixels...). I'm quite sure they reduce the amount of objects to what actually makes sense.

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

              S 1 Reply Last reply
              3
              • jsulmJ jsulm

                @student said in how to handle millions of items ?:

                they can show billions of polygon shapes

                I doubt that. It is simply not possible to see so many objects on a display (a display does not even has so many pixels...). I'm quite sure they reduce the amount of objects to what actually makes sense.

                S Offline
                S Offline
                student
                wrote on last edited by student
                #9

                @jsulm yes, agree with you. i believe they must have some mechanisms to process this.
                you know, we just want to see detail when zoom in to a specific level, otherwise, just show a rough picture. that's why I asked this question here to see if anyone have experience on such case. in the other world, how to process large amount of polygon shapes by using Qt.
                i am a new to Qt :-)

                1 Reply Last reply
                0
                • SGaistS SGaist

                  Hi and welcome to devnet,

                  The usual technique is: render only what make sense to show.

                  There's no use trying to render each feather of a Kiwi bird if you are looking at it from the top of a building.

                  The same goes the other way around, there's no use rendering the full building since you're on top of it trying to look at a Kiwi bird.

                  S Offline
                  S Offline
                  student
                  wrote on last edited by
                  #10

                  @SGaist thanks for your reply, i am a newer to Qt.
                  yes, I don't want to show them at full pic view, so I just show them when zoom in to a specific value, in the paint function for each item, I use :

                  option->levelOfDetailFromTransform(painter->worldTransform()) < SpecificValue: return

                  but it doesn't help much.

                  Could you help to describe more about how to filter them ? or is there any example ?
                  thanks very much !

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #11

                    Before going further, what kind of rendering are you looking at ? Just to ensure you are choosing the right tool for your task.

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

                    S 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      Before going further, what kind of rendering are you looking at ? Just to ensure you are choosing the right tool for your task.

                      S Offline
                      S Offline
                      student
                      wrote on last edited by
                      #12

                      @SGaist I have many polygon shapes, and need to view / edit them, for view/edit, i think just when zoom in, without zoom in, a rough picture is enough.
                      as you said: """ There's no use trying to render each feather of a Kiwi bird if you are looking at it from the top of a building.

                      The same goes the other way around, there's no use rendering the full building since you're on top of it trying to look at a Kiwi bird."""

                      that's it.

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #13

                        Is it a 3D scene ?

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

                        S 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          Is it a 3D scene ?

                          S Offline
                          S Offline
                          student
                          wrote on last edited by
                          #14

                          @SGaist no, just 2D polygons.

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            student
                            wrote on last edited by
                            #15

                            any new idea?

                            K 1 Reply Last reply
                            0
                            • S student

                              any new idea?

                              K Offline
                              K Offline
                              kenchan
                              wrote on last edited by kenchan
                              #16

                              @student
                              are these polygon shapes single polygons or meshes of polygons?
                              Are they overlapping i.e. can be hidden behind or hide others?
                              Do they have some measure of coherence you can exploit?

                              These are the kind of questions you should be asking yourself so you can determine the best strategies for LOD.
                              The obvious strategies are minimum pixel coverage, removing items completely hidden items, removing items outside the viewport.

                              If you really want to do it brute force use the GPU directly via OpenGL calls to do the drawing and don't rely on the Qt graphics items at all. Even then you might need to use some clever LOD strategies with that many polygons.

                              S 1 Reply Last reply
                              1
                              • fcarneyF Offline
                                fcarneyF Offline
                                fcarney
                                wrote on last edited by
                                #17

                                drawing millions of objects in qt

                                C++ is a perfectly valid school of magic.

                                1 Reply Last reply
                                -1
                                • K kenchan

                                  @student
                                  are these polygon shapes single polygons or meshes of polygons?
                                  Are they overlapping i.e. can be hidden behind or hide others?
                                  Do they have some measure of coherence you can exploit?

                                  These are the kind of questions you should be asking yourself so you can determine the best strategies for LOD.
                                  The obvious strategies are minimum pixel coverage, removing items completely hidden items, removing items outside the viewport.

                                  If you really want to do it brute force use the GPU directly via OpenGL calls to do the drawing and don't rely on the Qt graphics items at all. Even then you might need to use some clever LOD strategies with that many polygons.

                                  S Offline
                                  S Offline
                                  student
                                  wrote on last edited by
                                  #18

                                  @kenchan Thanks. they are single polygons, some of them may overlapping each other.
                                  yes, I agree I need to minimum the piexl coverage, that means filter out the ones need to render.
                                  the question is how to filter them out according to view port with so many polygons quickly.
                                  when zoom to an area, it should respond quickly, when fit the view, also quickly.
                                  I don't think it's a special case just for me. this should be a general case in many applications.
                                  So i want to see if there is existing framework which can handle such case.

                                  kshegunovK 1 Reply Last reply
                                  0
                                  • S student

                                    @kenchan Thanks. they are single polygons, some of them may overlapping each other.
                                    yes, I agree I need to minimum the piexl coverage, that means filter out the ones need to render.
                                    the question is how to filter them out according to view port with so many polygons quickly.
                                    when zoom to an area, it should respond quickly, when fit the view, also quickly.
                                    I don't think it's a special case just for me. this should be a general case in many applications.
                                    So i want to see if there is existing framework which can handle such case.

                                    kshegunovK Offline
                                    kshegunovK Offline
                                    kshegunov
                                    Moderators
                                    wrote on last edited by
                                    #19

                                    As suggested you should research LOD algorithms. For example this may be of some use or maybe a clustering algorithm. You may also benefit from a space partitioning scheme that's not the one implemented by the graphics scene, but something custom. In any case such problems are not trivial.

                                    Read and abide by the Qt Code of Conduct

                                    1 Reply Last reply
                                    3

                                    • Login

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