Qt3D - [c++] Q: How to activate shadow mapping
-
Hi!
I have a qt3d scene with QEntities and loaded 3D Objects, placed on a plane, consisting of QCuboidMeshes.
I have also set a lightsource on the root entity, which is shading the objects.- How can I add shadow casting in general using c++ and Qt3D?
- Can I activate Scene Reflections, casing among the object entities?
Thanks, best regards.
-
I have found QML Documentation on ShadowMapFrameGraph: https://doc.qt.io/archives/qt-5.11/qt3d-shadow-map-qml-shadowmapframegraph-qml.html
Is there a c++ equivalent?
-
Hi Kevin,
look here: https://doc.qt.io/qt-5/qt3d-index.html and see that: https://doc.qt.io/qt-5/qgraphicsdropshadoweffect.html -
Thanks, but I did not get a useful reference for default shadow mapping.
I think it correlates with object->dependent raytracing.
As Qt creates 3D scenes and considers light sources, i thought maybe it is possible, just to "turn on the lights".I know it would slow down scene creation, but i thought, maybe it could be a parameter somewhere to trigger advanced raytracing.
Is there something on the pipeline in/for Qt version 6?
best regards,
-
@Bondrusiek thank you for your reply this is really helpful for me
-
@kevin_d
I dont know this topic well but recommend you see : https://doc.qt.io/qt-6/qsgmaterialshader-graphicspipelinestate.html
or use some environments like ieqputenv("QT3D_GLSL100_WORKAROUND", "");
The qputenv("QT3D_GLSL100_WORKAROUND", "") instruction is a workaround related to Qt3D
shaders on some embedded Linux devices, such as the Raspberry Pi. It will enable a separate
GLSL 1.00 snippet for the lights required by some embedded devices.
Maybe you must see this kind of variables.