I want to use animated texture (image sequence) on iOS and android. I have made keyframe images.
To save space I want to only save keyframes in the app and during runtime interpolate between them to create middle frames, (I am not clear about this, just guess it might be possible). Do you recommend this or is there any better way to approach the problem (like any plugin that can help) ?
I looked up movie texture, but iOS and android do not support it. And textures that I have are ~high res (2048 * 2048) so saving 3 sec animation at 30 fps is like 90 * 4 mb = 360 mb, which I want to avoid.
It’s possible, but not trivial. The easiest method is just to fade from one frame to another, but the better technique is to use an optical flow motion vector texture to warp the textures while fading between them. This is getting increasingly common for fx work, and is how a lot of video compression works.
Here’s a video of a tool that generates the necessary flow texture.
There are a few assets on the store with shaders that will do this for particles in an atlas. If you’re using image sequences you’ll have to write your own shader that takes the two frames and their two flow textures and blends between them.