# Actor-selective post process bypass

**URL:** <https://forums.unrealengine.com/t/actor-selective-post-process-bypass/442863>\
**Category:** Rendering\
**Tags:** Depth-Of-Field, Post-Processing, stencil, custom-depth, unreal-engine, question\
**Created:** [February 6, 2019, 9:22pm UTC](https://forums.unrealengine.com/t/actor-selective-post-process-bypass/442863 "2019-02-06T21:22:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_03000d7e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_03000d7e](https://forums.unrealengine.com/u/anonymous_user_03000d7e)\
**Post date:** [February 6, 2019, 9:22pm UTC](https://forums.unrealengine.com/t/actor-selective-post-process-bypass/442863/1 "2019-02-06T21:22:39Z")

</div>

Hi,

I made a character with an embedded dynamic cinematic depth of field; it works with a simple line trace that determines the focus changing the post process parameters of the camera. The dynamic dof work well, but I’d like that the character’s mesh wouldn’t be affected by the dof. Some ideas?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![Bariudol](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bariudol](https://forums.unrealengine.com/u/Bariudol)\
**Post date:** [February 7, 2019, 3:21pm UTC](https://forums.unrealengine.com/t/actor-selective-post-process-bypass/442863/2 "2019-02-07T15:21:09Z")

</div>

You might want to take a look at custom depth:

> **[Custom Depth in Unreal Engine 4](https://www.tomlooman.com/the-many-uses-of-custom-depth-in-unreal-4/)**
>
> Unreal Engine 4 introduced a new depth buffer along with their PBR rendering system. It’s called “Custom Depth” and can be used for effects like the selection outline that is built-in the Editor, rendering of...

Basically what you can do with this is mask the character in your post process and use that mask to display the DOF. You will need to build a Post Process material to achieve that.

> **[Post Process Materials](https://docs.unrealengine.com/4.27/en-US/RenderingAndGraphics/PostProcessEffects/PostProcessMaterials/)**
>
> How to author and blend custom Post Process passes with the Material Editor.

While i don’t have the time to make an example material for you to do this the principle is very simple:  
.Get the scene without DOF  
.Get the scene with DOF  
.Use the custom depth to lerp between the two.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_03000d7e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_03000d7e](https://forums.unrealengine.com/u/anonymous_user_03000d7e)\
**Post date:** [February 7, 2019, 4:02pm UTC](https://forums.unrealengine.com/t/actor-selective-post-process-bypass/442863/3 "2019-02-07T16:02:23Z")

</div>

Since the dof is made modifing the camera post process parameters in the character blueprint, how can I i get the scene with dof in a post process material?
