The perfect crossfade

Posted by epologee on Programmers See other posts from Programmers or by epologee
Published on 2011-11-12T13:39:36Z Indexed on 2011/11/12 18:06 UTC
Read the original article Hit count: 336

Filed under:
|
|
|
|

I find it hard to describe this problem in words, which is why I made a video (45 seconds) to illustrate it. Here's a preview of the questions, please have a look at it on Vimeo: http://vimeo.com/epologee/perfect-crossfade

Using a linear crossfade the resulting image will have a 'dip' in transparency. How can I prevent this?

The issue of creating a flawless crossfade or dissolve of two images or shapes has been recurring to me in a number of fields over the last decade. First in video editing, then in Flash animation and now in iOS programming. When you start googling it, there are many workarounds to be found, but I really want to solve this without a hack this time.

The summary:
What is the name of the technique or curve to apply in crossfading two semi-transparent, same-colored bitmaps, if you want the resulting transparency to match the original of either one?

Is there a (mathematical) function to calculate the neccessary partial transparency/alpha values during the fade?

Are there programming languages that have these functions as a preset, similar to the ease in, ease out or ease in out functions found in ActionScript or Cocoa?

© Programmers or respective owner

Related posts about ios

Related posts about flash