Search Unity

import movie with alpha

Discussion in 'Scripting' started by Synapz, Oct 2, 2014.

  1. Synapz


    Oct 2, 2014
    Hi guys,

    I am a newly unity user and i want to import a movie taken of someone in front of a green screen.
    i have used key light in After Effects to filter the green out and then saved as .mov in animation codec as a rgb, alpha, and rgb + alpha. I have seen several workarounds to get this working in unity but none have been successful for me. Could anyone pls state in steps what to do in unity when i have these movies?

    Thanks in advance,
  2. mateustavares


    Feb 18, 2014
    I faced this problem a couple of times and resolved it differently for each one, it mainly depended on the platform mobile we used a plug in for the asset store and for pc, and mac we just used shaders. I´m not going to be able to give you a step by step, since I don´t currently have the project I did it in to remember every step., but I´ll try to explain it as best as I can. I´ve had better results exporting the movie with a black background, instead of alpha, and then using a shader which sets the black as alpha, if you need it I can post the shader I used tomorrow. In unity I used a plane (or quad in 4.6), and placed the movie along with a simple script that sets it to play, along with a shader that has transparency. In my experience we also had to set an image of the last frame once the clip ended, otherwise it bugged out at the end. Hopefully this helps, I try to post the shader and better instructions later.