Jump to content

Depth of Field problem

Recommended Posts

Hi , I have problem about edge of model when use After effect camera lens blur or other plugin. I test plugin with gradient , the result seem right but when depth that come out from c4d will got problem.


When I render from c4d I use focus in front of object and rear blur behind object.




This one is result that use depth from c4d




This one is test by using gradient


png file that I attach is resource.




Link to post

hmm, not sure what's up on your end, but I got it to work with the 2 images you provided.  See my comp and screen shot of effect settings, see if something looks different to you.

Screen Shot 2018-05-25 at 7.39.05 AM.png

Screen Shot 2018-05-25 at 7.39.09 AM.png

Link to post

First thing is the depth map needs to be inverted, usually white is closest and black is furthest away.


Second, you're still going to get bad fringing with AE's lens blur, I haven't been able to find a way around it and I think it's just a poor filter. I've used the Frischluft Lenscare plugin which gets better results if you can get your hands on a copy.


Here's a video which compares the two:


Overall though, I've noticed using a lens blur effect on scenes that have a lot of occluding/overlapping objects like your example will never get the best results, I think there just isn't a plugin that will correctly mask and blur the edges between high contrast distance objects.


To get best results for a scene with a lot of overlapping elements and high distance contrast I would suggest doing it at render time if you have the resources.

Link to post

Echoing Ninjad's assessment of Lens Blur, it is a hotmess.  If you really need it, go ahead and use it.  Another downfall of it, it is a single core effect.  This means your entire comp will only render w 1 core of your computer, regardless of how many cores you have.  Even if this effect is applied to 10 frames of a 1000 frame render, all 1000 frame will only render w 1 core.


If you can spare the extra money, invest in Frischluft's Lenscare plugin.  It does a GREAT job of applying DoF.  This plugin does a very convincing job of blurring edges of high contrast/large distance objects.


But yes, to get truly accurate blurring, you'd need to apply it in 3d at render time.  Unfortunately, this limits the flexibility in post.  There's always a tradeoff.

Link to post

You need to render your cubes with no background and an alpha channel. What's happening is that AE is blurring your black background, which sucks the neighboring pixels of your cube into the background - causing that unnatural halo from all the cubes - even the ones that are supposed to be in-focus. The filter simply isn't smart enough to exclude foreground pixels from blurring into your background pixels.


Below, I keyed out the black background of your render (and the white background of the blur map) to approximate what this would look like if it had been rendered with alpha. This still has errors in it where the cubes overlap, but it is much closer to a blur performed at render.


Blurring in post is fairly easy as long as you are able to split your scene into layers. For example, if I have a character in focus and the background is 100% blurred, I absolutely render them separately and blur in post. I do the same thing if I have an out-of-focus foreground object.


If a character is in-focus and the background needs true depth blurring, I render the character layer without DoF and the background layer with DoF - just to save on render time (especially if the character needs other effects, like motion blur).



Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...