Akos Balazs wrote:
Hi guys,
I have a VRML model that has some billboard-like objects (mainly trees but
some structures aswell) that should be partially-transparent, and the
transparency should be controlled by the alpha channel of their textures.
The problem is that when I render the scene I get the diffusecolor (white)
of the objects where the texture is transparent, instead of the objects
being transparent in those parts. Of course if I set the transparency of
the object's material to 1, the object will be fully transparent, but
that's not what I want. I remember there was some discussion a while ago
about transparency in VRML but I don't remember the details... :)
Please see the attachment for a minimalist example. Is this currently
possible with OpenSG, is it a missing feature, or is it a bug? :)
I use Gerrit's experimental VRML loader.
Thanks,
Akos
Hi Akos,
looks like a bug in the loader if you add a Blend chunk to the material
it looks fine.
BlendChunkPtr blendc = BlendChunk::create();
beginEditCP(blendc);
blendc->setSrcFactor(GL_SRC_ALPHA);
blendc->setDestFactor(GL_ONE_MINUS_SRC_ALPHA);
endEditCP(blendc);
beginEditCP(cmat);
cmat->addChunk(blendc);
endEditCP(cmat);
Andreas
-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community? Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users