I may be misunderstanding the problem, but I have a few thoughts: -The mask input on a billboard is kind of slow compared to using another billboard on top, with whatever the mask is setup with alpha channel so that it does the right thing when the mask billboard is in alpha mode. It's been awhile since I tested that, and it may not hold true in every case.
-I'm pretty sure that if you fiddle with the Billboard settings to expose custom width and height, you can then feed it something that sizes width and height by pixels. I think there may be some built in virtual patch that does this (units to pixels?). -You may be able to avoid RII if you do that. -Compositing with CI is usually way slower than opengl blend functions. -gt On Apr 20, 2012, at 2:34 AM, Alastair Leith wrote: > Hi List > > I'm trying to make an image mask for a Billboard such that the masked area > stays static (relative to Viewer window) while the image of some text moves > up and down (as if) inside the bounds of a masked window. The problem I am > having is that there is no simple way to give an absolute position for the > mask while moving the image independently, like you say a mask in PS or AE > behaves. Typically the billboard patch scales a > rendering-destination-dimension sized mask image down to be (somehow) > relative to the size of the input image rather than use it as a mask the size > of the rendering destination (Problem 1). > > If I use an Image Transform Patch to translate the text image up/down on the > Y-Axis the Billboard patch basically ignores the change in bounds and just > centres the image at the same origin as determined by X pos, Y pos and image > size (Problem 2). > > I did make a successful composition that creates a mask the same size as > source image (an Image from String patch output) by 'screen' blending black > and white cropped images (doing math for the crop inputs to get positioning > relative white/black correct) then using a Mask to Alpha patch and inputting > it to the Billboard. By animating several of the cropping offsets and heights > and the Y-Position of the Billboard I can generate the desired animation of > text scrolling up and down inside window bounds. Problem with this solution > is it seems overly complicated, a little CPU hungry on my old mac anyhow, and > because the crop patch uses integer inputs, an animation that only moves the > mask say 33 pixels is noticeably jerky (only just) as compared to just > animating Y Postition of a billboard with cropping sprites all around it. > > Maybe animating a billboard with cropping sprites set to alpha-0%-black > (blend mode: replace) on higher layers inside a RII patch is the way to go > but I'd like to avoid RII patch on principle that's more overhead. I don't > mind using RII patch to construct the mask if it is static and wont > re-evaluate after initialisation but that just gets me back to Problem 1. > > Any assists/demos/thoughts gratefully received. I'm sure some of you have > been here before — I know I have :-) > > Alastair Leith > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Quartzcomposer-dev mailing list (Quartzcomposer-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/quartzcomposer-dev/gtoledo3%40gmail.com > > This email sent to gtole...@gmail.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list (Quartzcomposer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com