Display animated character on top of view using a video player

Discussion in 'iOS Programming' started by moonman239, Aug 11, 2014.

  1. moonman239 macrumors 68000

    Mar 27, 2009
    Let me give you a little more detail as to what I want to do:

    I have a video of an animated character. I want to display this animated character in my app, but I don't want any whitespace.

    Think about Clippy, the old Microsoft Office assistant, or of an animated IncrediMail character that appears at the bottom of the screen to inform you that you have new email.
  2. 1458279 Suspended


    May 1, 2010
    Inside of a video, you can do augmented reality. This can be text/graphics that are inside of the video as you are recording or seeing it.

    I'm sure there are several examples out there, I've played with them years ago.

    I'm not sure if this is what you wanted, but it could be a starting place.

    I think one of them simple grabbed the frames of the video and calculated where to put the item, then altered the frame to show the item and put the frame back into the video feed.

    As I understand it, it's along the same lines as applying filters to pictures.
  3. moonman239 thread starter macrumors 68000

    Mar 27, 2009
    To get an idea of what I want, please watch this part of a YouTube video, and look at the little animated bunny, and observe what happened when the person who operated the mouse resized the e-mail composition window in which the bunny was located.
  4. moonman239 thread starter macrumors 68000

    Mar 27, 2009
    Update: I just found out that I could have someone make the video an alpha-channel video. Then, it all becomes a matter of creating or using a movie player that supports the alpha channel.
  5. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    Yes, the normal way to make an image that appears to not be rectangular is by using transparency or the alpha channel, that you mentioned.

    You don't necessarily need a video player to display an animation. UIImageView for instance can animate a list of images. Or you could write your own code that uses a timer and animates a list of images. Naturally any framework that displays sprites will also do this. FWIW I doubt if the iOS video player will work for this (but I never tried it for this purpose).
  6. AxoNeuron macrumors 65816


    Apr 22, 2012
    The Left Coast
    Would a transparent animated GIF work? I know that Xcode supports transparency in GIF's but I am not sure about animated transparent GIF's.
  7. TrentS macrumors 6502


    Sep 24, 2011
    Overland Park, Kansas

    I use .png files in my animations. Just make your backgrounds transparent.


Share This Page