Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Recreating D.O.F.

  • Posted by Sébastien Périer on March 11, 2008 at 9:32 pm

    Hi everyone,

    i’ve been searching a way to use the “DOF” data from a camera to apply a special effect on my comp, the intensity of the effect depending of the DOF value of each elements position (and with no blur).

    And, in the same kind of idea, i’m looking for a way to analyse a nested comp (checking layer visibilty, checking it’s position relative to the camera)in order to recreate a grayscale version of it depending on it’s distance from the camera. (thus a layer would become a plain white / gray of a ramp from gray/black to gray/white) while preserving the pixels opacity value (so if a forground layer have transparency spots, to be able to get the grayscale value of the layer behind it).

    I don’t know if i’m really clear, but, if you can think of a way to expression this kind of stuff, be my guest, as my research have yet failed to give any significant results.

    Thanks !

    Darby Edelen replied 18 years, 2 months ago 3 Members · 6 Replies
  • 6 Replies
  • Sébastien Périer

    March 11, 2008 at 10:01 pm

    I forgot to say that this Grayscale version of a nested comp should be used as an matte for an adjustement layer.

  • Lloyd Alvarez

    March 11, 2008 at 10:11 pm

    Buena Depth Cue does this. I think DigiEffects sells this plugin now. It was not a very elegant solution as you need to “bake” your scene so anytime you make a change you need to rebake it. What really needs to happen is AE needs to open the API to allow third party plugins to drive the built-in camera DOF blur.

    -Lloyd

    https://aescripts.com

  • Darby Edelen

    March 11, 2008 at 10:17 pm

    [Sébastien Périer] “i’ve been searching a way to use the “DOF” data from a camera to apply a special effect on my comp, the intensity of the effect depending of the DOF value of each elements position (and with no blur).

    And, in the same kind of idea, i’m looking for a way to analyse a nested comp (checking layer visibilty, checking it’s position relative to the camera)in order to recreate a grayscale version of it depending on it’s distance from the camera. (thus a layer would become a plain white / gray of a ramp from gray/black to gray/white) while preserving the pixels opacity value (so if a forground layer have transparency spots, to be able to get the grayscale value of the layer behind it).

    When you say “‘DOF’ data” are you referring to the focal plane inside of AE?

    As for your second idea, it’s not possible to create image data directly using expressions (you would have to do it via an effect such as write-on). You can, however, create two instances of a pre-comp, one of which has Fill effects applied to every layer that respond to their distance from a camera, this could get complicated quickly though.

    What exactly are you trying to do?

    Darby Edelen
    Designer
    Left Coast Digital
    Santa Cruz, CA

  • Sébastien Périer

    March 11, 2008 at 10:27 pm

    What exactly are you trying to do?

    I’m trying to recreate a “personnal” DOF to be able to appy effets on it. To be more precise, for a project i’m working on, i would like to use another way to illustrate DOF than blur, but for that i have to create my self the DOF “data” (the focal) so after that, i can apply my “custom” DOF effet.

  • Sébastien Périer

    March 11, 2008 at 10:30 pm

    Thanks for the plug-in tips, i’ll dig into that.

    Maybe a Third Party Camera plug-in could also be a good thing, as for exemple, if i do a backward movement with a camera while zooming in (to create that weird background deformation), AE cams seems to distort nothing.

  • Darby Edelen

    March 11, 2008 at 11:35 pm

    [Sébastien Périer] “Maybe a Third Party Camera plug-in could also be a good thing, as for exemple, if i do a backward movement with a camera while zooming in (to create that weird background deformation), AE cams seems to distort nothing.”

    There is no lens distortion when using an AE camera (although you can add it using the Distort > Optics Compensation effect), but the effect you’re describing above is actually due to the way lenses of differing focal lengths record the scene, and this can be done in AE.

    When you adjust the zoom property you are effectively changing the ‘focal length’ of the ‘lens’ on the virtual camera. If you have a camera set at [360,240, -900] with a zoom value of 900 and you animate the position to [360,240, -1500] and the zoom to 1500 you should definitely notice a difference in 3D layers that are placed at different distances from the camera.

    Darby Edelen
    Designer
    Left Coast Digital
    Santa Cruz, CA

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