Rendering out a scene depth pass

Hello!
I recently started using UE4 for film production and motion graphics and I’ve come across a few problems.
The worst one is flickering when using gaussian blur on the depth of field. As you can see in the image bellow, the planes have a emissive wireframe texture (which is not the wireframe in the material editor btw, it’s exported from maya) and in some shots UE renders some of the lines weirdly and that with exacerbate with the blur.

So my questions are:
Is there a way to render out a depth pass, so I can make the lens blur in post?
Choosing bokehDOF doesn’t do anything, why?
Is there a way to up the anti-aliasing?
Crank up the anisotropic filtering so the textures (which are 8k btw) don’t look PS1 from an angle?

Any other advice would be awesome!
Thanks a lot!

Here’s a way you can get something to render a depth pass, by using a Post-Process Material and the “SceneDepth” texture. I’ve included an example of a SceneDepth post-process. You may need to adjust the numbers and math to achieve a result that you want, but this should get you started.


2 Likes

You, my friend, are awesome. I’m gonna test this right now :slight_smile:
Thank you so much!

Regarding some of your other questions:

  • I noticed some DXT artifacts on your textures. Considering they are black and white anyway, you’ll get improved texture quality at no extra cost by switching the texture compression setting to grayscale.
  • To get bokeh DOF to work you have to increase the scale value which defaults to 0.0 and is ignored by Guassian DOF.
  • If you don’t care about performance and just want the highest quality you could consider raising the screenpercentage value above 100. This will effectively supersample your scene, which should help with the overall image quality.

Thanks a bunch! Im sorry I didn’t notice your reply earlier! :slight_smile: