different alpha type?


    Apr 21 2006 | 3:16 pm
    Hey folks, I'm layering a couple of video files, animation+ codec,
    using gl.videoplane. so the chain is something like [qt.movie
    colormode@ uyvu] -- [gl.vidoplane]
    it works great except the people who made the original animation
    didn't premultiply the alpha channel (this is their terminology, i'm
    just parroting it here because of my general ignorance of alphas in
    motion graphics) and a fine while halo appears around the matte.
    in final cut pro i can change the alpha type from "straight" to
    "white" and the image appears without this fine white line.
    re-rendering after selecting this type of alpha matte doesnt seem to
    help in gl playback. is there an analgous attribute to this "alpha
    type" in gl.videoplane, gl.texture, or anywhere else for that matter?
    thanks list. you're best.
    ~s

    • Apr 21 2006 | 6:38 pm
      On Apr 21, 2006, at 8:16 AM, Scott Fitzgerald wrote:
      > Hey folks, I'm layering a couple of video files, animation+ codec,
      > using gl.videoplane. so the chain is something like [qt.movie
      > colormode@ uyvu] -- [gl.vidoplane]
      A few notes:
      - Animation is natively ARGB, so this colormode might be faster for
      any such files
      - UYVY mode doesn't support an alpha channel, though you can in
      theory use multi-texturing or shaders to use one image as an alpha
      channel for UYVY content, though it sounds like you just want to use
      ARGB in this instance.
      > it works great except the people who made the original animation
      > didn't premultiply the alpha channel (this is their terminology, i'm
      > just parroting it here because of my general ignorance of alphas in
      > motion graphics) and a fine while halo appears around the matte.
      >
      > like here : http://droolcup.com/pix/straight.png
      >
      > in final cut pro i can change the alpha type from "straight" to
      > "white" and the image appears without this fine white line.
      404.
      > re-rendering after selecting this type of alpha matte doesnt seem to
      > help in gl playback. is there an analgous attribute to this "alpha
      > type" in gl.videoplane, gl.texture, or anywhere else for that matter?
      Could you post a simple example patch with media (preferably URL to
      archive), demonstrating what you're expecting and the problem. OpenGL
      doesn't assume a premultiplied alpha, but if premuliply vs. not is
      really the source o your problem, there may be some ways to set up
      the OpenGL fixed purpose pipeline to achive your results. Otherwise
      you should be able to use GLSL to solve.
      -Joshua
    • Apr 21 2006 | 6:46 pm
      > > fine while halo appears around the matte.
      > >
      image appears without this fine white line.
      > > http://droolcup.com/pix/white.pg
      >
      > 404.
      i'll post a sample as soon as i can get a small enough file up.
      thanks
      ~s
    • Apr 21 2006 | 7:10 pm
      here's a small demop patch with sample media that demonstrates the issue.
      i tried switching b/w argb & uyvu to see if there was a difference
      between the two, but no dice.
      thanks for all the help.
    • Sep 11 2007 | 3:42 pm
      I came across this thread while searching for more info on alpha edges in OpenGL.
      The example provided in the last post is exactly what i've experienced in my own patch. I'm just using multiple objects tho, with png's as source images. Too bad no one has responded to it.
      Anyone have better insights as to how this can be solved/improved?
      I'd prefer not to use a binary alpha layer. JKC did mention shaders, but i'm not even good enough at even using those to know how to go about the problem that way.
      Thanks,
      Bas van der Graaff