Hi,
On Tue, 2004-03-30 at 10:17, Gerrit Voss wrote:
> Hi,
>
> On Mon, 2004-03-29 at 23:02, Daniel Grest wrote:
> > Hello OpenSG community,
> >
> > in short:
> > Is there a way to switch between GL_REPLACE and GL_MODULATE in a vrml file?
> >
> > I have the problem, that i want to render a large vrml scene with some
> > textures replacing the material values, while others should be rendered
> > as GL_MODULATE.
>
> VRML does support it implicitly by switching between lit and unlit
> settings. The only trick left if any of our loaders support this,
> I'll check this and get back to you.
ok, I would not say they do it right but the effect is at least for a
small test the as expected. Just leave out the material field for your
replace appearance, example :
Lit material ==> modulate effect
appearance Appearance
{
material Material { diffuseColor 1 1 0 }
texture ImageTexture
{
url "tree.jpg"
repeatS TRUE
repeatT TRUE
}
}
Unlit material ==> replace effect
appearance Appearance
{
texture ImageTexture
{
url "tree.jpg"
repeatS TRUE
repeatT TRUE
}
}
Just a small warning, the effects seem to be ok (at least for my small
test scene). I will look at it and fix the resulting OpenSG tree in
order to avoid inconsistencies I still expect to be possible (without
having checked the OpenGL spec too ;-)). But I hope you can continue to
go on with this workaround ;-)
regards,
gerrit
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users