Flipbook motion vectors for non-square frames with different collums/rows

Hello everyone,

I am fairly new to unreal 4 engine and i have recently started messing with motion vectors for flipbooks. I am already aware of the issue where the flipbook_motionvector node breaks when you have a different amount of collums and rows thanks to the previous posts about it in there forums.

However i have come across a new issue, it appears that when you have different collums/rows combined with a non square frame it breaks again. It seems to work if i have the same amount of rows/collums when each frame is not square and also with different rows/collums with square frames (after i applied the fix) but when i combine the two so i have different rows and collums AND non square frames the issue arrises. My flipbook is 4k and has 16x8 frames and each individual frame is 1:2 aspect ratio. (256x512 per frame) It appears to play the first few frames ok then it just disappears. If i manually squish the diffuse in photoshop so the frames are square again it works.

Im still just learning these shaders snd i have been poking around in the flipbook motion vectors node graph but nothing is jumping out at me. Would anyone here have any ideas i how would go about debugging or fixing this issue?

Thanks a lot for any help you guys can provide!

EDIT: I have recompiled everything and redid my shader graph and everything seems to be magically working now. Not sure what i messed up previously but oh well! Thanks!

1 Like

Do not use non square textures it doesnt really help the optimization

Yes, shouldn’t be a problem :slight_smile: non-square is fine as long as it’s power of 2.
Optimisation always works best with power of 2. Individual frames can be non-pow of 2, as long as the overall flipbook is.

Sorry for the delay in finding this.

@Figment Your are right… the Flipbook Motion Vector node has a bug in it. A non equal number of rows/columns breaks it.

Here’s the fix:

Here’s a video breakdown of how I troubleshot the fix:
https://vimeo.com/899355597?share=copy

1 Like