Qt3D/Qml mesh bounding box



  • Hi Qt guys,

    I am importing an obj file and want to find the boundingbox of this object using qt3d/qml.

    Any body has an idea if we can access such information in qt3d/qml.

    Q--t



  • Hi @Q-t-0, I just imported a custom-mesh *.obj from Blender into the QTDataVisualization arena. I did not encounter any problems/properties or even a mention of Bounding-Boxes. Could you please provide more details on what your trying to accomplish and what problem your hitting?

    If it helps my final syntax was this:

    // NOTE: This was a Polar Grid. 'position' coords are (angle, height, direction).
    Custom3DItem {
        id: widgetMesh
        visible: true
        meshFile: ":models/myWidget.obj"
        textureFile: ":models/blue50.png"   // small semi-transparent square.
        position: Qt.vector3d(270.0, 96.0, 25.0)
        scaling: Qt.vector3d(15.0, 4.0, 15.0)
    }
    

    Issues I did encounter:

    1. Initially my object was much-much too large (or too small) and I had to play with the scaling. I did this directly in the QML (not in the model generator). See syntax above.
    2. During object creation (ie. in Blender) you must create the UV mapping, check the beginning of this page, just the UV mapping part. http://www.chocofur.com/uv-mapping-tutorial-in-blender.html
    3. The texture/material/opacity were not set in Blender during object-creation. Notice my textureFile is a straight *.png import.


    Let us know if any of this is helpful!


  • Moderators

    Hi! You need to implement your own aspect for this. Don't think you can do this without writing code in C++ though.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.