Hi Chris, I'm using FFP, and I guess that I could do this effect without using GLSL and with minimal effort.
I already tried what you suggest, i.e. blending the object being destroyed with the background. There are some disadvantages in doing that: 1) that object would show its back faces during fading, even if it is completely opaque at the beginning. I don't want that, because the initial steps would show the object completely messed up (since there is no sorting of triangles from farthest to nearest, so farther triangles might be drawn later than nearer, and the blending would give wrong result). I could cull the back faces, yes, but only if that object is a completely closed surface, otherwise visible back faces would disappear immediately. 2) I would implement a general solution that is based not upon the objects that have to fade in/out, but on the global scene. I mean, I would just need to draw the final image elsewhere (no matter which object fade in, which other fade out, which one changes color or appearance, etc...), not in back buffer, and blend from the initial image (currently shown in the front buffer) to that final image. So actually, yes, my effect is more a morphing than a fading effect. My concerns are about: 1) How to read the content of the front buffer and store it in a texture. 2) How to draw in a separate pixel buffer and create a texture with it. 3) If this method might be fast or slow (some years ago I could experience that copying the content of the front buffer on a ATI graphic card was so slow!), and if it would work in general. 4) Last, but not least, if there is already some code ready to be used! :) Thanks Gianluca On 5/7/2011 8:58 AM, Gianluca Natale wrote: > Hi everybody, > I'm developing an osg based application Are you using GLSL shaders, or only basic FFP? Why not move the fading objects into a TRANSPARENT_BIN and adjust the alpha value of the geometry down progressively? -- Chris 'Xenon' Hanson, omo sanza lettere. [email protected] http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. "There is no Truth. There is only Perception. To Perceive is to Exist." - Xen _______________________________________________ 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

