Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Blur and Camera Distance

  • Blur and Camera Distance

    Posted by Sebastian Martinez on January 17, 2011 at 12:58 pm

    Dear all!

    I noticed that the blurs – like on drop shadows or fast blurs – are not behaving like shadows in real nature.

    In AEs 3D space a blured shadow e.g. is different when the camera is close or far away. Close to the camera it looks harder, with increasing distance it’s getting more and more blury.

    So here is my question:

    What’s better?

    – Precomping the layer with the Blur-Effect. What works well.

    Or

    – Using an Expression for the Blur-Value using the layers distance to the camera – IF THERE IS ANY!
    Somehow like this one:

    // Blur from Distance to Camera
    dist = length(thisComp.layer(“Camera01”).position, position);
    B = dist/10;
    [B]

    Respects
    Sebastian

    Sebastian Martinez

    Sebastian Martinez replied 12 years, 4 months ago 3 Members · 2 Replies
  • 2 Replies
  • Eve Weinberg

    January 15, 2014 at 8:54 pm

    This expression is really cool, but it only works is regards to the foreground. I would love for my objects to start in focus, and as they falls back in Z-space, away from camera, they get more blurry.

    Can you help?

    applied to fast blur:
    // Blur from Distance to Camera
    dist = length(thisComp.layer("Camera_1_Shape1").position/12, position/2);
    B = dist/10;
    [B]

  • Sebastian Martinez

    January 16, 2014 at 11:06 am

    it is not much editing just a bit of math:

    the ‘-100’ value in the second to last line makes the difference: in my try it lowers the blur amount under ‘0’ (minus x), thus there are no negative values possible is just becomes ‘0’ and your object stays sharp.

    if you move the cam away the blur raises over ‘0’ and your object starts to blur.

    ‘-100’ was good in my setup. have a try…

    i’m not precluding a better method.

    repects,
    sebastian

    // Blur from Distance to Camera
    dist = length(thisComp.layer("Camera_1_Shape1").position/12, position/2);
    B = (dist/20) - 100;
    [B]

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy