In order to compute the advection, we will need to compute the optical flow of the source in both foreword and reverse sense. The result will be 2 videos, where the velocity is stored in each pixel color at each frame. RGB = 128 means that the fragment at this pixel has a nul velocity. R stores Vx and G stores Vy (B is always 0). Negative values are expressed on [0..128[ and positive ones on ]128..255].

Computation for a video source

Real videos must have the best quality as possible to get good results.

Computation for a 3DMax animation

Once again, don't forget to render 2 additionnal frames, one before and one at the end for the original animation.

In our example we obtain (K=6):

Cube_6_oflow_bck.mov (240 frames)
Cube_6_oflow_fwd.mov (240 frames)