Log in or register to post comments

Unity UWP Build - Can't get Background Plane Texture

April 18, 2019 - 1:54pm #1

I am trying to use frames from the background texture of Vuforia. Every 0.25 seconds i get the background plane material > mainTexture.

The texture is blank, although I can see the video output from Vuforia in the background plane. 



My script is on the Vuforia camera. After Vuforia is initialized I run a few lines of code on the late update.

targetMat = transform.GetChild(0).GetComponent<Renderer>().material;

finalTex = targetMat.GetTexture("_MainTex") as Texture2D;



This just returns a grey texture. I have other issues blocking my editor from playing, but before those issues this code would return the background plane in play mode. I am sure it still would. Is there a certain way i should get the video frames in UWP?

Unity UWP Build - Can't get Background Plane Texture

June 5, 2019 - 3:02pm #7

Hello,

Please refer to the following for a workaround solution: https://developer.vuforia.com/forum/unity/suggested-workaround-when-accessing-unity-materials-interferes-background-texture-updates

Thanks,

Vuforia Engine Support

Unity UWP Build - Can't get Background Plane Texture

April 24, 2019 - 10:54am #6

Understood. I was able to solve this issue last night by using the OpenCV plugin. Using their  Utils.textureToTexture2D F(x) I was able to get the background plane background.

Unity UWP Build - Can't get Background Plane Texture

April 24, 2019 - 9:22am #5

Hello @lwarner,

The dev team reviewed and believes this is a different manifestation of the same aforementioned problem with the SDK.

Thanks,

Vuforia Engine Support

 

Unity UWP Build - Can't get Background Plane Texture

April 23, 2019 - 12:24pm #4

@medabit

After reading into it, I do believe my problem differs from the one in the link because I cannot get the background plane image, it reads as "invalid texture". The vuforia video feed works as expected. It just fails to get a readable texture. 

 

Unity UWP Build - Can't get Background Plane Texture

April 19, 2019 - 10:00am #3

@medabit

Thanks for the info!

Unity UWP Build - Can't get Background Plane Texture

April 18, 2019 - 3:36pm #2

Hello,

We're tracking the following issue with SDK 8.1.7: https://developer.vuforia.com/forum/unity/bug-accessing-background-plane-texture-bug

Thanks,

Vuforia Engine Support

Log in or register to post comments