Log in or register to post comments

SetLegacyRenderingEnabledCondition

March 28, 2019 - 1:38pm #1

Can someone from PTC/Vuforia shed some light on the new VuforiaRenderer.SetLegacyRenderingEnabledCondition API that was introduced in Vuforia 8.1.7?

The only place I see it referenced is in the latest OcclusionManagement sample where it's used like this:

void Awake()

{

VuforiaRenderer.Instance.SetLegacyRenderingEnabledCondition(()=>true); //Currently post processing effects using the video background texture are only supported by legacy rendering

}

In my app, I assign the video background texture to a Unity Projector. However, as of Vuforia 8.1.7, VuforiaRenderer.Instance.VideoBackgroundTexture is always null unless I enable "legacy rendering" like in the Awake() code above.

Will there be a new way to get the video background texture either as a texture or a material in future versions of Vuforia? If not, will the now "legacy" feature I rely on be dropped at some point?

Thanks,

Adam

SetLegacyRenderingEnabledCondition

June 5, 2019 - 3:00pm #8

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

SetLegacyRenderingEnabledCondition

June 1, 2019 - 11:58pm #7

Charriu84 wrote:

I'm also interested in this topic. I recently updated to Vuforia 8.1.7 and I get this error message:



RendererApiNotSupportedException: The renderer API OpenGLCore is not supported. Video background rendering is not possible.



My screen also stays black.

 

I am using Unity 2018.3.14f1 and Vuforia 8.1.7, and I've been having the exact same problems. Basically Vuforia won't work anymore. Just shows a black screen on Game Preview, and I can't find anywhere online that describes how to resolve the issue.

 

I've even tried updating Unity versions on two devices and seeing if that makes any difference, and it doesn't. Does anyone know how to resolve this issue?

SetLegacyRenderingEnabledCondition

April 19, 2019 - 2:54pm #6

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

SetLegacyRenderingEnabledCondition

April 12, 2019 - 7:24am #5

Ok so, some problems regarding the latest Vuforia versions.



VuforiaRenderer.Instance.VideoBackgroundTexture is always null

To get it that way you need to do this:

VuforiaRenderer.Instance.SetLegacyRenderingEnabledCondition(()=>true)

But doing so will break the backgroundTexture on android

 

On the other hand getting the texture like this

var cameraTexture = videoBgRenderer.material.mainTexture;

works

 

BUT!

 

there are a few problems:

1- using the newer rendering we need the _UVTex from the custom/videobackground shader too, so we can compensate for the different texture format.

2- it will break the videoBackground behaviour as it will stop updating the texture when you try to start vuforia after it has been manually stopped using "VuforiaBehaviour.Instance.enabled"

functionality, it will simply show the last captured image and it will stay so until you restart the app.

Some help would be greatly appreciated, It would suck to roll back to 7.5.26, that version worked correctly.

SetLegacyRenderingEnabledCondition

April 3, 2019 - 9:17pm #4

I checked "Metal Editor Support" , "Metal API Validation" in PlayerSettings - Other Settings and it is working now 

SetLegacyRenderingEnabledCondition

April 2, 2019 - 11:29am #3

Hello,

Suggest you grab the texture from the Unity Background Plane material:

var cam = DigitalEyewearARController.Instance.PrimaryCamera;

var videoBg = cam.GetComponentInChildren<BackgroundPlaneBehaviour>();

if (!videoBg)

   return;

var videoBgRenderer = videoBg.GetComponent<MeshRenderer>();

if (!videoBgRenderer)

   return;

var cameraTexture = videoBgRenderer.material.mainTexture;

Thanks,

Vuforia Engine Support

SetLegacyRenderingEnabledCondition

March 29, 2019 - 8:32am #2

I'm also interested in this topic. I recently updated to Vuforia 8.1.7 and I get this error message:



RendererApiNotSupportedException: The renderer API OpenGLCore is not supported. Video background rendering is not possible.



My screen also stays black.

Log in or register to post comments