Hi Robert,
Thank you for your help.
I've achieved my purpose.
Following your instructions I realized that my problems were two:
1) On the one hand, the scene by default sets the AmbientIntensity as follows:
osg::LightModel* lightmodel = new osg::LightModel;
lightmodel->setAmbientIntensity(osg::Vec4(0.1f,0.1f,0.1f,1.0f));
_globalStateSet->setAttributeAndModes(lightmodel,
osg::StateAttribute::ON);
And due this the scene was always a little light.
Then I set this value to zero in my application after create the scene:
osg::LightModel* lightmodel = new osg::LightModel;
lightmodel->setAmbientIntensity(osg::Vec4(0.0f,0.0f,0.0f,1.0f));
_globalStateSet->setAttributeAndModes(lightmodel,
osg::StateAttribute::ON);
And I got all the elements of the scene appear dark unless sea.
2) On the other, I realized that I was applying to the sea surface an
OSG::Material with Emission value set to nonzero. Once I set the zero value to
this parameter, all to be completely dark in my scene.
------
I leave here my solution in order to it can help someone with same problem.
Thanks a lot again for your help.
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=8627#8627
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org