Translucent materials with background postprocess distance fade not looking so good.

I’m using a material that’s fading in a colour with distance in a postprocess/blendables. I’ve attached an image to show its setup, I found it online (thank you someone) and it’s worked well so far.

The problem I’m now running into is my effects are seemingly fully fading out when rendered on top of this distance fade material. It’s as if the particle’s Z depth value is way further back than their actual location causing them to render with my full distance fade colour.

The distance fade material is as mentioned a postprocess type material using emissive color only.

The particle materials are of the ‘surface’ material domain and blend mode set to translucent + unlit. They are using emissive color and opacity.

I’ve attached an image showing a particle effect rendered over geo that’s close to the effect, the particle effect is a full circle but here only seen partially.

Switching the particle material to opaque (from translucent) renders fine, but it looks like… unusable, as expected.

Any ideas how to solve this?

Thanks a lot.

Think my attachments were wrongly submitted…



Sorry to bump this thread but I’m rather stuck on this issue. I don’t even have a second, usually less attractive, way to solve this this time…


The limitation you are running into here is that Translucency objects, be they effects or meshes or anything, do not render any depth to the scene. So when you use the scene depth alone, the translucency will pick up the behavior of whatever depth is actually rendered behind them.

I believe you should be able to check the “Separate Translucency” checkbox on your translucent materials to keep them from being affected by the post process. Then you can make a material function that does the coloration actually inside of your translucent materials that does the coloration using ActorPosition or ‘PixelDepth’.

Great, thanks for the help. That checkbox is actually already checked, as it’s the default state. I do however seem to have to add the line ‘bAllowSeparateTranslucency = True’ to make it work. Do you know what file I’d have to add it to? The doc says ‘…also requires bAllowSeparateTranslucency to be set in the .INI files’. It doesn’t say what .INI files however, and since it says ‘files’ and not ‘file’ it sounds like I’d have to add it to multiple files, which is a bit odd.

I’ve tried to add it to my engine.ini files that I can find inside my project dir but they get written each time I load the project so it seems I’m adding it to the wrong files.

Thank you so much for your help!

Maybe this is tougher to solve than I thought… there’s a checkbox in the project settings/Engine/Rendering/Postprocessing/Separate Translucency - should that work just as well as adding the line I mentioned above into whatever .ini file the docs are referring to? If so, I think I’ve tried all combinations of switching it off in the material and in the project settings.

The note that pops up when you hover over the separate translucency checkbox in the material says the same as the doc - refers to the .ini file. No mention of the checkbox in the project settings.

I’m very lost. :frowning:

Update, I think I was wrong about the files updating themselves… my line inside MyGame/Config/DefaultEngine.ini looks like this:

bAllowSeparateTranslucency = True

Still, with it there it doesn’t seem to do much. I’ve restarted UE as well after this change.