Making whole character (with multiple materials) "blink" (emissive material) when hit.

I’m making a 3D platformer and I want the player character to blink in a yellow emissive material when he is damaged (showing he is immune for a short period after being damaged). Think Crash Bandicoot with the invincibility mask.
I know how to create a blinking emissive material, but I want the whole character to blink, and the character has multiple materials.
I could create a set up in each of the materials with parameters controling the intensity and frequency of the emission and in the character BP control those parameters in each and every material - but that seems a bit inefficient. Is there a way to change to another material and then back to the default materials, or something of the sort?

What would be a good approach for this? Would welcome any suggestions.

Would welcome any suggestions.

It’s ham-fisted but you should be able to flip materials like so:

Image from Gyazo

The glowy material could be more nuanced, I admit.

1 Like

And it’s easy to scale up - from now on it’s a matter of adding more to the Original Mats array.

Awesome! Thank you very much

I’m having an issue: when I try to set it to all my character’s materials, the whole character gets the checkerboard material.
But if I set it to just a few materials it works. I was able to pin down two materials that if I try to set to the emissive material will get a checkerboard material instead. All other materials work, but those two get the checkerboard. And what is weird is that if I try to set one of those two materials at the same time as the other materials, all of them will get the checkerboard.
So those two materials not only do not get set to the right material, but they prevent the others from getting set to the right material.

Any chances we could have a look at it? Sounds a bit as if the material was not compiled / incompatible.

I was able to pin down two materials
that if I try to set to the emissive
material will get a checkerboard
material instead.

Perhaps there are parts of the character that are not a skeletal mesh and the glow material is enforcing it? Hard to imagine how things are set up.

My character has 15 different materials assigned to different parts. In this exemple I assigned the new emissive material (through blueprints) to a bunch of them (ignore the boots, I didn’t assign to them in this exemple but they work too);

Now in the next image I have used the exact same set up and added the upper body material to also be set with the emissive material, and this happens:

If I try to set to only the upper body, it gets the same checkerboard material. Only 3 materials have this problem (the upper body material, the skin material and the inside of the mouth).