Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Building manual DOF with blur filters

Guest
Jun 06, 2011 Jun 06, 2011

I know AE CS5.5 has cool new camera blur for the AE cams.  But I'm working in a project that the client wants CS4   So I'm using a 3rd party blur plug-in.

Here's what I've come up. I apply a blur and an expression slider to each 3D layer. I also have 3D null that determines the Camera focus distance. The slider multiplier is there just to give me some manual control if an out of focus layer isn't blurry enough.

Is there a better way to write this?

L = thisComp.layer("Layer1");

O = length( L.toWorld(L.anchorPoint), toWorld([0,0,0]));

C = thisComp.layer("Camera 1").cameraOption.focusDistance;

M = effect("Blur Multiplier")("Slider");

(O + C) * .1 * M

TOPICS
Expressions
906
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 06, 2011 Jun 06, 2011

I think I'd do it this way:

C = thisComp.layer("Camera 1");
v1 = toWorld(anchorPoint) - C.toWorld([0,0,0]);
v2 = C.toWorldVec([0,0,1]);
d = Math.abs(dot(v1,v2) - C.cameraOption.focusDistance);
M = effect("Blur Multiplier")("Slider");
d * .1 * M

Dan

Translate
Community Expert ,
Jun 06, 2011 Jun 06, 2011

I think I'd do it this way:

C = thisComp.layer("Camera 1");
v1 = toWorld(anchorPoint) - C.toWorld([0,0,0]);
v2 = C.toWorldVec([0,0,1]);
d = Math.abs(dot(v1,v2) - C.cameraOption.focusDistance);
M = effect("Blur Multiplier")("Slider");
d * .1 * M

Dan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 10, 2011 Jun 10, 2011
LATEST

Thanks Dan! I like your vector! Without it, mine only works with Z space moves.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines