Search code examples
qmlqt5frustumscenegraph

QSGGeometryNode depth (z) problems with 3 vertices


I am drawing a 3D geometry (Point3D vertices) in a Qml scene graph with a custom QSGGeometryNode and QSGTransformNode. This works except that the 3D model is cut off at a certain z-coordinate (z is the depth axis in Qml). First I expected that the problem is due to intersection with the Qml 2D plane. But I tried to move the model along the z axis and it gets always cut off (as if there is a local model frustum clipping plane).

What could be the source of this problem?

Regards,


Solution

  • Unfortunately you can't "just" render 3D content inside the scene, as the scene graph will compress your Z values to make them honour proper stacking of the items.

    If you have a 3D object, you may want to use QQuickFramebufferObject instead (see also this blog post).