Qt3D Geometry Inspector
The Qt 3D geometry inspector allows you to look at vertices and their associated attributes used by the Qt 3D renderer in various ways. The geometry inspector is available when one of the following objects has been selected:
- A Qt3DRender::QGeometry instance.
- A Qt3DRender::QBuffer or a Qt3DRender::QAttribute belonging to a Qt3DRender::QGeometry.
- A Qt3DCore::QEntity with a geometry component attached to it.
The wireframe view supports a number of interactions:
- Left mouse button drag changes the view direction.
- Middle mouse button drag moves the camera in an orbit around the geometry.
- Arrow keys and W/A/S/D keys allow to move the camera in a first person view.
- Mouse wheel changes zoom.
- Left mouse click on a triangle face selects the corresponding elements in the raw buffer view.
The wireframe view by default does backface culling as the renderer would do as well. This can be disabled via the corresponding action in the toolbar at the top of the wireframe view. The culled faces are then shown in red, like in the following screenshot.
The Qt 3D geometry inspector can also visualize normal vectors, assuming there is a corresponding Qt3DRender::QAttribute present in the vertex buffer. Normal vector visualization is enabled using the corresponding toolbar action in the wireframe view.
Vertex normals are shown in blue, face normals are shown in yellow.
The 3D geometry view can use a number of different diagnostic shading modes to highlight specific aspects of the vertex data. Some shading modes depend on the availability of specific vertex data (such as normals, texture coordinates or tangents), and are only selectable if corresponding vertex attributes exist.
- Wireframe: No shading is applied to faces, allowing you to see through the model.
- Flat: Just colors faces with a solid color.
- Phong: Basic phong shading is applied, which can help to validate correctness of vertex normal data.
- Texture Coordinates: Uses the vertex texture coordinates for the green and blue color channels.
- Normal: Uses the vertex normal as the vertex color. This is useful to spot discontinuities in surface normals.
- Tangent: Uses the x, y and z component of the vertex tangent and vertex color.
- Color: Uses the vertex color attribute for shading.
The diagnostic shading mode can be selected using the Shading combobox in the toolbar.
You can switch to the raw buffer view in the toolbar on top of the Qt 3D geometry inspection view. A combobox as the top allows you to select the Qt3DRender::QBuffer instance to inspect, typically there is one or more vertex buffer and one index buffer present.
The buffer view shows a tables with the buffer data decoded based on its associated Qt3DRender::QAttribute instances, resulting in one or more columns per attribute.
The following examples make use of the Qt 3D geometry inspector:
© 2016-2020 Klarälvdalens Datakonsult AB (KDAB).
Documentation contributions included herein are the copyrights of
their respective owners.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.