PDA

View Full Version : Depth of Field



Columbo24
07-04-2015, 06:23 AM
I have an animation set up and I'd like to do some rack focusing on a particular shot. When I use depth of field it makes the out of focus object more pixelated looking than blurry. What setting do I change to get a better render? Any tips on a rack focus shot?
Also I'd like to be able to view my animations in real time. Is there away to do a really low res version so I can see the animation smoothly? I'm usually have to render first and see if it comes out the way I want…and that takes hours and hours for each iteration of the animation. How do you guys view animations in real time?
Thanks
Bill

jeric_synergy
07-04-2015, 12:15 PM
To gain control over depth of field, render layers/objects out separately, and/or use the Z-buffer to define the distance for blurring utilities in a compositor such as AE. Some people don't like that the z-buffer is UN-anti-aliased, IIRC the work around is to use no AA but to render at 2x the resolution (someone more knowledgeable please chime in).

You may of course render low-rez versions, but you also have options like WIREFRAME or QUICKSHADE in full rez, or just manually turning off all bells&whistles. For MOTION only checks many times wireframes are totally adequate. Any of those options will result in a much quicker render.

You may also render every other frame, or every 3rd frame, or whatev.

ernpchan
07-04-2015, 12:20 PM
You could swap out your geometry for low rez versions. That'll help with playback performance.

jeric_synergy
07-04-2015, 12:23 PM
To ernpchan's comment: OP, search for 'proxy' plugins in the plugin database to facilitate proxy/standin swapping.

MonroePoteet
07-04-2015, 03:13 PM
To get smooth DOF natively in LW, use the Camera Properties to 1) turn off Adaptive Sampling, 2) use a soft reconstruction filter, e.g. Mitchell (soft), 3) use PhotoReal motion blur, and 4) crank up the Motion Blur Passes to as many as you can afford rendering time, anywhere from 10 to 50 or more.

Also, for fine-tuning Motion Blur, you might find the Limited Region on the Camera helpful. Use the lower-case "l" to enable it, then drag the yellow corners of the region to an area that you want rendered. You can also drag the region around by its center.

Note that there are three modes to Limited Region: Off (default), Render Region In Place (output is full-frame size with rendered region in the frame), and Render Region Only (output is only the rendered region). So, you have to hit lower-case "l" twice more to turn it off.

mTp

jeric_synergy
07-04-2015, 04:49 PM
The thing about native DOF is, it's stinking slow, and therefore NOT interactive enough.

Whereas, if you go to the bother of rendering layers, the setup time is increased considerably YES, but tweeking the final look takes very little time at all.

Ztreem
07-04-2015, 05:06 PM
I have an animation set up and I'd like to do some rack focusing on a particular shot. When I use depth of field it makes the out of focus object more pixelated looking than blurry. What setting do I change to get a better render? Any tips on a rack focus shot?
Also I'd like to be able to view my animations in real time. Is there away to do a really low res version so I can see the animation smoothly? I'm usually have to render first and see if it comes out the way I want…and that takes hours and hours for each iteration of the animation. How do you guys view animations in real time?
Thanks
Bill

Use the preview option to show the animation in real tine witout rendering and use the opengl dof/motionblur option to show how the dof effect will look like in shaded view.

bazsa73
07-05-2015, 05:39 AM
I always use this expression( thanx to Iain!) in the Graph Editor for the Camera.FocusDistance:

vmag( Camera.wpos(Time)- CAMFOCUS_TG.wpos(Time))

where "Camera" is my camera and "CAMFOCUS_TG" is a Null object

first click on the letter 'E' on the camera panel under DOF tab
then pops up the graph editor, select the expressio tab on bottom right
copy this line into the Value line under Expression tab on the Graph editor, give it any name too (e.g.: AUTOFOCUS)

for the AA I use mitchell, adaptive, min samples 1 - max samples 35
you can test the focus using Opengl, Render tab on the top in Layout, MB Preview on the left, That will make you a quick Ogl preview

Kevbarnes
07-05-2015, 07:56 AM
128824

Here is a scene file I have used for some time now - Load from scene 3 items

Camera_iDof
FSTOP_GUIDE
IDOF-FOCUS

Select camera as normal to translate /rotate
select 'Focus' Lable to translate Z and adjust depth of field to Scene items
Adjust Camera focal length to suite.

Uses same expression as bazsa73 has stated + Depth of Field (Custom Object) display

JoePoe
07-05-2015, 09:06 AM
DOF: in Post is best right??
But if you want to stay in LW..... along with what others have suggested..... you could also consider.....
LOWERING the number of render passes and turning on the DOF Image filter as an effective "booster".

Greenlaw
07-05-2015, 01:26 PM
I don't typically have trouble with using the depth buffer for DOF effects without AA in the buffer, but it really depends on how elements are stacked in the scene. If it's an issue, you could try applying a little blur to the depth channel before using a DOF tool in your compositing program. (Note: That may actually introduce a different problem but it's usually far less noticeable.)

(BTW, if you're using a program like Fusion with auxiliary channels, this is another example of where having a Coverage channel automatically eliminates the AA problem. Unfortunately, LW does not yet support this for export.)

Alternatively, you can setup a fog pass and use that as a 'depth channel' with AA applied. Set your objects in the Scene Editor to have black as your Matte Object color, and set your fog color to white. Disable all lighting and shadow effects in the scene--lighting and shadow effects are unnecessary for this render and any raytracing effects will only slow you down. When the render is finished, you can use it as a mask to simulate adjustable DOF and Fog effects in your compositing program. If you're using Fusion, try DepthBlur or VariBlur with the Luma input option--unlike regular blur tools, Variblur will properly ramp the blur levels based on the gradient values fed into is. You might also set a BC node after the loader so you can adjust the gradient values.

For best results, you should be rendering the above to float space and saving as EXR of course--that will eliminate any banding that might occur with lower bit depths.

If you're using Fusion and you decide to use an embedded depth channel in an EXR, you should use DepthBlur (listed under Deep Pixels). This tools reads the Z buffer directly. (Many Fusion tools can read embedded buffer data directly, assuming you've named the channels properly for Fusion. Otherwise, you will need to enable the channels manually.)

BTW, if the scene I'm working on has a a fairly great distance between elements, I'll often just render those elements in separate passes and cheat the DOF in compositing manually. I feel I have more control this way, plus I don't have to worry about the lack AA in the depth buffer when I break out the elements like that.

Hope this helps.

G.

gerardstrada
07-13-2015, 04:32 AM
Another way to go within LW is by using DP DOF node in DP Node Image Filter. It can be used in conjuction with native LW DOF to improve quality and decrease render times or it can be used alone if focus is not too shalllow. DP DOF can be applied also in DP Node Pixel Filter (a la X-Dof), but it will be applied per each AA pass (which takes more time). Another nice feature about DP DOF is that we can pick any arbitrary image for our diaphragm shape. This feature takes more render time, so smaller the image, better.


http://s21.postimg.org/vs566711z/Pawn_King_cc.jpg

If you want to export a Depth pass for applying post-DOF in a compositing package, and you are getting artifacts because your pretended DOF is too small for the post-filter, you could use a focus pass. This is a trick I devised for AfterEffects' Lens Blur (but it works for any compositing package). Idea is apply the DOF filter to the Depth Buffer before referencing the Depth Buffer in the DOF filter applied to the final render:


http://s12.postimage.org/mq4gtpzml/focustrick.gif

Notice the improvement in the area of the paw and snout where artifacts have gone.

If you are in Nuke or After Effects, you can also apply antialiasing to an aliased Depth pass by using OLMSmoother (http://www.olm.co.jp/opentools/download/?lang=en). In such case we can use the usual Depth buffer got in a single render.

Anyway, hope the focus trick helps someone http://forums.newtek.com/images/icons/icon7.png



Gerardo

Philbert
11-23-2015, 12:22 AM
Sorry to resurrect an old thread but I'm reading through here and looking at this DP DOF Filter. I have the DP Filters installed but I don't know where to find the nodes for it, I'm on LW2015. Can someone point to where i should look for this node editor?

jeric_synergy
11-23-2015, 12:27 AM
Probably in the processing tab of "Effects". The page seems to say they are both Image and Pixel filters, so that's my guess.

Philbert
11-23-2015, 12:30 AM
Tab of Effects where? Maybe it's late and I'm ready for sleep but I don't know of any Effects tab.

jeric_synergy
11-23-2015, 12:32 AM
131161

Philbert
11-23-2015, 12:33 AM
I don't see any node editor there. The pics on the site show a node editor called Image FIlter. I don't know where to find that.

Edit: Oh wait I see. I didn't expect to fine a node editor in the dropdown list. Thanks.

Kevbarnes
11-24-2015, 01:47 PM
I didn't expect to fine a node editor in the dropdown list. Thanks.

Here's a guide - a bit messy but might help

131188

Philbert
11-24-2015, 04:17 PM
Interesting, thanks. I ended up finding the Depth-Of-Field Blur image filter and using that. It looks pretty good I think. I'll keep this in mind though.

lertola2
11-24-2015, 08:14 PM
Here's a guide - a bit messy but might help

131188

Thanks the example. I just put together a scene based on your tutorial and it is working very well. I am working on a project that uses a lot of depth of field so this technique might be a real time saver for me.