UE4's <Flip Book Motion Vector> Material Function works well?(Image Fixed)

In my editor it doesn’t works well
So, I entered MF and found this

I think that constant bias scale’s 0.5 should be -0.5
If I set that 0.5, motion vector looks like below

(constant bias scale 0.5, 2, motion vector value = 1)

If I set 0.5 to -0.5, motion vector frame blending looks like below

(constant bias scale -0.5, 2, motion vector value = 1)
too much motion vector value, but blending direction looks right

(constant bias scale -0.5, 2, motion vector value = 1/24)
looks fine

May be I was wrong. But I think this is weird. constant bias scale 0.5, 2 can’t make 0~1 value to -1~1.
Plz Feedback.

1 Like

Its not only your editor that isnt working well, neither are your images:

1 Like

Oh thanks, I’ll fix my images thanks!!

Hello !
I have weird stuff going on with motion vectors aswell. It’s not warping at all.
I tried in slate editor but unfortunately it doesnt seem to work when using the Material Function.
I exported the texture in exr, set my vector texture to “Vector Displacement” RGBA8

Here’s my setting in slate :

What did I do wrong ?

Thanks :slight_smile:

Im not quite sure about the specific texture format in unreal but i get that exact same diagonal motion in my vectors if i save it with the wrong compression type. (using cryengine) Our textures need to be 16bit uncompressed for it to work. (R16G16) Standard compressed 8bit will give me that broken result.

Hello ! thanks for the reply !

I tried every compression settings, it doesnt work. Strangely if I unplug the texture from the material function. It behave exactly the same. Tried to import from exr, tiff…

When I look at the forward motion vectors output, I got the exact same stuttering motion. :cry:

In the pic with your shader graph, the motion vector texture looks too bright. Is your empty space between frames set at 128,128,0? Anything other than 128,128,0 corresponds with a direction, depending on if it is brighter or darker than the neutral 128,128,0. (brighter goes one way, darker goes the other) It looks correct in the slate preview window. Is there some sort of gamma correction happening on the texture? It should be linear with no gamma correction.

Finally I got it working here. Short tutorial:

  1. Nothing special to do in Slate!
  2. Double-Click Flipboard-Node and fix the Bias Scale like described in the first post!
  3. Instead of using the “Shader Estimate” from Slate as “Motion Vector Intensity” in Unreal, use the “Current Minimum”. I didn’t do this and then my Vectors where moving into the wrong direction.

Here you see how it looks when I use the correct (negative) motion vector value:

And this is how it looks with a positive value instead:


I create a little Tutorial about the whole process.


from playing with this it seems like this works really well when the time is being scaled by factors of .1 or less. But if you go above this, it starts to break. Have you been able to find a solution for that?

Yes, this makes sense. What that math is attempting to do is change the output range of the texture from it’s default of 0 to 1, to a directional range of -1 to 1.

If you run through the math on the outer bounds, this is what it was doing before:
min = 0 + .5
= .5 * 2
= 1

max = 1 + .5
=1.5 * 2

So the output range from this would be 1 to 3… not correct.

with your correction:
min = 0 - .5
= -.5 * 2
= -1

max = 1 - .5
= .5 * 2

Output range of -1 to 1. Bingo.


Sorry bit late to the party. Found another bug with this Material Function: it doesn’t seem to handle that number of rows is not the same as number of columns. You get some strange jittering between frames.

Didn’t have time yet to fix it. But just wanted to drop that here in case others tear their hair out after following all of these super helpful tips, and still having problems. (Like I did)

Also thanks for this thread. It really helped me out!


Just a caution to anyone doing this. I swear, every time I go to cobble together a vector flow shader I somehow forget to linearize the color for the vectors in the texture itself. You can easily talk yourself into thinking “it looks better than it did.” when it’s “kinda blending”

It should work flawlessly. If you set your distortion strength to something sorta high and the entire image goes swimming away diagonally…that’s a sign that you forgot to linearize your color and therefore half-white is not centered. (or its a sign you forgot to center something somewhere in the vector)

This message brought to you by the words “kinda” and “sorta”

1 Like

Do you mean before you import your texture into Unreal, or unchecking sRGB in the texture settings in the engine?

1 Like

In unreal, unchecking the sRGB flag.
Not all of us are working in unreal. I forget what you do in Unity.

1 Like

Gotcha, thank you! I usually set my compressing setting (in Unreal) to VectorDisplacementmap and then adjust my Maximum Texture Size as needed when I’m doing flowmap stuff. Gives great results for me. I can’t remember if that setting auto uncheckes sRGB or not

Just a reminder that one of those constant bias in the function is wrong and needs to match the other ones to get the proper motion, Don’t know why unreal hasnt fixed it yet.

That intensity is a big problem if you dont get it right too.

Edit: Simon covered it.

It’s a great find and a simple fix. Have you tried making a pull request on GitHub?

1 Like

Hi, I wanted to revive this thread and ask if anyone has used the most recent version of Slate? The video that @simonschreibt made is on an older version and the UI has changed significantly. I’ve gotten OFLOW maps out of slate but the results have been very poor on 4x4 textures.

Where’s that simple fix? i’m not finding it, my motion vectors are stepping too much