How to material animation pause every 2 seconds on X pan

Hey there. I was wondering how you get a material pan to pause at a specific interval every X amount of seconds?

Here’s an example and my blueprint setup:

Thanks for helping.

1 Like

Hello Aztecco. Thank you for your assistance. I injected the code into my materialBP, and for the most part, it worked,
but it seems to pause through the cycle throughout half of the duration. The pan seems to cycle very fast. I need to slow it way down. How do I achieve that?

Here’s the current BP I have checked out.

192613-example.png

Time period - 2.00
Sine - 2.0
Clamp MinDef = 0.0 / MaxDef 1.0
Panner Speed X = 0.01 / Speed Y 0.01

also, let me reiterate what I’m intending it to do

I don’t want it to pan at all, I want it to tick every second, so it absolutely can’t move along the X axis without a frame tick per 1 second

192614-example2.png

  • edit

I’ve edited the logic a bit, and it seems to jump between ticks just how I want, unfortunately it only jumps between two ticks, instead of cycling at least 5 ticks that I want it to do. How do I fix that?

example:

192613-example.png

…so how am I supposed to do that?

all that does is make it scroll every second and then snap it back to origin.

I don’t know how to do that. Perhaps if you can send me example code, it’ll help me.

I’m lost. The time in the panner doesn’t move, because it’s not supposed to move. It’s supposed to skip.

Again, here’s an example of the effect I’m trying to achieve:

Preferably 4 ticks per cycle.

I don’t know how to do that but I’ll try.

so I made an empty track, then I right click it and what do I select?

here are my options:

here is my UV parameters, like you said:

192789-param.png

I assumed that I had to select the Float UMaterial parameter, so I did what you said - what now?

You have forgot add node after sine whit the X parameter , it allows you to change the ratio.

To get the value of X for an absolute 1to 5 ratio you need to do some math equations but we’ll see this later.

Try put an add node between sine and ceil and add for example 0.5 and you’ll see

Sorry! You got right…
I tried everything but seems like it resets every time speed changes.

However there is another option: you can put a scalar parameter in the time and control it whit matinee.

It’s a bit complicated… That’s why I suggested you the previous code, but It didn’t worked so…

Start reading this documentation, it’s perfect for your instance: Animating Characters and Objects in Unreal Engine | Unreal Engine 5.1 Documentation
Scroll down to the Float Material Parameter Matinee section and read it, the only difference is that they change color while you need to change the time parameter in your panner

Always whit matinee bro but use a parameter directly in the UV of your sample and in matinee create a track for U and add 4 keyframes and increase .25 the U value each frame, make sure to select the right interpolation mode.