# Gaussian DoF on translucent material

**URL:** <https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943>\
**Category:** Rendering\
**Tags:** Post-Processing, translucent, DOF, unreal-engine, question\
**Created:** [December 18, 2014, 2:25pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943 "2014-12-18T14:25:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![thobias\_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thobias\_2](https://forums.unrealengine.com/u/thobias_2)\
**Post date:** [December 18, 2014, 2:25pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/1 "2014-12-18T14:25:27Z")

</div>

I have 2D scene with a lot of translucent material layers. When I apply gaussian DoF in post-process, it affect only non-translucent materials? Is it possible to use blur on translucent material? Thanks.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [December 19, 2014, 7:50pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/2 "2014-12-19T19:50:42Z")

</div>

Hello thobias,

I did some reading up on the Documentation page and found this little snippet of information that deals directly with the issue you are experiencing. The option ‘Separate Translucency’ within your material properties under the ‘Translucency’ section should resolve your issue.

**Separate Translucency**

- This indicates that the Material should be rendered in the Separate Translucency Pass( This mean that this will not be affected by DOF and also requires bAllowSeparateTranslucency to be set in the .INI files).

By default this option is checked on when creating a Translucent Material. Simply uncheck the box for this option and you should be able to see the effects of DoF applied to the objects in your scene.

**TLM Surface with Separate Translucency Disabled**

 ![24523-translucentdof.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/9/e/09e7c49346a8af3027fdefba1fc7cee11d4439ba.png)

**Translucency Material Properties**

![24524-seperatetranslucency.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/f/e5fa2e1b89f7865183a732b7e628284876a2a0b4.png)

Here is the Documentation page if you are interested in reading into Translucent Material Properties a bit more.

> **[Material Properties](https://docs.unrealengine.com/5.1/en-US/unreal-engine-material-properties/)**
>
> An introductory document on Material Properties in Unreal Engine.

Let me know if this resolved your issue or if you need further assistance!

Cheers,

---

<div class="post-metadata">

**Author:** ![thobias\_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thobias\_2](https://forums.unrealengine.com/u/thobias_2)\
**Post date:** [January 15, 2015, 12:51pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/3 "2015-01-15T12:51:25Z")

</div>

That setting is unfortunately in TranslucentLitSpriteMaterial grayed out:

 ![26760-transmat.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/b/e/dbefec514ba76d2b5df8de6d9ae9e6515a125945.jpeg)

---

<div class="post-metadata">

**Author:** ![thobias\_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thobias\_2](https://forums.unrealengine.com/u/thobias_2)\
**Post date:** [January 15, 2015, 1:38pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/4 "2015-01-15T13:38:07Z")

</div>

Ok, so when I changed blend mode on “translucent”, DoF post-process applied on all objects but, it blurs whole scene globally. DoF layers not show any layers. Just gray space. So front objects have same amount of blurriness as objects in distance.

My scene si full of 2D layers with TranslucentLitSpriteMaterial placed in 3D space.

---

<div class="post-metadata">

**Author:** ![HSbF6](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hsbf6/32/582146_2.png) [@HSbF6](https://forums.unrealengine.com/u/HSbF6)\
**Post date:** [January 15, 2015, 1:43pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/5 "2015-01-15T13:43:39Z")

</div>

hey man,  
you need to go into your scene camera’s properties and set up the DoF properties.  
which area is supposed to be in focus/out of focus, overall blur amount etc etc 🙂

---

<div class="post-metadata">

**Author:** ![thobias\_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thobias\_2](https://forums.unrealengine.com/u/thobias_2)\
**Post date:** [January 15, 2015, 1:54pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/6 "2015-01-15T13:54:39Z")

</div>

I know, but as I said… It blurs everything, no matter what combination I’m trying set in DoF.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [January 15, 2015, 5:47pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/7 "2015-01-15T17:47:58Z")

</div>

You need to re-check ‘Separate Translucency’ to have it effected by the DoF

---

<div class="post-metadata">

**Author:** ![thobias\_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thobias\_2](https://forums.unrealengine.com/u/thobias_2)\
**Post date:** [January 16, 2015, 3:50pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/8 "2015-01-16T15:50:20Z")

</div>

There is what I have now. Like there is missing info about position in space…

[http://i.minus.com/iKc9feNlF46oY.PNG](http://i.minus.com/iKc9feNlF46oY.PNG)

[http://i.minus.com/iktB3zNNxvRCI.PNG](http://i.minus.com/iktB3zNNxvRCI.PNG)

Anyone know how to get it right? Or any other way how to get material blurry?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [January 16, 2015, 4:16pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/9 "2015-01-16T16:16:17Z")

</div>

Maybe have a read over the DoF Documentation because it goes over how to implement this feature correctly within your scene. There are two types of DoF used within the Engine and each can yield different results.

**DoF Documentation**

> **[Depth of Field](https://docs.unrealengine.com/5.1/en-US/depth-of-field-in-unreal-engine/)**
>
> Using in-editor tools to simulate the distance between near and far objects to blur parts, not in focus.

Try changing this to Bokeh instead of Gaussian, then edit the ‘Distances’ and ‘Regions’ until you get the right result.

Thanks,

---

<div class="post-metadata">

**Author:** ![thobias\_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thobias\_2](https://forums.unrealengine.com/u/thobias_2)\
**Post date:** [January 16, 2015, 4:46pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/10 "2015-01-16T16:46:29Z")

</div>

I doesn’t matter what values of DoF I try change. It allways blur everything. It’s like global post-process.

Also when I uncheck Separate Translucency, particles are rendering over translucent materials (but DoF is “working”, but globally). I’m really confused about what I’m doing wrong.

I need that DoF so badly. Is there other options how make sprite blurry?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [January 16, 2015, 6:18pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/11 "2015-01-16T18:18:47Z")

</div>

As of now you cannot specifically assign a Sprite to have it’s own Depth of Field. I guess I am misunderstanding what you are trying to do now. You can try to send the bounding box of your ‘Post Process’ strictly around the area which you want to blur and change it to ‘Bound’ instead of "Unbound.’

Are you attempting to blur the background cityscape image?

If so, you can just take the image and blur it in a Photo editing application.

---

<div class="post-metadata">

**Author:** ![thobias\_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thobias\_2](https://forums.unrealengine.com/u/thobias_2)\
**Post date:** [January 19, 2015, 10:57am UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/12 "2015-01-19T10:57:20Z")

</div>

Ok, I’ll try show it on screenshots… Basically I put basic cubes in my scene that is full of materials with translucency. DoF setting about region is applied only on cubes, not translucent materials.

[http://i.minus.com/ibbYF6e6K7ZO01.PNG](http://i.minus.com/ibbYF6e6K7ZO01.PNG)  
[http://i.minus.com/iL9KNq7DFpnyT.PNG](http://i.minus.com/iL9KNq7DFpnyT.PNG)  
[http://i.minus.com/ibjqC3al88Vwkk.PNG](http://i.minus.com/ibjqC3al88Vwkk.PNG)  
[http://i.minus.com/iNsSM67IUdKpS.PNG](http://i.minus.com/iNsSM67IUdKpS.PNG)  
[http://i.minus.com/izZCMw6JruO7B.PNG](http://i.minus.com/izZCMw6JruO7B.PNG)

So as I said… It looks like there is something wrong in that translucent material (or missing information about position in space). Some hidden check?  
Thanks.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [January 19, 2015, 2:37pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/13 "2015-01-19T14:37:13Z")

</div>

Hey thobias,

I need to understand what you are exactly trying to do. You say ‘full of materials with translucency. DoF setting about region is applied only on cubes, not translucent materials.’

If you could just show me a material that you are attempting to have affected by DoF, and its properties that would be helpful.

I also noticed you are simply changing the focal distance and the focal region from one screen shot to the next. In order to get a precise DoF you need to also pay attention to the Scale, Near, Far, and Max Bokeh, settings to get the desired results.

I do understand this is just an example, but when it comes to Depth of Field, because it deals with blurring things at a particular distance, you need to make sure those distances are correct.

Thank you,

---

<div class="post-metadata">

**Author:** ![thobias\_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thobias\_2](https://forums.unrealengine.com/u/thobias_2)\
**Post date:** [January 19, 2015, 3:45pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/14 "2015-01-19T15:45:07Z")

</div>

I put default boxes next to layers with translucency (same distance), also I tried change all setting of DoF quite a long time, but still same issue, result:

No DoF - [http://i.minus.com/iWYJOquzJl6ya.PNG](http://i.minus.com/iWYJOquzJl6ya.PNG)  
Variants of DoF - [http://i.minus.com/ilFSZErZcfmh8.PNG](http://i.minus.com/ilFSZErZcfmh8.PNG) , [http://i.minus.com/ibguBkMdfm8JSm.PNG](http://i.minus.com/ibguBkMdfm8JSm.PNG)  
Also variant of DoF, but strange is, that straight transition showed at back (screenshot with described used materials) - [http://i.minus.com/ibcT2iDfkgK1Uz.png](http://i.minus.com/ibcT2iDfkgK1Uz.png)

translucentlitspritematerial details:  
[http://i.minus.com/iC1BDDnhjBMHJ.PNG](http://i.minus.com/iC1BDDnhjBMHJ.PNG)  
[http://i.minus.com/iKTIIO9s8pTcf.PNG](http://i.minus.com/iKTIIO9s8pTcf.PNG)

Thanks for your time! It’s really important for me.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [January 19, 2015, 4:18pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/15 "2015-01-19T16:18:45Z")

</div>

Ok, I think I have found the possible solution.

Do me a favor and turn off your Material Overrides so I can be sure the suggested solution is the correct one.

After you have turned off your material overrides, go into your materials ‘Translucency’ section and change the ‘Translucency Lighting Mode’ to ‘TLM Surface.’

**Translucency Settings**

![27178-tlm+surface.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/d/1/1d1d2d608a607dc858046eb92041c05c45db2ffa.png)

I cannot believe I overlooked this setting, but it is usually one of my first suggestions.

Let me know what happens.

Cheers,

---

<div class="post-metadata">

**Author:** ![thobias\_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thobias\_2](https://forums.unrealengine.com/u/thobias_2)\
**Post date:** [January 19, 2015, 4:54pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/16 "2015-01-19T16:54:07Z")

</div>

Unfortunately still the same. Only boxes are affected by DoF region settings…

[http://i.minus.com/ifB7j1T5PUl6d.png](http://i.minus.com/ifB7j1T5PUl6d.png)  
[http://i.minus.com/iYYHHKEDbiDnf.png](http://i.minus.com/iYYHHKEDbiDnf.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [January 19, 2015, 5:06pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/17 "2015-01-19T17:06:46Z")

</div>

Make sure you have your project settings correct as well.

**Project Settings**

 ![27192-projectsettings.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/7/0/77034c4ee20e50eed35b7de1d2ffb44afab80c71.png)

---

<div class="post-metadata">

**Author:** ![thobias\_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thobias\_2](https://forums.unrealengine.com/u/thobias_2)\
**Post date:** [January 19, 2015, 5:36pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/18 "2015-01-19T17:36:35Z")

</div>

I had Custom Depth Pass on Enabled, after switch to Enabled on Demand, DoF still affect just boxes, no translucent materials. But my FPS rapidly increase.

I tried put box behind translucent object and DoF start working, but… In a wrong way. Region is changed upright to camera.  
From right - [http://i.minus.com/iZRkaTIAF3pQ9.png](http://i.minus.com/iZRkaTIAF3pQ9.png)  
To left - [http://i.minus.com/il45fzleeuHgr.png](http://i.minus.com/il45fzleeuHgr.png)  
Without box behind - [http://i.minus.com/ibd7hIbYL7xWMB.png](http://i.minus.com/ibd7hIbYL7xWMB.png)

---

<div class="post-metadata">

**Author:** ![thobias\_2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thobias\_2](https://forums.unrealengine.com/u/thobias_2)\
**Post date:** [January 20, 2015, 9:05am UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/19 "2015-01-20T09:05:33Z")

</div>

It looks like this is kind of my problem too - [http://www.polycount.com/forum/showthread.php?t=89667](http://www.polycount.com/forum/showthread.php?t=89667)

Partial solution is to double every layers with translucenc lit material and put them right behind and change their material to for example maksedlitspritematerial. DoF region works but still there are some glitches and borders from alpha are not smooth. Pre-blur textures in PS is unfortunately not solution for me.

If DoF is not compatible with translucent materials, is there any way, how apply/animate/put blur effect on texture directly in UE4?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [January 20, 2015, 2:32pm UTC](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943/20 "2015-01-20T14:32:10Z")

</div>

DoF is compatible with Translucent Materials. At this point, I have given you all of the information I can provide to you about Translucent Materials and DoF. It is now just on how you are setting up your materials and your scene to get it to function how you would like.

Setting up a custom depth and rendering this in a different pass and you could be able to fake the effect you are trying to achieve.

**Material Expression Reference**

> **[Material Expressions Reference](https://docs.unrealengine.com/5.1/en-US/unreal-engine-material-expressions-reference/)**
>
> Reference for all Material expressions available for use in the Material Editor.

**DoF**

> **[Depth of Field](https://docs.unrealengine.com/5.1/en-US/depth-of-field-in-unreal-engine/)**
>
> Using in-editor tools to simulate the distance between near and far objects to blur parts, not in focus.

**Post Process Materials**

> **[Post Process Materials](https://docs.unrealengine.com/5.1/en-US/post-process-materials-in-unreal-engine/)**
>
> How to author and blend custom Post Process passes with the Material Editor.

Here is most, if not all the documentation you will need to get started with setting up a custom depth within a post process material.

Cheers,

[Next page](https://forums.unrealengine.com/t/gaussian-dof-on-translucent-material/301943.md?page=2)
