Hi Riccardo Linux Fedora 7 OSG 2.2 NVidia GeForce 8800
All work fine for me. I just do "osglight_modified cow.osg" I join the osglight_modified.cpp simplified and updated to OSG2.2. Many bug has be fix and feature added since the OSG 1.2 Version. Perhaps an update to OSG 2.2 will be a good choice for you. HTH David 2007/10/23, Riccardo Corsi <[EMAIL PROTECTED]>: > > Hi all, > > I'm try to get a specular highlights effect by using the > osg::LightModel::SEPARATE_SPECULAR_COLOR mode. > > If I got it straight, this should compute a second color for the > specular component to be added after lighting and texturing. > So for instance, by using a light with white specular component and on a > material with white specular color, I'd expect a white highlight in the > final result. Instead what I get is the highlight modulated by the > texture, as if I were using osg::LightModel::SINGLE_COLOR mode. > > Any suggestion on where I might be wrong? > > Find attached a modified osgLight example to reproduce the problem with > a sample model. > I basically removed the model animation, set a white specular on the > light number 2, and added these lines of code: > > osg::StateSet* pSS = rootnode->getOrCreateStateSet(); > // set separate specular color > osg::LightModel* pLightModel =new osg::LightModel; > pLightModel->setLocalViewer(true); > pLightModel->setColorControl(osg::LightModel::SEPARATE_SPECULAR_COLOR); > pSS->setAttributeAndModes(pLightModel, osg::StateAttribute::ON > |osg::StateAttribute::OVERRIDE); > > I'm on > osg 1.2 > WinXP > nVidia 7900 GTX (tried both older and latest drivers) > > Thank you > Ricky > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org