How to temporary change the material color/ transparency/ type of material?

Hi Everyone! Assume there are 100 static meshes in the level and 100 material instances. Is there any way to temporarily change the material color/ transparency/ type of material, and maybe after a second, the material can switch back to the original one?

I searched timeline, dynamic material, and set material, but it seemed that it didn’t work.

Thanks!

You can do this with dynamic material instances.
once you have the DMI you can set parameters on it: vector, scalar, texture by name of the parameter that is in the original material. Then assign the DMI to the needed model.
On cancellation just revert to the original material, it should remain unaffected by the dynamic changes.

Thanks for your reply. I made a dynamic material and set it to the static meshes component by using set material. So, the first half works.
I can’t find the on cancellation in the blueprint. The cancel that I found is for async action. Could you please provide extra help?

If you are replacing a material with a dynamic instance then you need to either revert the parameter that you changed (keep copy of param val before change and replace after)

You can also just keep a reference to the original material and set it after a set time (dmi doesn’t alter original material)

I am not familiar with a node that can revert the action, but I think the timeline node can do a similar action, am I right?

I created the blueprint. My concept is that for the scalar one, I can observe the transparency change from 0 to 100 over time. For vector one, I expect the color will change and back to the original value. However, it doesn’t work.

I added breakpoint to the timeline and set scalar or set vector parameter value on materials, the flow does flow through, but it doesn’t show it in play mode.