Menu

#11 Inter-scene light interference

open
Tarta4D (4)
8
2010-04-29
2009-12-22
No

Lights instantiated in a scene influance other scenes.
This bug is due to a mis-interpretation of Ogre behaviour on lights management.
In Ogre, lights a re active on creation. Even if they are not appended to a scene tree, or they are appended to a tree that is detached form the SceneManager root object.

To solve we must add an "enabled" flag to the LightObject class and set the corresponding Ogre::Light status on showScene() events. Of couse, all Ogre::Lights must be turned off on hideScene() events.

Discussion

  • Davide Di Giannantonio

    • assigned_to: nobody --> lordsme
     
  • Davide Di Giannantonio

    • status: open --> closed-fixed
     
  • Davide Di Giannantonio

    Fixed adding an "enabled" attribute to the LightObject.
    Now everytime a Scene is hidden, a onSceneHide() method is invoked and the lights which are enabled in Tarta4D are disabled in Ogre3D.
    Analoguous behaviour when showing a scene.

     
  • Fabrizio Nunnari

    Lights on cameras still influence other scenes. Turn on/off also light of cameras.

     
  • Fabrizio Nunnari

    • status: closed-fixed --> open-postponed
     
  • Davide Di Giannantonio

    Shaders are affected by light in every scene, also if the scene is hidden/detached.
    It is cuased by the OGRE shading program/material definition which sends the lights using "param_named_auto": it sends the first lights closest to the mesh, ignoring the Tarta4D scene management.

    We should create new automatic parameters in tarta4D, or finding another way to manage different loaded scene...

     
  • Davide Di Giannantonio

    • status: open-postponed --> open