Log in or register to post comments

Displaying video with alpha channel removed

June 29, 2011 - 3:14pm #1

My goal is to display a video on-screen when a target is detected with the alpha channel removed from the video. So the object will be displayed on-screen without a background.

Is this possible with QCAR?

What is the best approach, to use OpenGL ES or Unity?


Displaying video with alpha channel removed

May 7, 2017 - 8:01am #9

That code  works for me, it eliminate the background (Green) but The video doesn't plays, any one knows why?


thanks :)

Displaying video with alpha channel removed

November 2, 2016 - 8:18pm #8

i've just found the solution here : http://ramesh-programmer.blogspot.co.id/2015/05/unity-chroma-key-shader-for-video.html

and work perfectly for chroma keying. after write the script, just set alpha to 0 and select texture with green one. 

but i face a problem, i have image target more than 1 (say it 4), and i add vuforia video playback on each of them, when i change shader on video for image_target1 that's also change the whole videoplayback for each image_target, how to make a different video shader on each image_target? 

Newbie here :D

Displaying video with alpha channel removed

March 30, 2016 - 12:56am #7

Did you sorted out this issue? actually i want to also play a alpha channel video when the target found. but unfortunately i am not able to do that. if you done the same please help me..

Displaying video with alpha channel removed

July 31, 2012 - 6:03am #6

Maybe take a look here:

We used this a while ago in an app.

Displaying video with alpha channel removed

July 27, 2012 - 10:39am #5

Is that video sample something you can share?

Displaying video with alpha channel removed

July 26, 2012 - 2:00pm #4

After further research, it appears this is possible with the use of custom shaders.  Unfortunately, I cannot find a shader to do the job.

I've found a thread which states its been solved, but when I import the shader it throws up GLES 2.0 incompatibility errors and says the shader needs both fragment and vertex programs to be compatible with OpenGLES2.0.

Heres a link to that thread on the Unity forums:


Does anyone know how to fix this issue or to add vertex program information into a shader to upgrade it for Unity's newer versions?

I have a video with embedded alpha.  I understand that Theora removes the alpha information on import, but I've seen others say you can accomplish this with 2 movies on planes, one with RGB and one with A, then use the RGB movie as primary texture and Alpha movie as _Mask texture.

While having two files to pull it off is not ideal, it will work for what I need now.  Either a quick 2-texture alpha-blend approach or a way to use a single video with alpha channel is what I need.

Thanks to anyone who can help with this!

Displaying video with alpha channel removed

July 19, 2012 - 2:53pm #3

The Vuforia Video Playback Sample App available on the Unity Asset Store provides video playback on 3D planes.  Alpha transparency support can theoretically be achieved by using a video with embedded alpha channel and the proper mobile-supported shader.

You could also perform all your masking/alpha work in After Effects (or w/e) and then simply put a neon-pink or green solid color background behind it before encoding.  Then you could use a shader that looks for that solid color and renders it transparent.  This would give a nice clean mask - and you wont have to worry about the difficulties of "chroma-keying" in Unity since it will have already been done in AE and you simply use a solid color instead of the green-screen color (which, prior to keying it out, would have different hues of green making it difficult to target a single green color with a shader in Unity.)

I have not tested this method but I am planning to test it tomorrow.

Re: Displaying video with alpha channel removed

June 30, 2011 - 2:43am #2

I would be also interested in this. I know that in Unity you cannot do this because they do not support projecting video on 3D objects for mobile platforms.

I found this on youtube http://www.youtube.com/watch?v=eyTtODti07c

Someone managed to get video working on virtual plane. Not sure how he did this. The alpha removal thing would also be great because then we could create a footage on greenscreen and bring this video into 3D world. It would have transparent 2D plane in 3D world playing a video playback of a person.

Log in or register to post comments