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

    Joined:
    Mar 27, 2009
    #1
    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

    1458279

    Joined:
    May 1, 2010
    Location:
    California
    #2
    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

    Joined:
    Mar 27, 2009
    #3
    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

    Joined:
    Mar 27, 2009
    #4
    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 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #5
    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

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #6
    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

    TrentS

    Joined:
    Sep 24, 2011
    Location:
    Overland Park, Kansas
    #7
    .png

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

    :cool:
     

Share This Page