ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expression that links fast blur to Camera position?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Tara Devlin
Expression that links fast blur to Camera position?
on Oct 6, 2016 at 7:25:51 pm

Hi Everyone,

Forgive me. I basically stumble my way around expressions and beg for help when I'm over my head. Does anyone have a quick expression that links fast blur to the distance or position of a camera - or can point me in the right direction?

I found this but it's not working quite like I need it to.

// Blur from Distance to Camera
dist = length(thisComp.layer("Camera 1").position, position);
B = dist/100;
[B]


I attached it to the "Bluriness" of "Fast Blur" but the blur doesn't seem to change when I move the camera around.

The thing is, I have a ton of layers in z space spread out like a grid. The camera is flying around as some of these layers take center stage and others go back.. The ones that aren't featured need to go out of focus a little. I can do it by hand, of course, but I think it would be much more realistic with an expression (not to mention less time consuming).

Thank you all for any help!

Best,

Tara

// Blur from Distance to Camera
dist = length(thisComp.layer("Camera 1").position, position);
B = dist/100;
[B]


Return to posts index

Dan Ebberts
Re: Expression that links fast blur to Camera position?
on Oct 6, 2016 at 7:34:32 pm

I'd think you might have better luck using the camera's POI, like this:

dist = length(thisComp.layer("Camera 1").transform.pointOfInterest, position);
dist/100;


Dan



Return to posts index

Tara Devlin
Re: Expression that links fast blur to Camera position?
on Oct 6, 2016 at 7:53:41 pm

Thank you, Dan, for such a quick response! I don't think that's doing it for me either, unfortunately. I'm not using POI on my camera.


Return to posts index


Kevin Camp
Re: Expression that links fast blur to Camera position?
on Oct 6, 2016 at 8:33:27 pm

I've used Dan's light fall-off expression (slightly modified) for fake DOF...

decay = .005;
noBlur = 3000;

L = thisComp.layer("Camera 1");

d = length(L.transform.position,transform.position);
if (d < noBlur){
0;
}else{
(d - noBlur)*decay;
}

just change the decay and noBlur values as needed.

Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index

Stefan Zerdzinski
Re: Expression that links fast blur to Camera position?
on May 24, 2018 at 1:46:33 pm

Thank you for this from the distant future (2018). It helped out greatly.


Return to posts index

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