# Material Panner with parameter value goes too fast when changing

**URL:** <https://forums.unrealengine.com/t/material-panner-with-parameter-value-goes-too-fast-when-changing/394437>\
**Category:** Rendering\
**Tags:** parameters, panner, timeline, unreal-engine, bug-report, question\
**Created:** [May 24, 2017, 5:58am UTC](https://forums.unrealengine.com/t/material-panner-with-parameter-value-goes-too-fast-when-changing/394437 "2017-05-24T05:58:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenVlodgi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benvlodgi/32/1194567_2.png) [@BenVlodgi](https://forums.unrealengine.com/u/BenVlodgi)\
**Post date:** [May 24, 2017, 5:58am UTC](https://forums.unrealengine.com/t/material-panner-with-parameter-value-goes-too-fast-when-changing/394437/1 "2017-05-24T05:58:16Z")

</div>

**[Video explanation][1]**

Update 1: **[Video with more information of problem][2]**

Update 2:  
I see the problem now, the panner node doesn’t increment offset every tick based on current speed.  
I checked the code, and the panner just calculates `offset = time * speed `

> `Arg2 = Compiler->PeriodicHint(Compiler->Mul(TimeArg, SpeedYArg));`

This is still problematic for me, however I’ll just find another way around this.  
So I’m unsure if this is a definite BUG, or just efficient behavior.

Edit 3: UE-45602 [link][3]

Material:  
Panner uses parameter value **SpeedY**

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/9/2/b92013ad1353a7d376bc8262893c3dce1996b3ff.png)  
Level Blueprint: Update material instance with scalar parameter **SpeedY** from timeline

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/7/c47cf912b2316d82493275ad6d155c0b9d1ed710.png)  
Timeline: Ranges from 0 - 2

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/f/c/dfcbc7809f30122ecc4e23292740bc20d2898a90.png)  
Level: Fly into trigger area to see bug

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/f/d/7fd56beb76d523cafebb8d03c8cc0a845cbc9f55.png)  
With this setup, while the timeline is updating the **SpeedY** value, the texture flies all over the place. Refer to the video link at the top for demonstration.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d2b909bf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d2b909bf](https://forums.unrealengine.com/u/anonymous_user_d2b909bf)\
**Post date:** [May 24, 2017, 3:04pm UTC](https://forums.unrealengine.com/t/material-panner-with-parameter-value-goes-too-fast-when-changing/394437/2 "2017-05-24T15:04:18Z")

</div>

Hello ,

I believe this is working as intended. The reason you are getting the flickering is because when you update the value of the panner, it resets but it also is moving because you are setting a value. This constant updating causes the flickering you are seeing, and why it the flickering stops when the timeline is finished.

Cheers!

---

<div class="post-metadata">

**Author:** ![BenVlodgi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benvlodgi/32/1194567_2.png) [@BenVlodgi](https://forums.unrealengine.com/u/BenVlodgi)\
**Post date:** [May 24, 2017, 3:58pm UTC](https://forums.unrealengine.com/t/material-panner-with-parameter-value-goes-too-fast-when-changing/394437/3 "2017-05-24T15:58:38Z")

</div>

Hey ,

I could understand if it was resetting every time, that would cause the flickering. To test, I slowed down the timeline to 5 seconds. and found, that this was not the cause. I made an updated video and linked it above. It appears that it has to do also with current game time.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d2b909bf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d2b909bf](https://forums.unrealengine.com/u/anonymous_user_d2b909bf)\
**Post date:** [June 1, 2017, 6:32pm UTC](https://forums.unrealengine.com/t/material-panner-with-parameter-value-goes-too-fast-when-changing/394437/4 "2017-06-01T18:32:44Z")

</div>

Hello again ,

I have submitted a bug report for this issue on your behalf, which you can view here:

> **[The Unreal Engine Issues and Bug Tracker](https://issues.unrealengine.com/issue/UE-45602)**
>
> Welcome to the Unreal Engine Issue and Bug Tracker. You can check the status of an issue and search for existing bugs. See latest bug fixes too.

You can track the report’s status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

---

<div class="post-metadata">

**Author:** ![BenVlodgi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benvlodgi/32/1194567_2.png) [@BenVlodgi](https://forums.unrealengine.com/u/BenVlodgi)\
**Post date:** [June 2, 2017, 8:31pm UTC](https://forums.unrealengine.com/t/material-panner-with-parameter-value-goes-too-fast-when-changing/394437/5 "2017-06-02T20:31:54Z")

</div>

Thanks !  
if you check above, I’ve Identified why this behavior happens in the code. I don’t think there’s a way to rewrite this without reducing performance, or precision.  
I think the way it is currently implemented is efficient for designers who don’t want the pan speed to change. It would be better if the Panner node perhaps had a Dynamic speed option that used cumulative tick based offset. This might be a tiny bit less precise due to floatingpoint fun, but would be a good solution IMO.

---

<div class="post-metadata">

**Author:** ![Smalts](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Smalts](https://forums.unrealengine.com/u/Smalts)\
**Post date:** [October 5, 2018, 3:06pm UTC](https://forums.unrealengine.com/t/material-panner-with-parameter-value-goes-too-fast-when-changing/394437/6 "2018-10-05T15:06:38Z")

</div>

Very late to the party but I have come across this issue also. I tried also staying away from using a timeline to see if I could work a way around it but still had the flicker. I used “Set Timer by Function name” and still got the issue when looping.

 ![255713-sampleissue.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/8/d/f8d6b10adb970d55260a9b32f68dd257b42e6f89.png)

---

<div class="post-metadata">

**Author:** ![BenVlodgi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benvlodgi/32/1194567_2.png) [@BenVlodgi](https://forums.unrealengine.com/u/BenVlodgi)\
**Post date:** [October 5, 2018, 10:48pm UTC](https://forums.unrealengine.com/t/material-panner-with-parameter-value-goes-too-fast-when-changing/394437/7 "2018-10-05T22:48:08Z")

</div>

I had updated my post with the problem.  
The `Panner` node is not meant to have its speed change dynamically.  
The way it calculates the UV offset is based on elapsed time and speed.  
If the speed is to be dynamic, then you can’t use the `Panner` node, and must instead calculate the offset in a bp, and set the offset values.

Looking at your bp code: Don’t create a dynamic instance each time the function is called. Create that dynamic instance once, then just store a ref to it for later. Maintain a `float` for current offset, then OnTick, or in TimeLine increment the offset by `speed` \* `deltatime` and set the parameter on the material instance ref.

---

<div class="post-metadata">

**Author:** ![bstt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bstt](https://forums.unrealengine.com/u/bstt)\
**Post date:** [January 19, 2019, 12:46am UTC](https://forums.unrealengine.com/t/material-panner-with-parameter-value-goes-too-fast-when-changing/394437/8 "2019-01-19T00:46:59Z")

</div>

Hello,

I think you mistake on Panner function. It must be used with a **constant speed** , because the time value used for the function is the **global time** (not a time increased according to the speed and delta time).

For example : if you start your game since 45s and you change your speed from 0.1 to 0.12, it will **involuntarily increase the offset** of your TexCoord from (0.12 - 0.1) x 45 _(and the scrolling will be faster)_.

The only way to do what you want is to manually increase a **time parameter** (and not using Time function).

**Panner function explanation**

 ![265807-capture-decran-43.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/4/a/84a6a45932c7f64539fcac2a527085bbccdf7120.jpeg)

**Custom Panner function**

 ![265808-capture-decran-44.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/5/c/35cef2aa8953bb170533d2486a26ff80cc68d0b9.jpeg)

**Dynamic speed blueprint code**

 ![265809-capture-decran-45.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/2/c/42ca93e24417d81f29a70ff50b235737b138d60e.png)

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [March 19, 2024, 2:25pm UTC](https://forums.unrealengine.com/t/material-panner-with-parameter-value-goes-too-fast-when-changing/394437/9 "2024-03-19T14:25:59Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
