Download

Help with Panner Pausing Problem

So I’ve been trying to make a sword hilt that has a blade coming out of it (think of a lightsaber or an energy sword sort of style).

I’ve been trying to do this by pausing a panner at an “ON” and “OFF” state. The top half of the texture that I was using represents the “ON” state of the sword and the bottom half represents the “OFF” state.
Sequence-01.gif

When the purple starts to pan downward, the sword begins to turn off because it moves off of the sword’s UV’s.
56b2202cffa61fd37414480690f0c0b2caec2f4c.png

The problem that I have been having is that the panner seems to pause and unpause at seemingly random parts of its looping and when I set the panner’s speed to zero it simply goes back to its default state instead of pausing it.

To demonstrate this, I made a 40 second video of what it looks like when I press the “Q” button to turn off the sword.
The gem changes to green to demonstrate every time I press “Q”.

You’ll see it kind of jitters for a moment and starts the panner at inconsistent parts of its cycle.
Here is the material that I used for the sword panner:

and here is the blueprint that I used on the sword:


I honestly don’t know if I’m missing something or if there is a much easier way to go about doing this. Any suggestions would be amazing. Thank you all for helping!
(also this is my first post :))

I would probably just encode a new 0-1 UV channel for the whole mesh and do something like UV.y minus the cut spot, with a ceil node. Then you have a 0 or 1 mask where you can control how far along the mesh it is.

You could also use the material function BoundingBoxBased-0-1_UVW and then blend using the W channel which should be like a local Z. but that will have some slight rendering cost compared to using a baked UV coordinate.

Thank you so much for the advice, I honestly didn’t understand a lot of the terms that you used because I am a bit newer to the terminology of UE4, but I did manage to find a way to get it to work jumping off some of the things you mentioned.

What I did was that I made a timeline that would gradually change a float value from 0-1 over the span of 2 seconds (float name = Pan). I then set the “Time” parameter inside of the Panner material to be equal to “Pan”.

When Time = 0, the material is invisible
When Time = 1, the material is visible

So when I play the timeline, the “Pan” float will change the “Time” parameter over the course of 2 seconds and then I can reverse the timeline when I am finished.
f109b297650a5796f4edcc25fcfebc51b5741688.png
517886b1fc247bd641feeea6b46ba45bf112726b.png

I posted a video of what my working solution looks like along with the material and blueprint just in case some guy in the future is looking into this exact issue and finds this post with no solution.

Thanks RyanB for the help! These forums help so much!