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.


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


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.