Hello Ümit,
I have tried "terrainScaleMAT->getOrCreateStateSet()->setMode(
GL_RESCALE_NORMAL, osg::StateAttribute::ON );" pattern but the result is
same. There is no light effect on the terrain. I don't understand why?
As Gordon said, check if your terrain has normals in the first place...
Rescaling non-existing normals won't do anything :-)
In your .osg file, check for normalArray under your Geometry, and check
that normalBinding is set to PER_VERTEX. If the model has no normals,
you can generate them with a modeling tool or use the
osgUtil::SmoothingVisitor to create smooth normals across the surface.
And BTW, yes you're right that the two suggestions I gave before were
mutually exclusive, i.e. if you checked your model and changed the
TexEnv in it you don't need a NodeVisitor to do the same thing...
Oh, just another little thing, are you sure you're reloading the .osg
model and not the original one without your changes?
J-S
--
______________________________________________________
Jean-Sebastien Guay [EMAIL PROTECTED]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org