FORUMS: list search recent posts

corner pin & motion blur

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Matt Riley
corner pin & motion blur
on Nov 20, 2007 at 5:56:43 pm

So, I bought mocha AE to do some tracking. It works really well. Yay!

However, the way the tracking data is applied in AE is via the corner pin effect. Unfortunately, this effect doesn't support motion blur, which kind of, well, it sucks. :-)

I have a shot that is tracked nicely but when I apply the tracking data I get rather static results because of the lack of motion blur. I looked at the way AE does 4 point tracking internally because it DOES get motion blur. Turns out that AE's tracker supplies not only the corner pin effect but also positional keyframe data, which allows the motion blur to happen.

Mocha AE can output transform data, including positional information. However, when I paste this onto my layer (that is already corner-pinned from the mocha track data) I get a lot of drift. It's motion blurred, but WAY out of alignment. If I also paste the anchor point data from mocha, I get things lined back up, but then my motion blur goes away. Ugh.

So, any ideas for linking these things together? I've googled, searched the cow, etc. but nothing much seems to come up for motion blur and corner pin. :-(

Thanks for any help you AE wizards can offer!

-Matt


Return to posts index

moldyboot
Re: corner pin & motion blur
on Nov 20, 2007 at 6:06:34 pm

maybe try precomping it then add cc force motion blur to the precomp...?

Kevin Camp
Designer - KCPQ, KMYQ & KRCW


Return to posts index

Matt Riley
Re: corner pin & motion blur
on Nov 21, 2007 at 1:25:08 am

I tried that and it mostly works. It's not a great solution, as the filter is only 8 bit and is slow to render. I really want to take advantage of the improved motion blur in AE CS3, so I need a solution that can make it work the "right" way. ;-)

There has to be a relationship between the data. I'm just not smart enough to write an expression to figure it out.

How does AE's 4 point tracker figure out position data? Or rather, what's the relationship between the position data it generates and the corner pin effect it applies?

Any ideas, anyone? I can't be the only one with this problem. :-(

-Matt


Return to posts index


moldyboot
Re: corner pin & motion blur
on Nov 21, 2007 at 3:49:37 pm

you might want to try contacting the mocha guys to see if there is a procedure or workaround.... i don't have mocha so i can't experiment with it.

the only other workaround i can offer is to upgrade to the cycorefx hd, all of those plugins are 16bbc, some are 32bbc. also the cc hd power pin effect supports native motion blur, which may (or may not) help you.

Kevin Camp
Designer - KCPQ, KMYQ & KRCW


Return to posts index

Matt Riley
Re: corner pin & motion blur
on Nov 21, 2007 at 9:36:42 pm

Thanks for the suggestion. I just may grab the CC HD demo and see if the data translates.

I'm going to try posting on Imagineer's boards, too, just to see if I have any better luck there.

-Matt


Return to posts index

Yan Masterson
Re: corner pin & motion blur
on Jan 26, 2009 at 3:07:21 pm

Hi all,

Just updated to After Effects CS4. The lack of motion blur for corner-pinning in AE makes the whole Mocha / AE setup fairly useless, but since Mocha is such a great tracker, it was worth working out how to add motion blur in AE from the corner-pin data. So here's a link to an After Effects favourite that does just that with a directional blur. The expressions only deal with planar motion-blur, which is good enough for most shots (i.e.those that don't crash-zoom).

http://homepage.mac.com/spotpost/SpotPost/

A few notes on how to use it: Copy and paste your corner-pin tracking data from Mocha, and paste it onto your layer in AE as usual. This adds a corner-pin effect to your layer. Then apply this MB_for_Mocha favourite to the same layer. This adds a directional blur effect linked to the corner-pinning. All you need to do now is match the amount of blurring. Move on to a frame in the timeline where you have lots of movement. In the directional blur effect in the timeline, drag the 'Blur length' up until the amount of FG blur matches your BG shot (about 150 works for me). The 'Blur length' will pop back down to 0.3 or so - that's because it's calculating the blur based on the amount that you just gave it divided by the amount of movement for that particular frame.

Presto! Motion blur!

Enjoy!



Yan Masterson - Spot Post - http://www.spotpost.co.uk


Return to posts index


Nick Guth
Re: corner pin & motion blur
on Mar 14, 2009 at 3:49:16 am

This is so sick. Thanks for the great preset. It saved my life because CC Force Motion blur was crashing AE every time I tried to apply it. Maybe CC force MB doesn't like 2k files?



Return to posts index

Filip Vandueren
Re: corner pin & motion blur
on Mar 14, 2009 at 11:47:34 am

Hey Guys,

didn't see this thread originally.
May I propose a different solution, one that does offer Zoom, Position and Rotation Motion blur:

I start out with a Corner Pinned layer, let's call it 'trackedPin'. I'm assuming it's position, rotation, scale are not animated, only the corner pin points are.

Duplicate that layer, disable the corner-pin effect, and rename it ("motion blur pin"). Enable Motion Blur. Hide the original.
Now add these expressions:

Position:
l=thisComp.layer("trackedPin");

ul=l.effect("Corner Pin")(1);
ur=l.effect("Corner Pin")(2);
ll=l.effect("Corner Pin")(3);
lr=l.effect("Corner Pin")(4);

center=(ul+ur+ll+lr)/4;

l.toComp(center);


Scale:
l=thisComp.layer("trackedPin");

ul=l.effect("Corner Pin")(1);
ur=l.effect("Corner Pin")(2);
ll=l.effect("Corner Pin")(3);
lr=l.effect("Corner Pin")(4);

w=Math.max(length(ul,ur),length(ll,lr));
h=Math.max(length(ul,ll),length(ur,lr));

[w/width,h/height]*100


Rotation:
l=thisComp.layer("trackedPin");

ul=l.effect("Corner Pin")(1);
ur=l.effect("Corner Pin")(2);
ll=l.effect("Corner Pin")(3);
lr=l.effect("Corner Pin")(4);

l=(ul+ll)/2;
r=(ur+lr)/2;

x=r[0]-l[0];
y=r[1]-l[1];

ang=radiansToDegrees(Math.atan2(y,x));


by averaging out the cornerpins, and doing some extra math, we get position, rotation and scale that roughly tracks the layer. So we get motion blur for free.
Now we need the corner-pin effect again, but only to do some minor adjustment of the corners. In other words, add back the perspective
Add these expressions to the corner-pins of the motion blurred layer:

Upper Left:
l=thisComp.layer("trackedPin");
p=l.effect("Corner Pin")(1);
fromComp(l.toComp(p));


Repeat for each Pin, just change the numbers on the second line to (2), (3), (4)

That's it. The expressions for position, rotation, scale, could be a bit better, because now, the corner pins sometimes still have to scale up the layer. But I'll leave that for another day.



Return to posts index

Yan Masterson
Re: corner pin & motion blur
on Mar 16, 2009 at 8:53:37 am

Hi Filip,


Looks like a great solution. But you'll be frustrated/happy to know that Mocha for AE v2 includes motion blur data when exporting to AE - so there's no longer any need for our expressions!

Yan.

Yan Masterson - Spot Post - http://www.spotpost.co.uk


Return to posts index


Martin Tresnak
Re: corner pin & motion blur
on Apr 29, 2016 at 9:47:42 am

You saved me! Thanks! It still works in the newest CC!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]