Making an object flash white to convey an invincibility frame

Hello everyone,

I’m looking to reproduce a visual effect which makes an object flash solid white for a few frames before returning it back to normal. It’s popular effect famously used in arcade style games to visually communicate that something has just been hit and has been damaged. A similar effect is often also used to indicate when a player has (re)spawned into the level and has a few seconds of invincibility. My quick attempt to find an example gif on google image search has come up empty, but I hope that the above description is sufficient to convey what I’m referring to.

Anyway, I’m looking for a little bit of guidance as I’m not so familiar with the material editor in UE4 (that is to say, I’ve spent a lot of time in it, but I still don’t know what I’m doing most of the time). Any help is much appreciated.

Thanks for your time,

Ben

I know it’s not exactly what you asked for, but you could just make the mesh go visible and invisible quickly and repeatedly on a timer:

15021-set-visibility.png

Yeah, that’s what I’ve been using thus far as a low effort workaround. It does the job, but it’s not really the effect I’m after any more.

Still, thanks for the help.

Hey zerofiftyone -

You can build the flashing into an opacity mask which is controlled by a scalar parameter in a blueprint. What does you character’s material look like and I can give you more specifics.

Thank You

Eric Ketchum

Here is a screenshot of the pawn’s main material:

The material is used for the base colour of the player pawn. In blueprint, a material instance is made and configured to change the base colour ending up with something

Thanks for your time.

Hey you go zerofiftyone -

Your material should be set to Masked and the Opacity Mask Clip Value should be set to 0.5 and depending on your character you probably will also want to set to Two Sided.

Material:

The Effect Running:

15241-transitionrunning.gif

Thank You

Eric Ketchum