[Interest] {Qt3D} Problem with the look of QDiffuseSpecularMaterial moving from Qt5 to Qt6

Andy asmaloney at gmail.com
Sun May 5 00:25:49 CEST 2024


I've been upgrading an old codebase from Qt5 to Qt6. For Qt3D, I've
followed the info from here:

  https://www.kdab.com/qt-3d-changes-in-qt-6/

The changes I've had to make so far were all around geometry, but I'm
getting different visuals between Qt5 and Qt6.

Qt 5.15.2:
[image: Qt5.png]

Qt 6.7.0:
[image: Qt6.png]

(Ignore slight camera position difference.)

I haven't changed the light or any of the materials.

I'm using QDiffuseSpecularMaterial for all these meshes, and setting
ambient, diffuse, shininess, and specular for all.

I haven't found anything describing any changes to
QDiffuseSpecularMaterial. Am I missing something I need to change? Did
QDiffuseSpecularMaterial just change to be darker? If so, how do I get
lighter colours back? No matter what I change it's super-dark.

My offscreen renderer is also broken now, but that seems to be a separate
issue.

(Aside: It would be useful to have C++ examples of the new stuff -
QBoundingVolume and QGeometryView for example. The official docs - as with
all of Qt3D - are very sparse. More docs & more examples would be of great
help.)

Thank you!

P.S. My active framegraph looks like this:

myCustomFrameGraph::Custom (:0, (null))
    Qt3DRender::QRenderSurfaceSelector:: (:0, (null))
        Qt3DRender::QViewport:: (:0, (null))
            Qt3DRender::QClearBuffers::backgroundColour (:0, (null))
                Qt3DRender::QNoDraw:: (:0, (null))
            Qt3DRender::QFrustumCulling:: (:0, (null))
                Qt3DRender::QCameraSelector::onScreenCameraSelector (:0,
(null))
                    Qt3DRender::QRenderCapture::onScreenCapture (:0, (null))
                    Qt3DRender::QLayerFilter::opaqueLayer (:0, (null))
                    Qt3DRender::QLayerFilter::transparentLayer (:0, (null))
                Qt3DRender::QCameraSelector::offScreenCameraSelector (:0,
(null))
                    Qt3DRender::QRenderTargetSelector:: (:0, (null))
                        Qt3DRender::QRenderTarget::offScreenTarget (:0,
(null))
                            Qt3DRender::QRenderTargetOutput:: (:0, (null))

Qt3DRender::QTexture2DMultisample::offScreenTexture (:0, (null))
                        Qt3DRender::QClearBuffers::backgroundColour (:0,
(null))
                            Qt3DRender::QNoDraw:: (:0, (null))
                        Qt3DRender::QRenderCapture::offScreenCapture (:0,
(null))
                        Qt3DRender::QLayerFilter::opaqueLayer (:0, (null))
                        Qt3DRender::QLayerFilter::transparentLayer (:0,
(null))

---
Andy Maloney
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20240504/625716c8/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Qt5.png
Type: image/png
Size: 64071 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20240504/625716c8/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Qt6.png
Type: image/png
Size: 84555 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20240504/625716c8/attachment-0003.png>


More information about the Interest mailing list