Gaussian DoF on translucent material

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.

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

Translucency Material Properties

24524-seperatetranslucency.png

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

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

Cheers,

That setting is unfortunately in TranslucentLitSpriteMaterial grayed out:

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 :slight_smile:

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.

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

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

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/iktB3zNNxvRCI.PNG

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

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

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

Thanks,

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?

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.

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/iL9KNq7DFpnyT.PNG
http://i.minus.com/ibjqC3al88Vwkk.PNG
http://i.minus.com/iNsSM67IUdKpS.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.

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,

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
Variants of DoF - http://i.minus.com/ilFSZErZcfmh8.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

translucentlitspritematerial details:
http://i.minus.com/iC1BDDnhjBMHJ.PNG
http://i.minus.com/iKTIIO9s8pTcf.PNG

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

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

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

Let me know what happens.

Cheers,

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

http://i.minus.com/ifB7j1T5PUl6d.png
http://i.minus.com/iYYHHKEDbiDnf.png

Make sure you have your project settings correct as well.

Project Settings

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
To left - http://i.minus.com/il45fzleeuHgr.png
Without box behind - http://i.minus.com/ibd7hIbYL7xWMB.png

It looks like this is kind of my problem too - 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?

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

DoF

Post Process Materials

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,