# Transparent Material based on distance?

**URL:** <https://forums.unrealengine.com/t/transparent-material-based-on-distance/367462>\
**Category:** Rendering\
**Tags:** unreal-engine, transparency, Shaders, question\
**Created:** [August 18, 2016, 6:14am UTC](https://forums.unrealengine.com/t/transparent-material-based-on-distance/367462 "2016-08-18T06:14:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_c18cfcdf1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c18cfcdf1](https://forums.unrealengine.com/u/anonymous_user_c18cfcdf1)\
**Post date:** [August 18, 2016, 6:14am UTC](https://forums.unrealengine.com/t/transparent-material-based-on-distance/367462/1 "2016-08-18T06:14:35Z")

</div>

I’ve been looking around for an answer but I haven’t found anything close. Does anyone know how to create a material that is opacity is based on distance? Example: If I were to look through it, distant objects would be blurry but closer objects would be more clear to see. Here is what I am trying to recreate.

 ![103326-14055570_10210270215777607_239126403_n.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/a/c0ac786cde41430abeb3665138d7ead0a60ad6b9.jpeg)

---

<div class="post-metadata">

**Author:** ![Roel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Roel](https://forums.unrealengine.com/u/Roel)\
**Post date:** [August 18, 2016, 11:14am UTC](https://forums.unrealengine.com/t/transparent-material-based-on-distance/367462/2 "2016-08-18T11:14:42Z")

</div>

You can use the DepthFade node in a material and hook it up to opacity.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c18cfcdf1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c18cfcdf1](https://forums.unrealengine.com/u/anonymous_user_c18cfcdf1)\
**Post date:** [August 18, 2016, 5:45pm UTC](https://forums.unrealengine.com/t/transparent-material-based-on-distance/367462/3 "2016-08-18T17:45:55Z")

</div>

I used DepthFade but its not exactly the result I’m trying to achieve. I’m trying to give it a blurry distortion as well but still give this a rubber like appearance.

Like this:

  
What I have so far:  
[http://i.jenhuffa.com/XMvLFMo.png](http://i.jenhuffa.com/XMvLFMo.png)

---

<div class="post-metadata">

**Author:** ![Roel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Roel](https://forums.unrealengine.com/u/Roel)\
**Post date:** [September 3, 2016, 12:52pm UTC](https://forums.unrealengine.com/t/transparent-material-based-on-distance/367462/4 "2016-09-03T12:52:20Z")

</div>

Ahh, sry. There is a node for that. It’s called spiral blur:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...
