Automatic animation based in DeepFlow + EbSynth

Automatic animation inbetweening is a problem that computers often face. There are many programs that manage to do it with some difficulty and many others in which making it look good ends up being a bureaucratic procedure: it is necessary to draw in a specific order, or you have to mark the lines one by one to help the computer understand how to interpolate animation.

My little program tries to solve the problem in the most plastic way possible, it is inspired by As-Rigid-As-Possible it is a mesh that tries to stay as rigid as possible while reaching the desired drawing. To solve this I generate a Flow file between two images.

This is a binary file with the fluidity between two images. Ideally, adding the changes that the Flow file produces, one image can be obtained from the other.

 

From the first frame recreates the second frame

But this is not limited to being generated only by one image from the other, but all the other tables can be generated, those necessary to create the greatest fluidity possible without requiring a huge team of people or outsourcing to countries in which the laws workers are slaveholders.

Result, still lacking, but the result is surprising.

And how is it done?

We generate a Flow file, this has the difference between v05.png and v04.png, two drawings used in the 4232.

deepflow2 v05.png v04.png v.flo -d 0.25 -iter 10 -minsize 1

Now we generate from the gradient drawings that represent that transformation using Color Flow Map

color_flow_map v.flo map0.png 0
color_flow_map v.flo map.png 1

And with EbSynth can generate the new file

ebsynth -uniformity 0 -patchsize 7 -style v04.png -guide map0.png map.png -weight 24000 -output v04_fake.png

And now let’s generate a drawing in the middle of the two

composite -dissolve 50 map0.png map.png map2.png
ebsynth -uniformity 0 -patchsize 7 -style v04.png -guide map0.png map2.png -weight 24000 -output v04-50.png

And what is missing?

Quite still the drawings I know “saw” a bit, many times depending on the complexity of the drawing creates very rare “artifacts” or can not solve very simple things.
After all, presenting art problems to a computer is solving the traveler’s problem, over and over again with different levels of difficulty.

 

Posted in Experiment, Tutorials and tagged , , , , , , .

Leave a Reply

Your email address will not be published. Required fields are marked *

*

code