Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Define more than one light in a 3D scene?



  • Hello,
    I would like to define more than one light in a 3D scene. For the moment I have this working:
    @Viewport {
    anchors.fill: parent

        light:  Light {
                    id: light0
                    position: Qt.vector3d(-15,10,5)
                    diffuseColor: "white"
    
                }@
    

    ...

    And I tested unsuccessfully this:

    @Viewport {
    anchors.fill: parent

        light: [ Light {
                    id: light0
                    position: Qt.vector3d(-15,10,5)
                    diffuseColor: "white"
    
                },
                  Light {
                    id: light1
                    position: Qt.vector3d(15,-10,5)
                    diffuseColor: "white"
                }]
    

    @

    Any idea how to have these two lights defined in the same scene?
    Thank you,
    Bill


Log in to reply