By lwarner
on Thu, 04/18/2019 - 20:54
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?
Hello,
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
@medabit Thanks for the info!
@medabit
Thanks for the info!
@medabit
@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.
Hello @lwarner,
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
Understood. I was able to
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.
Hello,
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