Start a new topic

Transparent video: custom method question

We're having an issue regarding implementing video transparency as listed in the Wikitude documentation. Is it possible to incorporate the following transparency method into our current setup?
We're augmenting a 20-second video clip into our scene using Wikitude SDK 8.1 and Unity 2018.2.13f1. We have a video player playing the video in the background, applying it to a texture of a Raw Image (labeled VideoPlane below). We have a separate masked version of the video which we want to mask so that there is transparency (only showing the white of the mask). The plane is activated by a trigger which is hit by an animation in the scene, so we would like to keep it labeled accordingly.


Hi, 


Thank you for pointing that out. We'll make the necessary adjustments as soon as possible.


Best regards,

Alexandru

Hi, the instructions given for the conversion of the transparent video as given on this page is wrong:

https://www.wikitude.com/documentation/latest/android/workingwithvideos.html#codecs


Its given as:

MacOS X

Open the Terminal applicationInput cd <SDK>/tools/video/MacOSX. 

Replace <SDK> with the path to the SDK folder


** Execute sh convert.sh <input video> <output video>. 

Replace <input video> with the path to your transparent video and <output video> with the path where you want the output video to be stored.


** This instruction's syntax is wrong. It should be "Execute sh convert.sh -i <input video> -o <output video>


<output video> should include the entire path PLUS the proposed name of the output video, eg "/users/xyz/Documents/output.mp4"


Hi,


That documentation only applies to the JavaScript SDK, and not to Unity.

In Unity, it should be easier to add a transparent video, without the need to run the commands you mentioned. Please have a look at the Unity documentation for further information.


Best regards,

Alexandru

Hello,


The attached image is a still frame from the video. The video was created in After Effects.


Video properties:

Resolution: 720x640
File size: 1.3MB
Compression: H.264


Do we still need to run these commands listed in the documentation?

MacOS X

Open the Terminal application Input cd <SDK>/tools/video/MacOSX. Replace <SDK> with the path to the SDK folder

Execute sh convert.sh <input video> <output video>. Replace <input video> with the path to your transparent video and <output video> with the path where you want the output video to be stored.


Or, just add the following code upon adding the video to the target image:


Just make sure to set the isTransparent property of the AR.VideoDrawable to true.

// Create a transparent video drawable
var video = new AR.VideoDrawable("assets/transparentVideo.mp4", 0.7, {
    translate: {
        x: -0.2,
        y: -0.12
    },
    isTransparent: true
});




Hi,


Where exactly did you encounter the issue when you followed the documentation to generate the transparent video? 


Greetings

Nicola

Login or Signup to post a comment