[osg-users] Compositing multiple osg::Image w/ alpha channels
Sebastian Messerschmidt
sebastian.messerschmidt at gmx.de
Tue Jul 19 00:36:33 PDT 2016
Hi Martin,
> Hi,
>
> I have multiple osg::Images, each one has a transparent background. When compositing them onto a background image(using copySubImage), this transparent background is not respected and is instead filled in with white, looking fairly ugly.
Your approach is sort of akward (if I get it correctly). If you want to
blend images offline, use a image processing tool. If you want to do it
online/with OpenGL use blending, multi-texturing and possibly render to
texture if you need the result as an image.
>
> I do not see any other methods related to compositing images, other than mix(). But, because the images are not the same size, mix() will not work.
What about resizing/resampling them then?
>
> Does some method exist that would respect the transparent backgrounds, or will I have to roll my own (not that it would be difficult, but I also don't want to reinvent the wheel)
I still don't get what you want to do. Do you want to do image
processing or rendering? If you need to render, simply use blending or
multitexturing and a shader that does the "composition" math as you desire.
Could you explain, what your process is?
Cheers
Sebastian
>
> Thank you!
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=68113#68113
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
More information about the osg-users
mailing list