Add Depth of Field in After Effects

June 26, 2013


In this tutorial, I will show you how to set up a depth pass for rendering depth of field for 3D objects using Cinema 4D, Frischluft Lens Care and After Effects.


Tutorial Focus:  , ,
Software:  , , ,

  • Nice, the material used in the sky dome, was it something you made?

  • You’ve overwhelmed me with awesomeness. Seeing how seamless Cineware is how beautiful Frischluft is has sold me. Now to scratch together the coin…

  • Cineware is so powerful ! <3 Adobe CC

  • Richie Williamson June 26, 2013 at 5:48 pm

    Thanks so much. I bet you can do some awesome rack focus stuff with that Frischluft filter. I’m giving it a try!

  • Great timing. I JUST bought Frischluft Lenscare to render DoF for my Five Second Daft Punk entry I tried using the built-in Camera Blur in AE, and although it “kinda” worked, it wasn’t great. I downloaded the demo for Lenscare and within 30 seconds of testing it out I was so blown away, I bought it immediately (from tool at a discount). I tried rendering my scene using DoF in C4D Physical Renderer but forget about hitting any deadline unless you are rendering across multiple computers. It was taking FOREVER.

    FYI Nick, I learned another trick for depth pass. Just add a null object way off in the distance and drop it into the camera FOCUS OBJECT under the camera OBJECT tab and instead of dragging DOF Map Rear Blur on the camera, just check DOF Map Front Blur only and slide the END until the plane hits the camera lens in the DETAILS tab. Works flawlessly with Frischluft and also with multiple cameras using the CAMERA MORPH tag as long as each camera has the focal plane set individually.

    I know your tutorial was to focus (no pun) on Cineware more than depth pass, but the timing was great because I was just about to record a tutorial on the same subject. You saved me from having to now! Cheers.

    • (The point of using a null object as a focus object is you can animate the null to point at different objects in the scene and the depth map changes automatically. Sorry I meant to mention that in the first post)

  • Depth of field in post has always been a bit of a nuisance for me. I’ve yet to come across a solution for the rough edges that occurs when performing this method on scenes where there’s more of a disparity between foreground and background objects.

    I’ve searched far and wide and have yet to hear of a solution. I thought Cineware would eliminate this rough edge problem because it works directly with your scene file but even it gives you the rough edges at times.

    • I agree with Chris – Ive almost accepted that there is no good way to get DOF with C4D without waiting a crazy long time for Physical Renderer to do it. Anytime I have used Frusc DOF – I wanted to scream because all my edges look so horrible. Never have found a solution for this.

      • Disable antialiasing and your edges will look nice.

      • If render times is not an issue, or you insist on keeping antialiasing ON, then your settings should be very high.
        MIN LEVEL –> 4X4
        MAX LEVEL –>4X4
        Consider Multi-Passes –>ON

        • Marwan is right, you should never use antialiasing on a depth pass because frischluft or every other dof solution will not understand the values on those edges. also frischluft reads white as near so you have to check “invert matte”. would be interesting to know if cineware can give you an aliased pass.

        • Everyone always says simply disable antialiasing as the magic answer but no one ever shows an example of it working. Ive tried enabling and disabling antialiasing, even inverting the depth matte and still no success.

          I would LOVE to see a video example of someone with a scene where there’s a great distance between the foreground and background object, and using post depth of field successfully. Like a statue sitting in a middle of a room, with a wall in the far back.

          The only successful examples I see are ones like Nick’s where there’s an angled view of an object resting low on a surface which gives you a nice gradual gradient of depth always.

  • I’d like to see a tutorial how to add motion blur, while using Cineware. I succeeded with RSMB vectors, but it works only, for motion that’s made in C4D. It doesn’t count camera movement made in AE.

  • Hi Nick,

    Great stuff you got going on bud congrats-

    But does this plugins for the DOF work if we would to animate the camera? I guessing it would.

    • It does. All values in the plugin are keyframeable in AE so you can fake rack focus or change the amount of blur over time. It just uses the grayscale value of the depth map to apply the blur to that value of the image.

  • Hello Mr. Nick How can we make Cinema 4d work faster like yours mine is a lag either it wont respond or it wont show objects.

  • Hey…Nick
    I want to ask that what version of after effect you used in this tutorials…

  • And I don’t have cineware how to get it..??

  • Pelle / LogicDutch June 27, 2013 at 4:14 am

    Great video Nick, I always find it quite hard to get the perfect depth of field .
    Thanks man !

  • Hi,
    Tried to build this scene myself but the reflection of the sky sphere doesn’t show up in aftereffects cc, tried to put in global illumination but also that won’t show up? anyone have the same problem ?

    • Ah. I had that problem too, but I was able to fix it. First off, make sure that you have a separate file with your project in it. In the file, create another file and name it “tex”. (Don’t ask why… I don’t know.) Take a copy of each image you used and paste it in the “tex” file. Then, go in C4D and open the materials using the images you just moved. Clear the picture from the material (click on the little arrow next to the picture name and hit ‘clear texture’) and load it again from the “tex” folder. Save your Cinema file, and reload it into AE. Next, under CINEWARE, change the view to ‘final render’, like Nick does in the Tutorial. Then… it SHOULD work.

  • I love you tutorial very much,and i want to know how i can export cinema 4d to 3d max with the baked texture.hope i can get the great new.thank you very much?

  • Why HDRI Studio Pack Don’t working in Cineware?

    • Hi,

      HDRI Studio Pack is not compatible with Cineware yet. We are working on it though. Light Kit Pro and Texture Kit Pro are working.

  • It’s funny how after effects became the 3D guy’s photoshop

  • Hi all!,

    Has anyone else had problems with cineaware and GI?. I have been testing AE CC with cineware (and cinema 4D R14, not little) and it doesn’t work with GI but I think it should works with it.

    THanks and regards!

    • I’ve been testing Cineware with GI (C4D R13) and doesn’t work.
      And yes it should works.
      It’s quiet impossible to find some info about it

    • Yea, me too – GI not showing up with cineware… really frustrating since the Maxon site says “Totally real: reflections, refractions, global illumination”…. Even Maxon sales reps on the phone say “yea yea it supports GI, as long as you have broadcast and above versions”. Well guess what, GI is most certainly not working with cineware.

      If anyone knows how to get this to work, please enlighten us!

      • I can confirm global illumination is not working with chinaware.

        Sweep nurbs along path
        Luminance texture applied with 200% brightness
        Create cube behind nurbs object
        Render in C4d with expected results
        Import into AE
        Set to Standard (Final)
        Sweep nurbs renders with no GI on cube

        Would love to find a fix for this

        • Jared Travnicek March 6, 2014 at 4:35 pm

          Same here. I’m on r15 with CC and I can’t get the GI to work in Cineware. I was hoping to make this a part of my pipeline, but I don’t think it is realistic if I can’t get the GI to work. If anyone finds a solution to this, we would love to hear it!

  • Prince augustine August 15, 2013 at 2:37 pm

    Hi guys i dont really know c4D and i will really love to lean.

  • Nice tip, nice timing.

  • Hey Nick,

    not sure if you’ve mentioned this before but if you’re using Cineware in AE do you just use it to preview your C4D file in an AE comp before you go ahead and render it in C4D to then reimport it back into AE, or do render everything straight from AE? Phew!


  • I found out this only works with C4D cameras, and not AE Comp Cameras. So if you have multiple camera setups, you’ll have to use the “Select CINEMA 4D Camera” and “Set Camera” functions in the Cineware plug-in to get your depth pass to work correctly on the different cameras instead of extracting the scene data.

  • You guys are awesome, thank you for amazing tutorials of cinema 4d!!

  • Hi Nick, love all your tutorials man very detail and easy to understand. This is very helpful i’ve had problem with this dof thing and this tut solve it all, thank you.
    I’d like to learn how to set up that environment: the chrome ball, the paper, and the surrounding scene. Can you please post a tutorial on that too.

  • Hi…
    can you please help me to render Morph Camera and depth pass !
    The depth pass doesn’t work

    Thank you

  • Hi! Nick.
    I have a question about Depth map.

    we need to set focus distance
    and start and end distance of front, rear blur on cameras
    to create a depth map.

    But, This is bothering me
    to set some settings every time I need Depth map.

    So, here is my question.

    Is there anyway to create a depth map
    not on focus basis
    but based on the nearest and the furthest point on a screen
    without setting the distance values?

    This depth map should have
    the pure white point on the nearest
    and the pure black on the furthest.


  • Great… Just great….

    But what with animation ?

    Render Tiff sequence in C4d without depth pass.
    Then import c4d file into AE, add Depth map with plugin.

    Or can you take the depth pass and apply it on my tiff sequence?
    Oh boy, kinda lost here….

    How does this works?

  • Ok i’m superstupid.
    Just apply the Frischluft plugin onto the tiff sequence, and choose depth pass 😉

  • Love this so much. I really like this work around to save lots of time especially.

  • Alvaro Letelier April 7, 2016 at 5:18 am

    Finally I use CINEWARE ! Great tut !

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.