how to overlay many images with alpha channel transparency

    Oct 11 2009 | 10:56 pm
    Hi all, I've done quite a bit of trawling but cant find the information I need - its probably elementary and I just cant see the wood for the trees.
    I want to layer images over each other, with each layer using the alpha channel to control the transparency as an image sits over the previous layer(s).
    Is it the blending flag, in which case would anyone be so kind to provide a working example? Do I have to scale the RGB values by the alpha channel? I'm a bit lost - help!

    • Oct 12 2009 | 7:58 pm
      here's an example i give my class:
    • Oct 12 2009 | 8:49 pm
      Thanks for the reply and the patch, much appreciated.
      I've had a good fiddle around with jit.alphablend, and still cant work out how to achieve the effect I want. I want to do something like this:
      So not to blend images, but to stack them up with some pixels "see-through".
      My concepts of video processing are probably a bit amiss, I'm very good with sound but fairly green to graphics and even photoshop etc. If possible it would be great to know a way to stack videos via a junction with multiple inputs, rather than a two way box. Curse demanding feckless newbs.
    • Oct 13 2009 | 2:47 am
      Sounds like a job for luminance keying. Check the examples/jitter-examples/video/keying subdirectory in the Max5 Folder- specifically the jit.lumakey- examples.
    • Oct 13 2009 | 9:59 pm
      Do the images have an alpha mask? If so, jit.alphablend is exactly what you need. For three layers, you will need 2 jit.alphablend objects. If not, you will need to do some sort of keying. Alpha blending can also be done using OpenGL with several objects with @blend_enable 1.
    • Oct 13 2009 | 10:15 pm
      Many thanks for the helps.
      It seems jit.lumakey is giving me an instant result to work with, which is great for learning some stuff. I cant quite work out how to do it with jit.alphablend but I have not given tutorial 29 its due attention. How come transparent regions of my png image are not transparent out the box? I need to read the info that is in the manual about alpha masking.
      I'd really like to use though I spent quite some time messing around with this and not really getting very far, anyone know any relevant examples for alpha compositing with If anyone has the time and willingness to construct me an example patch I'd be eternally grateful!
    • Oct 15 2009 | 10:15 pm