# How to Fade In decal on trigger?

**URL:** <https://forums.unrealengine.com/t/how-to-fade-in-decal-on-trigger/347317>\
**Category:** Rendering\
**Tags:** unreal-engine, fade, Decals, question\
**Created:** [February 13, 2016, 7:36am UTC](https://forums.unrealengine.com/t/how-to-fade-in-decal-on-trigger/347317 "2016-02-13T07:36:43Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rbacch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rbacch](https://forums.unrealengine.com/u/Rbacch)\
**Post date:** [February 13, 2016, 7:36am UTC](https://forums.unrealengine.com/t/how-to-fade-in-decal-on-trigger/347317/1 "2016-02-13T07:36:43Z")

</div>

Hi, I’m making a horror game where the player triggers a sequence of events, but I can’t make some decals fade in.

 ![78417-image1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/f/2/7f22c5f5b38adb8d5c7b63d7df1bb8128a88af78.jpeg)

And here’s the material. The opacity has to be linked to the texture or else I get a black background.

 ![78418-image2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/b/7bb34fa208fd6f533ee0d971b8d3bf2eeea3c26a.png)

Anyone who posts the anwser gets a cookie. =)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_776011b61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_776011b61](https://forums.unrealengine.com/u/anonymous_user_776011b61)\
**Post date:** [February 13, 2016, 9:58am UTC](https://forums.unrealengine.com/t/how-to-fade-in-decal-on-trigger/347317/2 "2016-02-13T09:58:20Z")

</div>

Hi

Can you post your coding for fading the decals in?

---

<div class="post-metadata">

**Author:** ![Rbacch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rbacch](https://forums.unrealengine.com/u/Rbacch)\
**Post date:** [February 13, 2016, 4:40pm UTC](https://forums.unrealengine.com/t/how-to-fade-in-decal-on-trigger/347317/3 "2016-02-13T16:40:59Z")

</div>

Actually I’m waiting for someone to anwser it too.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08a61ba](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08a61ba](https://forums.unrealengine.com/u/anonymous_user_a08a61ba)\
**Post date:** [February 13, 2016, 7:16pm UTC](https://forums.unrealengine.com/t/how-to-fade-in-decal-on-trigger/347317/4 "2016-02-13T19:16:26Z")

</div>

In your material, multiply the opacity by a scalar parameter “Opacity”

Then, in blueprint, when the player enters your trigger :

1. Get your decal actor
2. Get its material
3. “Create Dynamic Material Instance” based on this material
4. Put this new dynamic material on your decal with “Set Decal Material”
5. Create a timeline that interpolates a float from 1 to 0 in X seconds (to your liking)
6. At every update of the timeline : “Set Scalar Parameter Value” on the dynamic material : with the parameter “Opacity” and use the current float value from the timeline

Can’t wait for that cookie 🙂

---

<div class="post-metadata">

**Author:** ![Rbacch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rbacch](https://forums.unrealengine.com/u/Rbacch)\
**Post date:** [February 13, 2016, 10:13pm UTC](https://forums.unrealengine.com/t/how-to-fade-in-decal-on-trigger/347317/5 "2016-02-13T22:13:04Z")

</div>

Thanks for the fast reply, Violaine. =)

I got your idea and it seems to work like a charm. I’m just having a problem at the blueprint part. If you could help me would be great.

The Opacity for the texture is working just like I want.

 ![78511-image2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/0/c/10cc03ff51564a5efba17233a69e6f0752b690a4.jpeg)

Since i’m a newbie at blueprints, I don’t know where goes what. I managed to create a timeline with 2 seconds delay from 0 to 1 (for the Opacity parameter), but I can’t update the value. I can’t even change the Parameter Name.

 ![78512-image.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/2/c/52c93b1573b9860d51a491403aa2bfb92578d068.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08a61ba](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08a61ba](https://forums.unrealengine.com/u/anonymous_user_a08a61ba)\
**Post date:** [February 13, 2016, 11:33pm UTC](https://forums.unrealengine.com/t/how-to-fade-in-decal-on-trigger/347317/6 "2016-02-13T23:33:07Z")

</div>

Oh yeah, that node. The thing is : there are two “Set scalar parameter value” nodes available. One is for Parameter Collections (the one you got) and one is for Dynamic Materials. See how the node wants a collection asset? It’s the wrong one for your needs. That happens often to me too, since they have the same name.

I suggest that you drag out the blue pin from the “Create Dynamic Material Instance” and then type to find the “Set Scalar Parameter Value” node. Since the blue pin is a dynamic material, the context sensitive search will only show the right “Set Scalar Parameter Value” node.

That aside, you also have to connect the output of the “Create Dynamic Material Instance” node (your newly created material) to the “New Decal Material” input of the “Set Decal Material”. Then you also need to connect your decal actor to Target of that “Set Decal Material”. That way the new material will be put on the decal actor.

You’re almost there!

PS: As a general rule, dragging the pin of the element you want to act on really helps to find what you can do with it. Keeping the context sensitive activated and typing to find what you want to do. It will only show nodes that work with that element. Moreover, like in the case of that Set Scalar Parameter, sometimes nodes don’t show up if you don’t have the target element dragged out. You can turn off Context Sensitive in that case to see ALL nodes ever and then figure out what the node requires.

---

<div class="post-metadata">

**Author:** ![Rbacch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rbacch](https://forums.unrealengine.com/u/Rbacch)\
**Post date:** [February 14, 2016, 1:46am UTC](https://forums.unrealengine.com/t/how-to-fade-in-decal-on-trigger/347317/7 "2016-02-14T01:46:02Z")

</div>

Ahh, thanks for the heads up about the “duo” Set scalar parameter value. Would’ve never guessed about that.

I have one last problem: My target of Set Scalar Parameter Value seems to only link with Return Value from Create Dynamic Material Instance, but it keeps returning an error on log. Do I have to create another Create Dynamic Material Instance after the Set Scalar Parameter Value?

 ![78531-imaggd.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/7/6/6763cfadd75ce7dec69605fc146c267bc7751741.png)

 ![78532-imshd.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/0/9/7093d5f52847ec275a10050b1f4aee7c023c8595.png)

Btw, appreciate the patience =)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08a61ba](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08a61ba](https://forums.unrealengine.com/u/anonymous_user_a08a61ba)\
**Post date:** [February 14, 2016, 2:54am UTC](https://forums.unrealengine.com/t/how-to-fade-in-decal-on-trigger/347317/8 "2016-02-14T02:54:23Z")

</div>

It didn’t occur to me that there is also a few different “Create Dynamic Material Instance” nodes. I swear it’s pretty confusing. In your set-up you can simply plug your material (from the decal) in the “Parent” input instead of the "World Context " and it should work! Honestly, I don’t know what this "World Context " is for, and why the material is automatically put there instead of “Parent”. This node takes a parent material and makes a dynamic one based on it. Right now there’s no parent material defined so it doesn’t output anything.

If you want to get a cleaner code, you can use the other “Create Dynamic Material Instance” node. It looks like this :

![](https://d3kjluh73b9h9o.cloudfront.net/original/3X/c/c/cc1b0fe20ae0714d942069f43c99f3c4c7a50617.png)

This one sets the material on the actor in the same node, so you wouldn’t need the “Set Material node”

---

<div class="post-metadata">

**Author:** ![Rbacch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rbacch](https://forums.unrealengine.com/u/Rbacch)\
**Post date:** [February 14, 2016, 3:33am UTC](https://forums.unrealengine.com/t/how-to-fade-in-decal-on-trigger/347317/9 "2016-02-14T03:33:37Z")

</div>

Haha, it worked! I don’t know how to thank you enough, but you deserves all the cookies of the world. =) This blueprint system can be quite helpful, but very stressful at the same . Thanks again for the amazing help.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a08a61ba](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a08a61ba](https://forums.unrealengine.com/u/anonymous_user_a08a61ba)\
**Post date:** [February 14, 2016, 3:34am UTC](https://forums.unrealengine.com/t/how-to-fade-in-decal-on-trigger/347317/10 "2016-02-14T03:34:47Z")

</div>

No problem, it was my pleasure 🙂

---

<div class="post-metadata">

**Author:** ![TheFlyingEpergne](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/theflyingepergne/32/945825_2.png) [@TheFlyingEpergne](https://forums.unrealengine.com/u/TheFlyingEpergne)\
**Post date:** [June 13, 2024, 5:16pm UTC](https://forums.unrealengine.com/t/how-to-fade-in-decal-on-trigger/347317/11 "2024-06-13T17:16:52Z")

</div>

Sorry to bump an old thread but I found this when googling how to fade out decals.

You can just hook up the [`Decal Lifetime Opacity`](https://prnt.sc/tniYByJ0Jj1O) node into the opacity, then use the decal actor’s class settings to adjust it - these can all be referenced and set in the event graph. Way easier than using timelines imo!

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/4/4/944feb205e30f2e0c546af94a174f038c5bed886.png)

---

<div class="post-metadata">

**Author:** ![Zero-G-Racer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zero-g-racer/32/620655_2.png) [@Zero-G-Racer](https://forums.unrealengine.com/u/Zero-G-Racer)\
**Post date:** [August 14, 2024, 5:47pm UTC](https://forums.unrealengine.com/t/how-to-fade-in-decal-on-trigger/347317/12 "2024-08-14T17:47:01Z")

</div>

works fine  
thx
