View Full Version : ZDepthDOF problem ...

12 December 2006, 01:10 PM
Hey, I did some searching and got a chance to check out/install ZDepthDOF....which from what I can tell looks really helpful. The only problem is, when I rendered out an image of the shot to see how it was looking...and it wasn't working too well. I thought I was entering the settings right but I'm not sure now. Basically the shot is of a swing set with multiple chains hanging down (4). Obviously I want the chain group closest to the camera to be in focus and everything else fade out of focus. I measured the distance between the cam and closest group of chains (roughly around 15 units) and then did the far end...which was around 52 or so. I set white to represent the in-focused sections and black to represent the far and near out of focus regions. The far and near distances are to match the camera's (with a near clipping plane of 0.01 and a far clipping plane of 5000). So i set the focus distance = 15 and the focus range to 10...and basically I get a rendered image depicting the whole swing set being in sign of a gradient or an out of focus regions. Please help me figure out what is going on....this is for my student film hehe (thanks!)


12 December 2006, 11:34 AM
I'd try a couple of things.
If the far away chains are 52 units away, a far-clip on the camera of 5000 may be excessive. Try setting the far-distance of zDepthDOF to 60.
Also, you didnt mention the fStop that you have set. For a noticeable DOF effect start with it low (5.6 or less).

I usually create distance nodes that I connect to the near, far and focus inputs to zDepthDOF. That way I can easily set the required numbers by placing the locators in the scene, which I usually animate (either manually or by constraining focus to my hero object).

12 December 2006, 05:28 PM was the clipping plane that was the problem. Thanks a lot for your help!

P.S. One quick add-on question...not exactly the same type but....

What exactly is the process for using the gray scale image to create the DOF effect in a program like After Effects? I've used zdepth and rla in AE once before to extract depth information and create the DOF effect but never have have worked off of an existing image. Thanks again

12 December 2006, 12:00 PM
In aftereffects you can use the compound-blur filter to achieve a DOF like effect. The filter blurs more or less depending on the grey-scale image that you specify. Its like a grescale controlled gaussian blur.

A better filter set is the lensecare filters by frishluft. They simulate a lens blur effect much better and have more options for dealing with how the greyscale is interpreted. Highlight blooming and bokeh effects are handled as well.

I have also tried the tinderbox filter and some others, but for me the frishluft is the best.

CGTalk Moderation
12 December 2006, 12:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.