Qt World Summit: Submit your Presentation

Overlapped Surface3D and Scatter3D

  • Hello everyone

    I recently asked some questions about data visualization via different methods. Then I choose to try the QML way.
    However, I got another problem. I tried looking for solutions on the web for days and I could not find anything useful even for such "simple" problem.

    I have got my Surface3D qml object with its Surface3DSeries and ItemModelSurfaceDataProxy and the surface is well drawn. Now I want to draw on such surface a few points like in a scatter plot (or like the selection point that appears in the qml surface examples, but more than one).

    If I draw the Surface3D and then create a Scatter3D object on top of that, the Surface3D will not be visible anymore.
    If I insert a Scatter3DSeries within the Surface3D object, the complier will give an error because a Scatter3DSeries cannot be used in a Surface3D .
    If I try to put a ItemModelScatterDataProxy into the Surface3DSeries after the ItemModelSurfaceDataProxy, the points will not appear.

    In the examples I could not find any case of surface and scatter objects overlapped.

    Can anyone help me on this Nth problem?
    Thank you in advance.

  • Anyone? :-(
    Is it even possible to draw a Surface3D and a Scatter3D within the same axis?

  • Last up :-(

  • Lifetime Qt Champion


    Sorry nobody can help you with your situation.

    You should try to post it on the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.

  • Hi @Davide87
    A little bit late, but since you mention you only need to add a few scatter points to the surface, I believe you could try with Q3DSurface instead of QML's Surface3D type and use the addCustomItem method to add custom mesh-objects. In the Qt example below, these custom items are an "oil rig" and "refinery".


    You could define your own mesh object to be a small sphere that you would place at your scatter point positions.

    All that is not very elegant, of course, but it could help you out.

  • @SGaist Thank you. I wrote to that mailing list, but unfortunately no one answered me :-(

    @Diracsbracket I'll try it and let you know. Thanks.

  • It works good!

    I took the sphere from Qt\5.11.1\Src\qtdatavis3d\src\datavisualization\engine\meshes. Then I added the custom item as in that example.
    The Q3DSurface class works perfectly. Furthermore now I don't need to get crazy passing things from c++ to qml.

    That's the result:

    Thank you very much guys.

    ps: Maybe "QML and Qt Quick" is no more the appropriate section for this topic :-D

  • @Davide87 said in Overlapped Surface3D and Scatter3D:


    Great to hear, and thank you for the feedback!
    Thanks to this question, I also got to learn about the awesome software used to create the meshes:

Log in to reply