[osg-users] Lightpoint behavior with DirectionalSector

Robert Osfield robert.osfield at gmail.com
Tue Feb 23 00:01:38 PST 2016


Hi Renato,

The light point functionality was indeed written a long time ago, over a
decade me thinks, so I'm rather rusty on the topic.

Having a near light point appear/disappear at different times to a distant
one would be a function of the sector you define for it, so if this is not
happening how you'd expect my guess would be a problem in the values of the
sectors.  The easiest way to understand what's going on would be to add
some debugging code to light point code that tests the sector whether the
eye point is within the sector or not and see if the behaviour is what you
are expecting.

Robert.

On 22 February 2016 at 13:49, Renato Semadeni <rsemadeni at flyelite.ch> wrote:

> Hi,
>
> I'm looking into an older implementation of osg. I struggling with some
> lightpoint which have directionsectors defined.
>
> I have lightpoints which change their appearance due to viewing position
> of the eyepoint. As you can see below, we are defining some lights in a
> .osg file, this is loaded by our engine and the lights are displayed.
>
>
> Code:
>
> Group {
>  name "Lights_PAPI"
>  nodeMask 0xffffffff
>  cullingActive FALSE
>  num_children 2
>    osgSim::LightPointNode {
>    nodeMask 0xffffffff
>    cullingActive FALSE
>    num_lightpoints 1
>    minPixelSize 0
>    maxPixelSize 10
>    maxVisibleDistance2 20e+010
>    pointSprite FALSE
>    lightPoint {
>       isOn TRUE
>       position -21.5745 -336.3172 0.8935
>       color 1 0 0 1
>       intensity 0.04
>       radius 5.5
>       blendingMode BLENDED
>       osgSim::DirectionalSector {
>          direction -0.572689 -0.819772 0
>          angles 6.28318 0.13614 6.28318 0
>       }
>    }
>  }
>   osgSim::LightPointNode {
>    nodeMask 0xffffffff
>    cullingActive FALSE
>    num_lightpoints 2
>    minPixelSize 0
>    maxPixelSize 10
>    maxVisibleDistance2 20e+010
>    pointSprite FALSE
>    lightPoint {
>       isOn TRUE
>       position 44.2707 -379.8886 0.8936
>       color 1 0 0 1
>       intensity 0.04
>       radius 5.5
>       blendingMode BLENDED
>       osgSim::DirectionalSector {
>          direction -0.572689 -0.819772 0
>          angles 6.28318 0.13614 6.28318 0
>       }
>    }
>  }
> }
>
>
>
>
> We observe now, that even if the lights are only at different positions,
> that always the one on closer on the x-axis gets turned off earlier than
> the other one.
>
> I was looking for an error in our code, but even in the osgviewer the same
> behavior is present. Secondly I tried to find an approach to define the
> directionsector once for both lightpoint. But unfortunately without any
> success.
>
> We can't include the light behavior into our engine, without larger
> effort, therefore we are looking for a solution base on the osg file format.
>
> I really hoping to find some help!
>
> Thank you!
>
> kind regards,
> Renato
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=66383#66383
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160223/7e93e8e1/attachment-0002.htm>


More information about the osg-users mailing list