Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Define more than one light in a 3D scene?
Forum Updated to NodeBB v4.3 + New Features

Define more than one light in a 3D scene?

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    billouparis
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved