Tuesday, June 21, 2016

Between keyframes

My project this summer started with implementing keyframing for masks and layer opacity. Currently I am doing the same for transformation masks, but in between I worked on the problem of interpolation.

Layer opacity was a good test case for this. To get a smooth transition from one level of transparency to another, one would not want to manually adjust it on every single frame. Instead, we want to be able to specify a curve which the intermediary values follow.

Like most other animation software, our approach is based on cubic Bezier curves. They allow good control over the curve in an intuitive way. In fact, they can even allow a little too much control. Unless we place extra constraints, the curve could double over or form loops. The math for detecting these situations exactly can get quite complex, but luckily there is a simple compromise. If we limiting the control points between the end points on the time axis, the curve will always behave itself.

I have finished implementing the backend portion, and interpolation now works with layer opacity. The work included implementing the math, using the interpolated values in rendering the image and making the animation cache aware of which frames need to be cached separately. Right now it always defaults to a linear transition, as there is no user interface to adjust the curve yet.

We are in the process of designing a visual editor for this with feedback from animators. While the discussion is still ongoing, I believe we have established a good overall design which I can start implementing soon.


  1. Just some food for thought. If this is a generic solution for interpolation, you might want to allow for multiple types other than bezier curves. i.e. if you are interpolating an X/Y coordinate you might want bounce (i.e Y axis of a ball) and overshoot (i.e. X of something "springing" to a point). I don't think you could do these easily with beziers. Or is this only for layer effects?

  2. Keen TV's are turning out to be increasingly basic in the market today yet what amount do you truly think about them… A Smart TV is basically a TV box that is worked to be associated with the web and is a PC essentially concentrated for excitement purposes.  They arrive in a scope of sizes ranging&hellip
    Cheapest Smart TV