Hi folks,

Here is a fix for the code in LightPointRecords that builds the blink sequences.

Issue:

At LightPointRecords:308 and LightPointRecords:330 the color of the light point 
is used as the blink/flash on value.  At first blush this would appear correct 
but LightPointNode multiplies the blink color with the light point color.  This 
means that the result will be the square of the light point color.  This would 
only "work" is the color is saturated, but if the color component < 1.0 than it 
will cause the intensity of the light to be greatly reduced.

Solution:

Setting the blink/flash on sequence color to white (1,1,1,1) fixes this 
problem.  This value is modulated per frame between black (off) and white (on). 
 The result of this modulation is multiplied with the original light point 
color by LightPointNode and results in a proper blinking light.

Original Code:

LightPointRecords:308

blinkSequence->addPulse(_animation->animationEnabledPeriod, lp._color);

LightPointRecords:329

case LPAnimation::ON:
    color = lp._color;



Correction Code:

LightPointRecords:308

blinkSequence->addPulse(_animation->animationEnabledPeriod, osg::Vec4(1,1,1,1));

LightPointRecords:329

case LPAnimation::ON:
    color = osg::Vec4(1,1,1,1);


Updated file is attached.

Thank you!

Cheers,
Brad

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=48536#48536




Attachments: 
http://forum.openscenegraph.org//files/lightpointrecords_168.cpp


_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to