# UMG Retainer Effect Material changes Image saturation / washes colors out

**URL:** <https://forums.unrealengine.com/t/umg-retainer-effect-material-changes-image-saturation-washes-colors-out/1295448>\
**Category:** Rendering\
**Tags:** unreal-engine, question\
**Created:** [September 14, 2023, 2:06pm UTC](https://forums.unrealengine.com/t/umg-retainer-effect-material-changes-image-saturation-washes-colors-out/1295448 "2023-09-14T14:06:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![colorofblack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@colorofblack](https://forums.unrealengine.com/u/colorofblack)\
**Post date:** [September 14, 2023, 2:06pm UTC](https://forums.unrealengine.com/t/umg-retainer-effect-material-changes-image-saturation-washes-colors-out/1295448/1 "2023-09-14T14:06:43Z")

</div>

Hi everyone,

I’m currently investigating some things to create an interface for a project.

One of the things I need to achieve is a HUD element that rotates but is masked at the bottom so it fades out.

 ![visualisation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/e/a/0ea37b8045fdddacd4f566846dd7a5d32a6b65d2.png)

Basically the lines rotate but the fadeout needs to stay at the bottom so they vanish.

I found this thread

> [@Transparent UMG Edges](https://forums.unrealengine.com/t/transparent-umg-edges/80190):
>
> Hi there, I’m trying to achieve the transparent effect on my menu: Basically I want the buttons in my menu to mimic this behaviour and become more transparent toward the edges of my scroll box as seen in the first image: How would I go about this? As you can imagine attaching a transparent image over the top of the menu won’t achieve anything and fading to black will make the whole point redundant as well. I’m thinking masks m…

which uses a retainer box containing an image as child with an effect material to get a gradient fade.  
Which is kind of what I want.

Using this setup:

 ![EffectMaterial_TranslucentSetup](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/a/2/3a2bfdef911d66776386814c82198977d64ff43f.png)

I end up with a result that does what I want transparency wise, but the color of my image gets lost. It loses saturation and looks washed out.

 ![UnrealEditor_Pp057burLC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/c/7bcb3b3c8d5bf9191e21495de28fbefddfa9f71a.png)

My input is a png with transparency at this point and a png that’s just black and white for the bottom mask (I also tried a png with transparency for the bottom mask too with no result)

 ![contentMaskBW](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/1/1/9114d13b2c92610341637d8fff93458cc05254b5.png)  
 ![content](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/4/7/8470b376627d74c75c908fbfe4f655fa7f383c9d.png)

After some further digging I found this really old thread

> [@UMG retainer box washing colours out on 3D Widget](https://forums.unrealengine.com/t/umg-retainer-box-washing-colours-out-on-3d-widget/374674):
>
> Hey Guys, So we’re trying to create a visual effect using the new retainer boxes, and it works great. However when you use retainer boxes with UMG elements for 3D world widgets, the colours get oddly washed out. They seem to work fine when added to viewport, but acting strangely in world. We’ve broken it down step by step to make sure we weren’t doing anything odd, and the ONLY difference is the use of the retainer box. Attached is an image explaining the situation, we’ve used as simple materi…

That depicts the same problem. Which to me seems unresolved…

I also tried to set the Blend Mode to AlphaComposite (Premultiplied Alpha)  
This keeps the colors but I get a weird white ghosting where there should be nothing at the bottom,

 ![UnrealEditor_7PEsHQirgO](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/c/f/2cfc50f4ca01503c5ec7c21d5548454d5279949a.png)

Weirdly enough plugging the multiplied alphas into the color output seems to display pretty much the mask I need…so I’m unsure where the ghosting is coming from.

I also tried using \*.EXR with an Alpha Channel, which didn’t work neither.

Any advice on how to fix this, or what the correct setup is (I’m probably just missing one small thing) would be appreciated.

Cheers  
Daniel

---

<div class="post-metadata">

**Author:** ![colorofblack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@colorofblack](https://forums.unrealengine.com/u/colorofblack)\
**Post date:** [September 14, 2023, 7:31pm UTC](https://forums.unrealengine.com/t/umg-retainer-effect-material-changes-image-saturation-washes-colors-out/1295448/2 "2023-09-14T19:31:43Z")

</div>

Here’s another thread with the same issue, also stating that there was a fix implemented which seems to have been removed since then.

> [@UE4.17 Retainer box is washing colors](https://forums.unrealengine.com/t/ue4-17-retainer-box-is-washing-colors/405296/8):
>
> So, for anyone willing to modify their engine code, I dug through the commit of the original fix and found the file/line they changed. Here’s the diff from SRetainerWidget.cpp: You can see they removed the NoGamma option, and set the render target’s gamma to 2.2. Up to the reader if they want to mess with it, there’s some comments talking about gamma space blending issues (presumably why they reverted the fix) so if this causes problems for y’all revert and use the material approach a…

The node setup later in the thread seems to get the colors close to normal. Still an official statement and fix would be appreciated.
