I did a
             setClearColor(osg::Vec4(0., 0., 0., 1.));
and
             setClearColor(osg::Vec4(0., 0., 0., 0.));

on my camera, but when writing the file in png... nothing look like an alpha
channel... same result each time...

I'll try manually scannin each pixel. do you think just setting the alpha
component to 1.0 is sufficient ?
Thanks.

Regards,
   Vincent.


2009/2/23 Art Tevs <[email protected]>

> Hi Vincent,
>
> ok, without shaders this would be easier to implement, however the running
> time would be just bad. Yes, if you just modify the alpha component of every
> pixel and then write this image to a .png file, you should get the
> transparent colors as you want.
>
> You can even do the following: setup clear color of your camera, so that it
> also does clear the alpha color with 0.0. Then render your scene. Then write
> .png file. Nothing else. Pixels, which are not overrendered by your scene,
> will be transparent. I have the same effect in my applications, without
> doing anything ;) Of course your RTT-texture has to be of GL_RGBA format.
>
> cheers,
> art
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=7213#7213
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to