# Setting cloud speed in blupeprints (Lerping material Time node)

**URL:** <https://forums.unrealengine.com/t/setting-cloud-speed-in-blupeprints-lerping-material-time-node/484364>\
**Category:** Rendering\
**Tags:** time, lerp, unreal-engine, Clouds, question\
**Created:** [June 3, 2021, 3:29pm UTC](https://forums.unrealengine.com/t/setting-cloud-speed-in-blupeprints-lerping-material-time-node/484364 "2021-06-03T15:29:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![EvilPixel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilPixel](https://forums.unrealengine.com/u/EvilPixel)\
**Post date:** [June 3, 2021, 3:29pm UTC](https://forums.unrealengine.com/t/setting-cloud-speed-in-blupeprints-lerping-material-time-node/484364/1 "2021-06-03T15:29:59Z")

</div>

Hello everyone, I have been trying to solve this issue for a few days now and I seem to be stuck so I’ve figured I should ask for help from someone more knowledgeable.

I’m trying to change the cloud move speed in blueprints. However, when I start lerping through the “ **CloudSpeed**" parameter the clouds start acting weird. While I lerp from a higher “ **CloudSpeed** ” value to a lower one the clouds start moving backwards until the lerp finishes and they start moving correctly (in the right direction and in the correct speed). Similarly, when I lerp from a lower value to a higher one they speed up way too much until the lerp finishes.

I’m guessing it is because I’m altering the value of the “time” node. So, Is there any way I can fix this and change the cloud move speed in Blueprints?

 ![340603-cloudspeedsetnodes.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/3/6/a363bbb2bb779deb3ca2b098c4704a4694610d95.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 4, 2021, 7:43am UTC](https://forums.unrealengine.com/t/setting-cloud-speed-in-blupeprints-lerping-material-time-node/484364/2 "2021-06-04T07:43:38Z")

</div>

You can do this

 ![340645-screenshot-2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/5/9/f593f4a0738895d329a7fc7f1b2b30bc2ef5346b.jpeg)

![340646-cloudmat.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/2/d/b2d5b7f1033f7df3c55f56a147358c7d4427b53c.gif)

---

<div class="post-metadata">

**Author:** ![EvilPixel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilPixel](https://forums.unrealengine.com/u/EvilPixel)\
**Post date:** [June 4, 2021, 8:02am UTC](https://forums.unrealengine.com/t/setting-cloud-speed-in-blupeprints-lerping-material-time-node/484364/3 "2021-06-04T08:02:30Z")

</div>

Thank you for your help! The cloud speed works when I set it from the material instance from the editor. But I was wondering if I could increase and decrease the speed from the blueprint during gameplay.

 ![340650-cloudspeedlerp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/3/2/1322a00815a1a4b22604b2d33b6560bbd542feaa.png)

I have this lerp macro that I call from the blueprints. However when I lerp the **CloudSpeed** for example from 1.5 to 0.5 clouds in game start moving backwards until the lerp stops. Then they start moving in the right direction at the right speed.

How would I correctly lerp the **CloudSpeed** while it is multiplied by the **Time** node?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 4, 2021, 8:08am UTC](https://forums.unrealengine.com/t/setting-cloud-speed-in-blupeprints-lerping-material-time-node/484364/4 "2021-06-04T08:08:29Z")

</div>

If it works in the MI, it will work from BP. Problem is, you have a BP error 😉

You’re presumably using a timeline outside this macro?

Golden rule for lerps in timelines is, fix your start and end points before you go into the timeline.

Your problem is that you’re sampling the parameter value during the TL.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 4, 2021, 9:05am UTC](https://forums.unrealengine.com/t/setting-cloud-speed-in-blupeprints-lerping-material-time-node/484364/5 "2021-06-04T09:05:20Z")

</div>

Where is the lerp? ( also that won’t compile ).

You can do this

 ![340645-screenshot-2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/5/9/f593f4a0738895d329a7fc7f1b2b30bc2ef5346b.jpeg)

![340646-cloudmat.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/2/d/b2d5b7f1033f7df3c55f56a147358c7d4427b53c.gif)

( although I think the addition is screwing around with the world position… )

---

<div class="post-metadata">

**Author:** ![EvilPixel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilPixel](https://forums.unrealengine.com/u/EvilPixel)\
**Post date:** [June 4, 2021, 1:22pm UTC](https://forums.unrealengine.com/t/setting-cloud-speed-in-blupeprints-lerping-material-time-node/484364/6 "2021-06-04T13:22:42Z")

</div>

I’ve tried your advice and set all of the variables before lerping the **CloudSpeed** parameter however, I’m still getting the same result where the clouds start moving backwards during the lerp:

![340673-cloudlerp.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/2/b/e2bf3dd99d78148db6612d72b1f23e8a056e1d2c.gif)

Here is the full BP that I’m using to lerp the value:

 ![340675-cloudspeedlerpbp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/1/5/3154bd11a9782ed5f1f5ab4ec51e2c99e79cdfd4.png)

---

<div class="post-metadata">

**Author:** ![EvilPixel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilPixel](https://forums.unrealengine.com/u/EvilPixel)\
**Post date:** [June 4, 2021, 1:34pm UTC](https://forums.unrealengine.com/t/setting-cloud-speed-in-blupeprints-lerping-material-time-node/484364/7 "2021-06-04T13:34:30Z")

</div>

I’ve tried your advice and set all of the variables before lerping the **CloudSpeed** parameter however, I’m still getting the same result where the clouds start moving backwards during the lerp:

![340673-cloudlerp.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/2/b/e2bf3dd99d78148db6612d72b1f23e8a056e1d2c.gif)

Here is the full BP that I’m using to lerp the value:

 ![340675-cloudspeedlerpbp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/1/5/3154bd11a9782ed5f1f5ab4ec51e2c99e79cdfd4.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 4, 2021, 5:57pm UTC](https://forums.unrealengine.com/t/setting-cloud-speed-in-blupeprints-lerping-material-time-node/484364/8 "2021-06-04T17:57:45Z")

</div>

You’re still doing it 😉

![340708-screenshot-3.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/a/d/4ade420a0985d8d51d2e3c77621a2237d8916c00.jpeg)

You can’t feed changing values into a timeline, you have to set the start and end for the lerp before you use the timeline.

---

<div class="post-metadata">

**Author:** ![EvilPixel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilPixel](https://forums.unrealengine.com/u/EvilPixel)\
**Post date:** [June 4, 2021, 7:16pm UTC](https://forums.unrealengine.com/t/setting-cloud-speed-in-blupeprints-lerping-material-time-node/484364/9 "2021-06-04T19:16:08Z")

</div>

I’ve set the Lerp A variable before the timeline start, but the clouds still move backwards during the lerp, like in the gif.

 ![340712-cloudspeedlerpbpfix.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/f/c/efc11807e66102b378da4111d2cc497c74ca74bd.png)

I’m thinking it might be because the **CloudSpeed** variable is being multiplied by the **Time** node in the material. But I don’t know how to set up the lerp to account for the **Time** node.

If it helps here is the full clouds material:

> **[blueprintUE | PasteBin For Unreal Engine 4](https://blueprintue.com/)**
>
> blueprintUE is a tool for sharing, rendering and rating blueprints for Unreal Engine 4. UE4 is a game engine which use visual scripting called blueprint.

And here is the lerp BP:

> **[blueprintUE | PasteBin For Unreal Engine 4](https://blueprintue.com/)**
>
> blueprintUE is a tool for sharing, rendering and rating blueprints for Unreal Engine 4. UE4 is a game engine which use visual scripting called blueprint.

Thank you so much for trying to help me, I’ve been stuck on this for half a week now 🙂
