Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Lighting in a qt3d scene

Lighting in a qt3d scene

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 968 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.
  • S Offline
    S Offline
    sunil.nair
    wrote on last edited by
    #1

    Hi,

    All documentation regarding lighting in qt is through QML only. I am trying to add a light element to qt3d scene
    I use the following code:
    @
    QColor color;
    lightParameter= new QGLLightParameters;
    color.setRgbF(1.0,1.0,1.0,1.0);
    lightParameter->setAmbientColor(color);
    color.setRgbF(0.0,0.0,1.0,1.0);
    lightParameter->setSpecularColor(color);
    lightParameter->setDirection(QVector3D(0,100,100));
    @

    Although, my scene appears a little bright, nothing significant happens when I tweak the parameters of ambient light and specular light. What do each of these correspond to?

    [Edited: Please use code tags "@@" - p3c0]

    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