Hi all,
I have a question about OpenGL materials. From what I can see, if I
disable GL_LIGHTING in the stateset of an object, then that object is
rendered with the colors specified in its color array only, i.e. the
material has no effect. Is there a way to change that?
The effect I want is
Hi JS,
The OSG is designed around separating geometry data (in Drawables)
from state data (in StateSets), the usage model you are suggesting
mixing this, and this would struggle in anything other than models
that don't have any colour arrays assigned to them, otherwise the
local geometry colour
Subject: [osg-users] About OpenGL materials
Hi all,
I have a question about OpenGL materials. From what I can see, if I disable
GL_LIGHTING in the stateset of an object, then that object is rendered with the
colors specified in its color array only, i.e. the material has no effect
Jean-Sébastien Guay wrote:
The reason I can't just specify the colors in the color array is that
then, if I use scribe or outline effects (using osgFX::Effect), the
wireframe overlay or outline takes on the vertex colors too instead of
being white (or the color I specify). If there's a way to
Hi Gordon,
(sorry, sent before I had finished typing...)
No Lighting = No Material
Hmmm, and any way to make it so that lighting has no effect (even though
it's on) for a given object? I thought about putting a 1x1 texture with
in GL_DECAL mode, but then I would need a texture for each
Jean-Sébastien Guay wrote on Wednesday, February 04, 2009 4:43 PM:
What I'm getting at is I'm very flexible as to how I get the color onto
my model, as long as it isn't through the vertex colors since that
overrides the scribe/outline effect's color.
Couldn't you just disable color arrays when
Jean-Sbastien Guay wrote:
Hi
Gordon,
(sorry, sent before I had finished typing...)
No Lighting = No Material
Hi J-S,
Here is a probably worthless suggestion written without a proper review
of the thread. I you want a material that looks the same as the unlit
colour just set
Sent: Wednesday, February 04, 2009 3:43 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] About OpenGL materials
Hi Gordon,
(sorry, sent before I had finished typing...)
No Lighting = No Material
Hmmm, and any way to make it so that lighting has no effect (even though
it's on) for a given
Hi Bryan,
Couldn't you just disable color arrays when you want the scribe/outline effect
(see osg::State::disableColorPointer(); would require a DrawCallback, though)?
Interesting, I didn't know you could do that, I'll look into it.
Thanks for the suggestion,
J-S
--
Hi Roger,
Here is a probably worthless suggestion written without a proper review
of the thread. I you want a material that looks the same as the unlit
colour just set the materials emissive colour to the same as the vertex
colour and set all the other material colours to black.
Well,
Hi Shayne,
This may be a naive comment but couldn't you leverage something similar to
glColorMaterial() to accomplish the task?
I think glColorMaterial is the opposite, i.e. it will place whatever
glColor is set as (i.e. vertex colors for example) into the current
material. What I (thought
11 matches
Mail list logo