Effect's don't restart

Discussion about developing custom effects and video sources for CamTwist with specific focus on QuartzComposer and the Obj-C API for CamTwist.

Effect's don't restart

Postby adamfenn28 » Sat Oct 09, 2010 12:43 pm

I've been creating some effects for an upcoming broadcast. In one effect, I slide an advertisement graphic in, and then slide it back out. The problem I'm having is that the effect doesn't restart when I transition it in. I can see this is the case for other affects as well. I created a very simple one that puts the patchtime on the screen. After I've used that effect once, it keeps on running. When I start it a second time, you can see that it's been running since it was first run. In the case of my advertisement effect, and others that run a sequence intended to be keyed off of the transition in, that's an issue. Has anyone found a workaround for this behavior?

Adam
adamfenn28
 
Posts: 75
Joined: Fri Oct 01, 2010 9:12 am

Re: Effect's don't restart

Postby SteveG » Sat Oct 09, 2010 7:27 pm

Adam,

I'm not 100% sure I understand but let me try to answer anyway. If you're using the standard filter protocol, you can detect when you're in preview mode with the _protocolInput_PreviewMode input. When that goes true, you can reset your effect.
SteveG
 
Posts: 1164
Joined: Fri Nov 23, 2007 6:05 pm

Re: Effect's don't restart

Postby adamfenn28 » Sat Oct 09, 2010 8:51 pm

This sounds like this might help me. I wonder if there's a similar capability for Program mode. Is there a place where things that that are documented? Since I'm such a QC hack, I'm not sure I even know how to test for that, it seems like an environmental variable type of thing. I'll so some reading.

Thanks!
adamfenn28
 
Posts: 75
Joined: Fri Oct 01, 2010 9:12 am

Re: Effect's don't restart

Postby adamfenn28 » Sat Oct 09, 2010 9:27 pm

To demonstrate how much of a hack I am,.. What the heck is the standard protocol filter?
adamfenn28
 
Posts: 75
Joined: Fri Oct 01, 2010 9:12 am

Re: Effect's don't restart

Postby SteveG » Sun Oct 10, 2010 10:11 am

Not sure where it's documented from Apple, but it's rather simple to explain here. When you create a new composition in QC, you can select Image Filter as the template. If you already have a composition, select Editor -> Edit Protocol Conformance and select Image Filter. You'll automatically get several inputs/outoputs that you should connect to whatever makes sense.
SteveG
 
Posts: 1164
Joined: Fri Nov 23, 2007 6:05 pm

Re: Effect's don't restart

Postby adamfenn28 » Sun Oct 10, 2010 3:37 pm

Thanks! I'm working on figuring this out now. It not letting me put consumer patches on the root level is a pain in the neck. Actually, it doesn't seem to want to let me use billboard at all, which makes it difficult to control the size and position of my image. I'll keep plugging away. I'm sure there's a way to make this happen.
adamfenn28
 
Posts: 75
Joined: Fri Oct 01, 2010 9:12 am

Re: Effect's don't restart

Postby adamfenn28 » Sun Oct 10, 2010 4:57 pm

I'm finding this to be fairly difficult. I've managed to create a test composition that demonstrates the Preview Mode though. It does work, and I think I can use it to do what I need to do. I'm having trouble using consumer patches. It doesn't seem to matter if they are at the root level or not. Also, I find the Image (Required) out bout to be difficult to work with. I can't see how to position it, resize it (it always wants to stretch to fill the screen), and doesn't seem to allow for transparency, like billboard does. I'll keep playing.

Adam
adamfenn28
 
Posts: 75
Joined: Fri Oct 01, 2010 9:12 am

Re: Effect's don't restart

Postby adamfenn28 » Sun Oct 10, 2010 9:36 pm

The Graphic Animation template has the Preview Mode also, and it doesn't have the same restrictions with consumer patches. This is going to work perfectly. I'm finishing up the final details now, and making it cooler than I thought it would be.
adamfenn28
 
Posts: 75
Joined: Fri Oct 01, 2010 9:12 am

Re: Effect's don't restart

Postby Lee » Sun Oct 10, 2010 10:09 pm

Hi Adam, Lee here. If you're going to make more than a few image filter effects for CamTwist, you should probably be informed about the Render In Image patch, so I thought I'd try to assist. (But if the Graphic Animation Protocol works instead, cool! That's that, then.)

Regarding Image Filter Protocol in general however; you can usually overcome the consumer-at-root problem by placing the Billboard inside a Render In Image patch. That's the standard work-around for when Billboards/Sprites are needed at root in protocol mode. Just attach the protocol Image (Required) patch to the output port on the Render In Image. At a minumum, you'll also need to publish the Billboard's image input so it will appear as an input on the Render In Image to be attached to another protocol Image (Required) patch. Other Billboard input ports can be published as well, or they can simply be addressed from within the Render In Image, if desired.
Intel Core i3, ATI Radeon HD 4670, OS X 10.7
Lee
 
Posts: 144
Joined: Sun Dec 09, 2007 10:59 am
Location: Montreal, Quebec, Canada

Re: Effect's don't restart

Postby adamfenn28 » Mon Oct 11, 2010 7:40 am

Thanks Lee! That's a great tip. I just built a little test composition to see it in action. Works like a charm!
adamfenn28
 
Posts: 75
Joined: Fri Oct 01, 2010 9:12 am

Next

Return to Effect Development

Who is online

Users browsing this forum: No registered users and 0 guests