PDA

View Full Version : Workflow for post processed Depth of Field and Motion Blur?



Mr. Wilde
06-10-2012, 10:02 AM
Hi,

(how) is it possible to achieve both depth of field and motion blur in post processing? It seems to me that you can creater either one or the other, but not both combined?

Even though LW 11 has sped up render times significantly, getting smooth blur on depth of field and motion takes still a lot of time.

Thanks in advance,
Rob

souzou
06-10-2012, 03:04 PM
It's not perfect but (in After Effects) ReelSmart Motion Blur plus Frichsluft Lenscare for the DOF (using a depth pass) generally does the job for us.

Mr. Wilde
06-10-2012, 03:17 PM
How do you use the depth and the motion vector passes? Once motion blur is applied, the depth pass is incorrect.

souzou
06-10-2012, 07:23 PM
How do you use the depth and the motion vector passes? Once motion blur is applied, the depth pass is incorrect.

Precomping. Beauty pass with depth and then a separately saved motion vector pass (as Celshader describes here: http://64.62.198.35/showthread.php?t=127783&page=2). The beauty pass goes in a precomp with lenscare using the DOF from the depth pass. Then RSMB is applied to the precomp taking the motion vector info from the motion vector pass (though sometimes you can just fudge it with RSMB without bothering with the motion vectors and depending on the shot it'll look ok). That or lots of separate render passes for objects for more control.

It's not perfect but it's the best method I've found so far. Hoping someone might chime in with something better :D

Very very basic example attached.

gerardstrada
06-11-2012, 06:08 AM
Yep. First DOF, then mBlur.

http://s17.postimage.org/6b38cpwjj/DOFm_Blur.gif

If you are in Fusion there was a Motion Depth Blur plugin, I think, for applying both effects with the same filter. Guess it performed the same operation internally and automatically (first DOF, nesting, then mBlur).

For RSMB, this:
http://lightwiki.net/wiki/Multipass_Rendering_with_Filter_Node_Editors#Motio n_Vectors_for_RSMB_.28Update.29
is an additional way to get the motion buffer.



Gerardo

Mr. Wilde
06-11-2012, 12:18 PM
Thanks a lot, that's very helpful! :thumbsup:

tcoursey
06-12-2012, 10:12 AM
So I have not tried the new Composite Buffer Exporter, but just did. The Depth Map doesn't have any gray it's just black and white, foreground and background.

Am I doing something wrong? I tried the older PSD export that has Depth Map option and I get the same thing. My scene is one large object that has many layers in different Depths.

Thoughts?

tcoursey
06-13-2012, 07:57 AM
ok, I was able to now get a nice gradient over my main subject matter. It was that my scene is VERY large in scale. I had to go into the Compositing Buffer Export and "limit" Z Buffer Depth to a range that I was happy with.

My subject matter is a football field, with the surrounding city in several google maps layers. So I had a very large "scene" but only about 500 yards of subject matter.

Thanks for the help! Now I can play with some post processing DOF.

tcoursey
06-13-2012, 08:07 AM
So what is the word on getting a Z-Buffer with some AA? Plugin, Exporter...seems that is quite a missing piece for doing post processing. I have some detail objects that without AA the rods of a fence don't even show up in the ZBuffer map.

tcoursey
06-13-2012, 08:31 AM
one more thing I'm running into. in LW my Depth image now has a nice gradient black to white (within a distance I have chosen [ depth ]). But when I save in ANY format (Full Precision or other) I get a WHITE image.

What am I missing? If I just did a screen grab the pixels are colored in a bit depth my monitor can handle?

Thanks.

Mr. Wilde
06-13-2012, 09:16 AM
Precomping. Beauty pass with depth and then a separately saved motion vector pass (as Celshader describes here: http://64.62.198.35/showthread.php?t=127783&page=2). The beauty pass goes in a precomp with lenscare using the DOF from the depth pass. Then RSMB is applied to the precomp taking the motion vector info from the motion vector pass (though sometimes you can just fudge it with RSMB without bothering with the motion vectors and depending on the shot it'll look ok). That or lots of separate render passes for objects for more control.

It's not perfect but it's the best method I've found so far. Hoping someone might chime in with something better :D

Very very basic example attached.

Just for clarification, do I apply DOF blur to the motion vector pass, too?

souzou
06-13-2012, 09:52 AM
Just for clarification, do I apply DOF blur to the motion vector pass, too?

If you're using AE, no. The DOF has already been applied to the beauty pass layer within the precomp. You may find you also have to precomp the depth pass for it to be used properly. So in my example my comp is setup like this:

COMP
-> Motion Vector pass
-> Precomp_beauty +RSMB
___|-> Beauty pass +Lenscare or other DOF effect
___|-> Precomp_depth
______ |-> Depth pass

Hope that makes sense!

tcoursey
06-13-2012, 09:54 AM
just found the check box under Render Globals, AA Depth Buffer! :thumbsup:

Scazzino
06-13-2012, 10:09 AM
One thing I do to speed up render time is use a combination of real and post DOF together. I'll set the in-camera DOF to a minimal amount and use an AA level that works best for the bulk of the image but still leaves the DOF a little grainy. I'll also export a depth buffer. Then I use the depth buffer in post to further blur the DOF areas some more to smooth them out and also to push the DOF a bit further if necessary. :thumbsup:

tcoursey
06-13-2012, 10:12 AM
ok, I'm not finding a good way to get the Depth pass AA. What am I missing. Is this one of those checkboxes that was in a very early version but not kept up with new cameras, exporters etc.?

Using Perspective Camera, Adpative Sampleing, Compositing Buffer Exporter. Thanks for any thoughts.

Cageman
06-13-2012, 01:45 PM
Alternatively render a scene where everything is set to a black matte object and use a white backdrop with a fog setting to your liking (or invert the colors). Some prefer this, because they can render with AA, however, an AA'd depth butter is technically wrong... still, whatever works.

True!

That said... We've noticed that if you set your Camera to use the Classic Reconstruction Filter and Sampling Pattern to either Classic or Fixed, AA to 1 without any Adaptive Sampling, you get a fogbased depthpass that mimicks the Depth-buffer non-AA edges.

If you have any other Reconstruction Filter, it will actually apply some sort of AA on edges.

:)

Cageman
06-13-2012, 01:47 PM
ok, I'm not finding a good way to get the Depth pass AA. What am I missing. Is this one of those checkboxes that was in a very early version but not kept up with new cameras, exporters etc.?

Using Perspective Camera, Adpative Sampleing, Compositing Buffer Exporter. Thanks for any thoughts.

As Oliver mentioned; AAed Depth isn't "correct", even though it might work.

If you need to have such a pass, look in the quote I did from Oliver in my previous post.

:)

gerardstrada
06-13-2012, 05:33 PM
tcoursey, depth buffer indicates the relative distance of items from the camera. The further away an item is, the brighter will be represented. Then, if object scale is too high or objects are too far away, the farthest pixels of geometry will be very very bright and we'll not only get a very contrasted buffer but also if there's an empty background - which is like an infinite distance - the averaged pixels by AA will be too bright for displays and we'll always get aliasing - even if Depth Buffer AA is enabled.

To solve it, we can place a transparent card at the farthest geometry point or use the useful db&w Depth Limiter pixel filter from db&w Tools (http://www.db-w.com/products/dbwtools/docs).

For saving an image adjusted in the Image Viewer, use the Save Exposed option, but as a rule of thumb, it's better always save the image in a FP format and adjust the W/B point in the compositing package.

Scazzino, :agree: The combination of real and post DOF together offers better results. Same thing commonly happens with mBlur. Btw, other way to solve the DOF effect in post-processing is with DP DOF filter (http://dpont.pagesperso-orange.fr/plugins/nodes/DP_Filter.html#DOF).

http://s14.postimage.org/778ofv93j/DPDOF.gif



Gerardo

tcoursey
06-14-2012, 08:08 AM
Is there a way to set everything to "black matte" object without duplicating all of my assets?

tcoursey
06-14-2012, 08:29 AM
perfect, I had not used that feature before. Now I have instances in the scene and those don't like being Matte.....hmm.

Oh well.

gerardstrada
06-14-2012, 05:19 PM
If you want set up a depth pass globally, you can use a Distance to Camera gradient (linear ramp) in DP Filter Node Editors as explained here:

http://lightwiki.net/wiki/Multipass_Rendering_with_Filter_Node_Editors#RGB_D epth_Pass

Seems it works with LW11 instances, too.



Gerardo