# Lerp / blend nodes with material functions don't work

**URL:** <https://forums.unrealengine.com/t/lerp-blend-nodes-with-material-functions-dont-work/465354>\
**Category:** Rendering\
**Tags:** bug, lerp, unreal-engine, blend, question\
**Created:** [May 17, 2020, 6:02pm UTC](https://forums.unrealengine.com/t/lerp-blend-nodes-with-material-functions-dont-work/465354 "2020-05-17T18:02:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zbluu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zbluu](https://forums.unrealengine.com/u/Zbluu)\
**Post date:** [May 17, 2020, 6:02pm UTC](https://forums.unrealengine.com/t/lerp-blend-nodes-with-material-functions-dont-work/465354/1 "2020-05-17T18:02:41Z")

</div>

The lerp and blend nodes are broken when used with material functions. When alpha equals to 1, the node returns the input “A” instead of the input “B”.

**1 - Steps to Reproduce**

In a new project (4.25 ONLY), create a two material function that return two different color (ex: one for red and one for green). Drag and drop these 2 material functions in a new material. Attach a lerp node (ex: green on “A”, red on “B”) and set the “Alpha” to 1.

**2 - Results**

With an alpha equals to 1, the lerp node returns the color of the material function connected to the input “A”.

**3 - Expected**

With an alpha equals to 1, the lerp node should return the color of the material function connected to the input “B”.

See this image with preview nodes :

 ![302150-bug.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/4/d/14d26148d76eee93af385d2f05d46584cd95d5f6.jpeg)

As you can see, the result at the top is green isteand of red.

---

<div class="post-metadata">

**Author:** ![Zbluu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zbluu](https://forums.unrealengine.com/u/Zbluu)\
**Post date:** [May 19, 2020, 10:34pm UTC](https://forums.unrealengine.com/t/lerp-blend-nodes-with-material-functions-dont-work/465354/2 "2020-05-19T22:34:18Z")

</div>

It seems bugged on the new 4.25 version, so I made a bug report.  
Use constant instead of parameter as workaround in the meanwhile.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0addb2ec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0addb2ec](https://forums.unrealengine.com/u/anonymous_user_0addb2ec)\
**Post date:** [June 29, 2020, 4:16am UTC](https://forums.unrealengine.com/t/lerp-blend-nodes-with-material-functions-dont-work/465354/3 "2020-06-29T04:16:34Z")

</div>

![305672-annotation-2020-06-29-120441.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/1/c/a1c7dbbc6e1252fd0eaaa070b033a7a5de3721c9.png)

In 4.25.1 not working on color nodes!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0addb2ec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0addb2ec](https://forums.unrealengine.com/u/anonymous_user_0addb2ec)\
**Post date:** [June 29, 2020, 8:28am UTC](https://forums.unrealengine.com/t/lerp-blend-nodes-with-material-functions-dont-work/465354/4 "2020-06-29T08:28:15Z")

</div>

ok, I found what I did wrong: I forgot changing the parameter name! They were all called baseColor, so the Blueprint system used the first value. The second blue node was an illusion, it was never used! Pretty dumb, I’m new to Blueprint 🙂

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 29, 2020, 8:44am UTC](https://forums.unrealengine.com/t/lerp-blend-nodes-with-material-functions-dont-work/465354/5 "2020-06-29T08:44:56Z")

</div>

This is working fine and always has, OP forgot to switch on Live Update; or does not know about it:

 ![305673-annotation-2020-06-29-094255.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/4/ea4bf3d0682e7185eaea90a5e7b3c5fc5917569a.jpeg)

 ![305674-annotation-2020-06-29-094320.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/9/7/c97eea269b0d06443d56bd499b8707a04017f637.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0addb2ec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0addb2ec](https://forums.unrealengine.com/u/anonymous_user_0addb2ec)\
**Post date:** [June 29, 2020, 8:53am UTC](https://forums.unrealengine.com/t/lerp-blend-nodes-with-material-functions-dont-work/465354/6 "2020-06-29T08:53:06Z")

</div>

I copy/paste the color node without changing the name, thus BP system takes them as one variable and never uses the other node. Therefore, Lerp 2 inputs are actually the same value. That’s my problem.  
Thanks anyway.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [June 29, 2020, 9:03am UTC](https://forums.unrealengine.com/t/lerp-blend-nodes-with-material-functions-dont-work/465354/7 "2020-06-29T09:03:22Z")

</div>

I was responding to Zbluu, really. But I get what you’re saying about copy/paste. Been there / done that 🙂

---

<div class="post-metadata">

**Author:** ![Oye\_Orange](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oye\_Orange](https://forums.unrealengine.com/u/Oye_Orange)\
**Post date:** [February 4, 2022, 4:07pm UTC](https://forums.unrealengine.com/t/lerp-blend-nodes-with-material-functions-dont-work/465354/8 "2022-02-04T16:07:59Z")

</div>

but I can’t find it in material editor. 🥲

---

<div class="post-metadata">

**Author:** ![Oye\_Orange](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oye\_Orange](https://forums.unrealengine.com/u/Oye_Orange)\
**Post date:** [February 4, 2022, 4:11pm UTC](https://forums.unrealengine.com/t/lerp-blend-nodes-with-material-functions-dont-work/465354/9 "2022-02-04T16:11:17Z")

</div>

Can I find this node in material function editor?
