Gradient mask inverting colour

What I’m trying to do is have the glowing parts of the character, which I’ve already got, be masked out from top to bottom as the player uses their fire spells. Below you can see the glow effect when full. What this results in however is as the mask gets darker, the yellow glow starts inverting making it glow a dark blue whereas what I want is for it to disappear entirely.

What I tried first was getting a linear gradient and using material instances ■■■ negative numbers between 0 and -1 to make the black of the gradient lower. AddValue in the screenshot below is the number changed by the character blueprint, with -0.2 being added each time the fireball is shot. Is there a fix to the technique I’m using now? Or am I barking up the wrong tree and should be using another method entirely?

Could you send me your material and tell me to which values you change the scalar parameters? You can send it to contact@roelbartstra.com with the subject [UNREAL 4 GRADIENT MASK SHADER]

Unfortunately my PSU died today, so I can’t send you it now. I’ve ordered a new one that’ll arrive on the 31st so I’ll send it then. Thanks for the reply anyhow :slight_smile:

Hi The Scanner Darkly -

If I am understanding what you want to do correctly, I would use an IF node to control the transition as follows:

I was using the Table Masking Texture from the editor for this sample your mask should be much cleaner than mine.

Thank You

Eric Ketchum