How can I disable ilumination and shadowing effects and just use global ilumination in all the Qt3D scene? I've only found this at the documentation: https://doc.qt.io/qt3dstudio/lights.html and it seems like there are three types of lightning: points, directional and area, but not a way of just drawing items using his default color.
Asked
Active
Viewed 209 times
0
-
1It's unclear what you want to achieve. You want to display a 3D object without any lights in the scene? In this case, if the object doesn't have a texture but only one color (e.g. red) you won't see any structure in the object, it will be a completely uniform red patch with the outline of the object. Is that what you want? If you have an object with a texture you can use [`QTextureMaterial`](https://doc.qt.io/qt-5/qt3dextras-qtexturematerial.html) which renders the object with an unlit texture. – Florian Blume May 26 '21 at 09:56
-
@FlorianBlume i want to see a uniform red patch. – Jaime02 May 26 '21 at 12:26
-
1Two ideas: Use [`QTextureMaterial`](https://doc.qt.io/qt-5/qt3dextras-qtexturematerial.html) and as texture a 1x1 image with the color you want to apply on the model. That should give the model the same color everywhere (without guarantee, I've never tried this). You could also implement your own shader for your own material. That's a bit more complicated but if you check out the source code for the existing shaders it should become clear pretty quickly how to do it. – Florian Blume May 27 '21 at 08:09
1 Answers
0
Thanks @Florian Blume, I found that creating a useless light source is a good workaround. Disable all light sources in Qt 3d

Jaime02
- 299
- 7
- 21