Hi all,
How to play on a marker a video with alpha channel transpacency with Unity 3 Extension?
I found this:
http://www.youtube.com/watch?v=NNt-kw0wig0
but I don't know how.
Thanks.
Hi all,
How to play on a marker a video with alpha channel transpacency with Unity 3 Extension?
I found this:
http://www.youtube.com/watch?v=NNt-kw0wig0
but I don't know how.
Thanks.
k, here are some hints:
the VideoPlayback sample has a "video" object to which a VideoPlaybackBehaviour component (script) is attached;
this script is responsible for handling the video texture (see mVideoTexture and mKeyframeTexture variables); there is nothing special about it, except the fact that the renderer.material.mainTextureScale = new Vector2(1, -1);
This is used for flipping the texture vertically, as the video texture is generated from the video in native code and is "upside-down".
Then you need to replace the existing shader which is applied to the video object, with your custom shader; your custom shader will need to work with texture coordinates in the range [0,1], both for vertical and horizontal (UV); the mainTextureScale may be the culprit of why you are not seeing the video when you use your custom shader, so you may need to adapt the shader to use the vertically flipped UV coords.
I understand that you want to integrate it in a Vuforia sample, but what I'm suggesting is that the alpha video effect "per se" is something Unity-related, as Vuforia does not have specific API to handle that (and also, it should not prevent you in anyway from achieving it)...
Jove...
I am beginner ... you could modify the code. Send it to
Thank you