# Blur silhouette of mesh with material or post processing??

**URL:** <https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702>\
**Category:** Rendering\
**Tags:** Post-Processing, outline, unreal-engine, blur, Shaders, question\
**Created:** [May 6, 2016, 11:36pm UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702 "2016-05-06T23:36:59Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaronkaminer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aaronkaminer](https://forums.unrealengine.com/u/aaronkaminer)\
**Post date:** [May 6, 2016, 11:36pm UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702/1 "2016-05-06T23:36:59Z")

</div>

I am attempting to create a material or pp material that will effectively blur the silhouette of a mesh. I need to be able to detect edges and then blur inward. I would use this mask as an alpha to blend between postprocessing0 and the mesh render itself.

I know that I can create an outline with a pp material and flag meshes I want to inherit the outline as “render custom depth.” But how would I then blur inwards?

Here is an example:

 ![89710-example.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/9/2/592292a5d04a33f3e0b14e572c430e38acdd08b2.jpeg)

So I need a way to render this mask somehow… either within a material… or a pp material.

 ![89711-mask+.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/6/9767e2e016b667ffc9560cfc6432c255cc701758.jpeg)

I would then use this mask to create a translucency mask that would effectively blur the silhouette.

---

<div class="post-metadata">

**Author:** ![ZoltanE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZoltanE](https://forums.unrealengine.com/u/ZoltanE)\
**Post date:** [May 7, 2016, 8:27am UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702/2 "2016-05-07T08:27:50Z")

</div>

Here is the post process material:

 ![89753-clipboard+image+(17).png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/3/e/b3ed322756690d545bb8ea7be03485bc303bde19.png)

A bit involved but not as expensive as I expected.

---

<div class="post-metadata">

**Author:** ![ZoltanE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZoltanE](https://forums.unrealengine.com/u/ZoltanE)\
**Post date:** [May 7, 2016, 8:28am UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702/3 "2016-05-07T08:28:32Z")

</div>

This is how it looks like:

 ![89754-clipboard+image+(18).png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/6/9/b6919366d42141e43093f78ee07aaa18634054a7.png)

---

<div class="post-metadata">

**Author:** ![aaronkaminer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aaronkaminer](https://forums.unrealengine.com/u/aaronkaminer)\
**Post date:** [May 7, 2016, 9:38am UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702/4 "2016-05-07T09:38:12Z")

</div>

This is fantastic. This is very much so what I was thinking. I will implement this asap. Thank you very much for helping me expedite this! I will let you know how it goes!

---

<div class="post-metadata">

**Author:** ![ZoltanE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZoltanE](https://forums.unrealengine.com/u/ZoltanE)\
**Post date:** [May 8, 2016, 7:15am UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702/5 "2016-05-08T07:15:36Z")

</div>

If you found an answer helpful then please mark it as accepted. 🙂

---

<div class="post-metadata">

**Author:** ![andra\_1996](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@andra\_1996](https://forums.unrealengine.com/u/andra_1996)\
**Post date:** [March 21, 2023, 1:09am UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702/6 "2023-03-21T01:09:17Z")

</div>

i guess the result of the last division on the right must be connected to the emissive color in the PP material right?it doesn’t seem to work in UE5 btw, anyone managed to make it work?

---

<div class="post-metadata">

**Author:** ![kluch\_nik\_off](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kluch_nik_off/32/1058151_2.png) [@kluch\_nik\_off](https://forums.unrealengine.com/u/kluch_nik_off)\
**Post date:** [February 7, 2024, 1:59pm UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702/7 "2024-02-07T13:59:12Z")

</div>

Thanks a lot for your answer, I’m currently having the same issue. Question - this node that you marked as “tweak to match aspect ratio”, is that a constant3vector node? I was following your node structure, and because of this particular nod I’m having errors. Thank you!

---

<div class="post-metadata">

**Author:** ![samuelthomson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@samuelthomson](https://forums.unrealengine.com/u/samuelthomson)\
**Post date:** [March 2, 2024, 12:01am UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702/8 "2024-03-02T00:01:25Z")

</div>

> [@andra\_1996](#):
>
> ht must be connected to the emissive color in the PP material right?it doesn’t seem to work in UE5 btw, anyone ma

Hello, has anyone gotten this to work in UE5?

---

<div class="post-metadata">

**Author:** ![ZoltanE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZoltanE](https://forums.unrealengine.com/u/ZoltanE)\
**Post date:** [March 6, 2024, 10:31am UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702/9 "2024-03-06T10:31:29Z")

</div>

The aspect ratio is a vector 2, on the image it has the value of (1, 1.6). It should be matching the screen aspect ratio to make the blur steps even on both screen axes.

---

<div class="post-metadata">

**Author:** ![ZoltanE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZoltanE](https://forums.unrealengine.com/u/ZoltanE)\
**Post date:** [March 6, 2024, 10:33am UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702/10 "2024-03-06T10:33:21Z")

</div>

The technique should work in UE5. What seems to be the problem?

---

<div class="post-metadata">

**Author:** ![samuelthomson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@samuelthomson](https://forums.unrealengine.com/u/samuelthomson)\
**Post date:** [March 11, 2024, 5:42pm UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702/11 "2024-03-11T17:42:35Z")

</div>

> [@ZoltanE](#):
>
> the image it has the value of (1, 1.6). It should be matching the screen aspect ratio to make the blur steps even on both sc

I managed to get this working in UE5 after I asked the question. I couldn’t get it to work in the Quest3 headset though.

---

<div class="post-metadata">

**Author:** ![ZoltanE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZoltanE](https://forums.unrealengine.com/u/ZoltanE)\
**Post date:** [March 30, 2024, 6:34pm UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702/12 "2024-03-30T18:34:58Z")

</div>

Yeah, standalone headsets are very limited. :\

---

<div class="post-metadata">

**Author:** ![andra\_1996](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@andra\_1996](https://forums.unrealengine.com/u/andra_1996)\
**Post date:** [April 10, 2024, 10:41pm UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702/13 "2024-04-10T22:41:52Z")

</div>

Did you modify something to get it working in UE5?

---

<div class="post-metadata">

**Author:** ![andra\_1996](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@andra\_1996](https://forums.unrealengine.com/u/andra_1996)\
**Post date:** [July 3, 2024, 12:52pm UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702/14 "2024-07-03T12:52:46Z")

</div>

Hi ZoltanE thx for the material!I managed to make it work and it does look awesome indeed. Only problem is that when the PP material is enabled, it has noticeable impact on the whole scene (especially lights). I would expect it to only affect actors with `Render CustomDepth Pass` enabled, did I do something wrong or is this a drawback of this technique?

---

<div class="post-metadata">

**Author:** ![ZoltanE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZoltanE](https://forums.unrealengine.com/u/ZoltanE)\
**Post date:** [September 25, 2024, 10:02am UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702/15 "2024-09-25T10:02:43Z")

</div>

Hm, I’m not sure what could be going on… Could you post a few images to show the issue? Something like a before/after comparison.

---

<div class="post-metadata">

**Author:** ![andra\_1996](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@andra\_1996](https://forums.unrealengine.com/u/andra_1996)\
**Post date:** [December 21, 2024, 4:23pm UTC](https://forums.unrealengine.com/t/blur-silhouette-of-mesh-with-material-or-post-processing/356702/16 "2024-12-21T16:23:08Z")

</div>

I added this node setup connected to the rightmost node of your original setup and it seems to look fine now. It was probably already implied to connect it to something like this, but it took me a while to figure out

 ![Screenshot (865)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/a/5/fa51b635f29fd08fa796d708869a3091762147e6.png)
