No announcement yet.

Help with Panner Pausing Problem

  • Filter
  • Time
  • Show
Clear All
new posts

    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).

    Click image for larger version

Name:	Default.PNG
Views:	1
Size:	141.0 KB
ID:	1169745Click image for larger version

Name:	Off.PNG
Views:	1
Size:	115.4 KB
ID:	1169746

    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.
    Click image for larger version

Name:	Sequence-01.gif
Views:	1
Size:	231.6 KB
ID:	1169747

    When the purple starts to pan downward, the sword begins to turn off because it moves off of the sword's UV's.
    Click image for larger version

Name:	PurpleTest-UV.png
Views:	1
Size:	53.8 KB
ID:	1169748

    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:
    Click image for larger version

Name:	PannerBlueprint.PNG
Views:	1
Size:	372.0 KB
ID:	1169749

    and here is the blueprint that I used on the sword:
    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	163.7 KB
ID:	1169750
    Click image for larger version

Name:	Capture2.PNG
Views:	1
Size:	140.1 KB
ID:	1169751

    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.
    Ryan Brucks
    Principal Technical Artist, Epic Games


      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.
      Click image for larger version

Name:	PannerMat.PNG
Views:	1
Size:	216.7 KB
ID:	1098236
      Click image for larger version

Name:	GreatSwordBlue.PNG
Views:	1
Size:	259.2 KB
ID:	1098237

      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!