Trouble with scaling and alpha

  • Hi, I'm running into some trouble using movies that contain an alpha channel.  I need to be able to scale and place them within the rasters of some projector and quad distort actors, whose own values must stay fixed to maintain screen calibration.

    These projectors / quad distorts are set to transparent, and I am playing movies encoded as Animation with an alpha channel, or prores 4444 with an alpha channel.
    However, when I try to use the sprite or matte actors, any scaling other than 100% suddenly breaks the alpha interpretation.  Movies with premultiplied alpha suddenly go fully opaque, and movies with straight alpha send alpha values for any pixel to wither 100% or 0% (the way movies with straight alpha look if you play them in Quicktime Player outside of Isadora).  In any case, I need to use straight alpha, to avoid getting black fringes.
    Does anyone have any knowledge on how to get movies with alpha to scale with the Sprite or Matte/Matte++ actors?
  • Tech Staff

    I do not have any experience with alpha video and those actors specifically (I have worked with alpha images)
    But you might try the DVX codec, I have had not trouble at all in the past using it with alpha and numerous actors.

  • Thanks, I just tried it. I'm familiar with the codec, though I haven't used it with Isadora before. Oddly enough, what I am seeing is that a DXV file with straight (non-premultiplied) alpha doesn't seem to render correctly even when it goes straight into the projector or quad distort.

    (running on a Mac - not sure if that makes a difference)

  • Dear David,

    I'm doing a test right now, and the Sprite, Matte and Matte++ actors all to maintain the alpha channel as expected. What platform are you using (Mac or Win?) And what version of Isadora?
    Can you send me a patch that demonstrates the problem?
    Best Wishes,
    P.S. One note: the default background video (black) will have the alpha channel set to 255 (full) and thus the background will **not** be transparent. To solve this, Add a Resizable Bkg, set the resolution to match your video, and then connect its output to an Add Alpha Channel actor, but don't connect anything to its 'mask' input. Finally, connect the output of the Add Alpha Channel to the 'background' input of the Matte, Matte++ or Sprite actor. In this case, you're providing a background whose alpha value is 0, and thus it too will be transparent.

  • Hi Mark,

    Thanks for the note on the background.  That definitely explains some behavior I have seen.

    However, I am still seeing the strangeness with scaling (and shifting, it turns out).

    I have attached patch and screen grabs to this post, but the media files are large, so I have posted them here: test

    I am currently running 1.3.1f06 on a Mac (10.6.8)

  • Tech Staff

    I gave this a try and have somethings to report (tested on windows, so many things may be differeent).
    Feel free to email me and I will send you a break down.

  • Dear dbengali,

    OK, thanks for the test file. I see the problems you are encountering. 
    When I tested this, the Default Resolution in the Video Tab of the Isadora Preferences was set to 320x240 -- and thus the output of the Sprite actor was 320x240\. I need to look into this further.
    But I'm mostly wondering why you're using the Sprite actor (and Matte/Matte++) at all. If you're patch is indicative of your setup, why not just feed the image to the 3D Quad Distort directly and change the 'zoom' input to resize the image? If all you're trying to do is to layer the image, this would be 1) more efficient by far and 2) simpler to manage. Is that possible for you?
    Best Wishes,

  • Hi Mark,

    Thanks for looking into it -
    for this particular project, my default resolution is set to 1024x768, since that is the resolution of both of the projectors in the show (though not actually the resolution of any of the content)
    The reason I've been scaling and placing with sprites / matte++ is that I have created a number of user actors that contain 3d quad distorts with values set for appropriate mapping to the various surfaces in the set.  Within each user actor, I have set global values for all of the parameters in 3d quad distort, and since there are intersecting planes being hit by a given projector, I need to use both z-translation and zoom to map the content without one plane blocking another.  These parameters must stay fixed as global values across all scenes in which the actor appears, so that the operator only needs to go to one place to calibrate focus for the whole show by adjusting the parameters in one instance of the user actor.
    I have been working things out with PanScaleZoom, which of course doesn't exactly do the same thing as sprite, but has been solving most of the cases I've needed to in this tech when I run into either the strange alpha behaviour, or the issue where an image jumps to a strange position when moved past the edge of the stage with sprite.
    Let me know if there is any more information I can provide that would be helpful.
    all the best,