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?
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.
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.