[osg-users] PrimitiveSet lighting issues

Cysneros, Nelson SPAWAR nelson.cysneros at navy.mil
Mon Sep 24 15:46:04 PDT 2007

Thank you Jean,

I'm still new to all this.  All I found on emissive color is the following:

glMaterial Default Parameters
GL_EMISSION (0.0, 0.0, 0.0, 1.0) emissive color of material

Is this what you had in mind:

	osg::StateSet* state = geode->getOrCreateStateSet(); 
    	state ->setMode(GL_COLOR_MATERIAL,osg::StateAttribute::ON);
	osg::ref_ptr<osg::Material> mat = new osg::Material;

Thanks again

-----Original Message-----
From: osg-users-bounces at lists.openscenegraph.org [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay
Sent: Monday, September 24, 2007 11:52 AM
To: osg-users at lists.openscenegraph.org
Subject: Re: [osg-users] PrimitiveSet lighting issues

Hello Nelson,

> I'm drawing  osg::PrimitiveSet::LINES deep inside my node 
> architecture. The lines come up the right color, but depending on the 
> camera position, the line tends to turn black.  I would like the line 
> color to stay constant regardless of the camera position.

If you want a constant color and no shading at all, you can just use  
the emissive color in the object's material. It is independent of view  
and lighting conditions.

Good luck,

Jean-Sebastien Guay     jean-sebastien.guay at polymtl.ca

This message was sent using IMP, the Internet Messaging Program.

osg-users mailing list
osg-users at lists.openscenegraph.org

More information about the osg-users mailing list