Hi,

Jiri Filip wrote:
Hi all, I have a following question. When I set texture values
(manually or from loaded image) and render such a texture on object
and grab the final image from screenbuffer its pixel values are
lower. For example, when I set value 100 (from 0-255) I get 80. I
have already switched of the light using

Code: state->setMode(GL_LIGHTING, osg::StateAttribute::OFF);


.. to remove standard viewer shadowing.

Is there in OSG any default ambient lighting or any attenuation that
could cause this behaviour? Do you have any ideas how to get in
rendered images the exact color that I set without any modification?

Make sure your object you put the texture on has colours 1,1,1.

Also see other texture modes. E.g. OSG defaults to GL_MODULATE, there is also GL_DECAL.

See this thread also:
http://article.gmane.org/gmane.comp.graphics.openscenegraph.user/36938

jp



Another confusing thing is, that default viewer has some default
light  positioned in the same direction as camera and performs some
kind of Lambertian shading. Is there any way how to switch on/off
this light or control its position to have the same functionality?

Sorry for silly questions, but this problem drives me mad. Thanks in
advance for any suggestions.

Jiri

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





_______________________________________________ osg-users mailing
list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support.

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to