Smooth material transition

I’m using an animated TriggerBox to change materials on objects that it overlaps with.

Here’s a demo clip. Something went wrong with either the capture or the encoding, but the pause in the video doesn’t exist in the Unreal Engine project:

So I’m mostly happy with the material change, but I’d like the change to be smooth instead of sudden.

I’ve been trying to achieve this using Timelines, but haven’t found any success yet.

If there’s a better, more efficient way to do the whole setup, I’m completely open to that.
Any help would be much appreciated. Thank you.

Blueprint of the material change:

you can use a dynamic material instance for this. so drag off static mesh component ‘create dynamic material instance’. in your material that you’r applying, create a parameter called emissionAmount (or anything you want) that drives emission. back in your blueprint, from the dynamic material instance output pin, select set float parameter, then type in ‘emissionAmount’ for the name. for the float value, drag out a lerp. A=1 B= however bright you want it. for the alpha, you create a timeline and create an alpha float value that goes from 0 to 1 over any time frame.

here’s a link with more info:
Material Instance Dynamic

hopefully this wasn’t too confusing.

Thank you for your reply. I implemented a similar setup using a Color Track in the Timeline and Set Vector Parameter. It works fine.

However, in my setup in the previous post, I cannot use the same setup. It does not work.

Here’s my blueprint with the Timeline:

The problem I’m facing is with the Timeline. Since there are many objects, I need individual timelines for each one of them, or else, the loop triggers the same timeline, causing several issues.

I can’t find a way to instance timelines, or create timelines on the fly.

So I found a solution to this and it involved a different approach. This thread was the inspiration:

Rather than using a Timeline to trigger the material transition, I use a distance-based falloff. It works beautifully and gives me better and more intuitive control over the falloff range.

Also, the TriggerBox is not required any more, since I’m not using any overlap events. Any object can be used as the trigger, because all we need is the distance between the source and target objects.

Here’s the blueprint:

And here’s a demo video of it in action. I made the trigger box visible. It is animated using Matinee.