• News
• About

• Industries

• Learning & Support

• Community

• Marketplace

Download

# How to fade from base color to emissive color?

So basically what I’m trying to achieve is when the player looks at a specific object, the object goes from it’s normal base color to it’s highlighted emissive color to indicate it’s been activated. But I want the emissive to fade in slowly and then permanently stay that emissive color. I don’t want it to fade in and out, which is just about the only kind of tutorial I can find, and I can’t seem to figure this out on my own. If someone could lead me in the right direction that’d be greatly appreciated, I feel like this should be relatively simple.

Below is the material before looking at the object:

Below is the material at the end of the fade-in:

Use the second material, add a scalar parameter to it, plug it into your multiply node on the bottom to multiply the green by it. Set the parameter from the blueprint that you use to determine if the object is being activated. Set it to a high value when it is activated, set to zero when deactivated, use interpolation to make it fade gradually.

I can post a picture of my material that does something similar if the picture would be easier to follow( I tend to look at the Blueprint pictures on the tutorials as I can tell whats happening faster like that then reading it )
Steps:
Add a “constant” type and convert it to a parameter by right clicking and selecting “convert to parameter”.
Use a “Lerp” math node with the Albedo/Diffuse texture in slot “A” and the Emissive in slot “B” with the constant we just created in the “Alpha” slot.
(Wait, That is not going to give emissive)

Take 2:
Use two sets of “Constant” parameters to drive the “Lerp” for the Albedo/Diffuse and the Emissive.
You can use one constant parameter to drive both, You would have to subtract the param from a “1.0” constant.
So you would use two lerp nodes: One that fades from the Diffuse to black, And one that goes from black to the emissive colour( you could throw in another constant parameter to control the amount of emissive too).

HTH

Here is what I’ve quickly put together for you.
I used Event Begin Overlap to activate the effect, you can in any way you like, just call E_Activate or E_Deactivate.
Blueprint:

Material:

Wow, thank you so much for the very detailed walkthrough, VRLtqq! I ended up going with your more simplistic first post by adding the scalar parameter to my multiply node. Below is how I ended up getting the fade in when focusing at the object, and fading out when looking away (on blur is looking away from the object).

But strangely, the finish executing pin fires before the timeline actually finishes. So if I look at the object and look away, starting the reverse process, it still executes finish almost immediately. What could be causing this? Or is it a possible glitch?