Hi Brad, I'm just trawling through my osg-submissions archive and spotted this thread from June last year. There wasn't any final conclusion to it.
What is the current status on this issue? Robert. On 22 June 2012 20:45, Brad Colbert <[email protected]> wrote: > One solution for strobe's and beacons would be to change the code in the > OpenFlight loader to set the on pulse to white instead of the color of the > lightpoint. Something like this: > > LightPointRecords.cpp: 300 > > switch (_animation->animationType) > { > case LPAnimation::ROTATING: > case LPAnimation::STROBE: > > blinkSequence->setPhaseShift(_animation->animationPhaseDelay); > > blinkSequence->addPulse(_animation->animationPeriod-_animation->animationEnabledPeriod, > osg::Vec4(0,0,0,0)); > > blinkSequence->addPulse(_animation->animationEnabledPeriod, > osg::Vec4(1,1,1,1)); > break; > > > However, I don't see how this would ever work for a flashing sequence, which > can change color, since the blink sequence result returned by > BlinkSequence::color() is always multiplied with the original light point > color and the light point color never changes. > > LightPointNode:304 > > osg::Vec4 bs = lp._blinkSequence->color(time,timeInterval); > color[0] *= bs[0]; > color[1] *= bs[1]; > color[2] *= bs[2]; > color[3] *= bs[3]; > > -B > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Robert > Osfield > Sent: Friday, June 22, 2012 11:40 AM > To: OpenSceneGraph Submissions > Subject: Re: [osg-submissions] LightPointNode.cpp:304 Incorrect application > of blink > > Hi Brad, > > On 22 June 2012 18:59, Brad Colbert <[email protected]> wrote: >> Robert, >> >> ... and changing the code to color[0] = bs[0]; I get something that I would >> expect: > > It might be something that you would expect, but your expectation is > clearly off, you are expecting a colour replace rather a colour > modulate, the BlinkSequence is written to be a colour modulate. The > original code is correct. > > I can only presume that you light point colours are set to an > inappropriate value or that the blink sequence colour is an > appropriate value. If you want colour replace style functionality > then you should use 1 1 1 1 for the light point colour. > > Robert. > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
