Log in or register to post comments

"Failed setting triangles" when changing scenes (has workaround)

June 14, 2018 - 1:37pm #1

Hi!



Here's my setup:



Vuforia configured with Delayed Initialization set to FALSE



Main menu with a disabled VuforiaBehaviour

Headset AR scene with an enabled VuforiaBehaviour, sets MixedRealityController mode to VIEWER_AR

Handheld AR scene with an enabled VuforiaBehaviour, sets MixedRealityController mode to HANDHELD_AR

When I enter either AR scene, I explicitly set the MixedReality mode, and then apply the following operations to the DeviceCamera instance: Init, Start, SetFrameFormat, and SetFocusMode.

When I leave either AR scene, I call Stop and then Deinit on the DeviceCamera.



Now here's my problem. If I go into the Headset scene, and return to the main menu, I get the following errors when I go into either scene:



Failed setting triangles. Some indices are referencing out of bounds vertices. IndexCount: 2166, VertexCount: 400

(2 instances of this error)



Mesh 'DistortMesh': abnormal mesh bounds - most likely it has some invalid vertices (+/-inifinity or NANs) due to errors exporting.

Mesh bounds min=(-nan(ind), -nan(ind), 0.00), max=(-nan(ind), -nan(ind), 0.00). Please make sure the mesh is exported without any errors.


(2 instances of this error)

These errors cause the camera image to get flipped. I can actually see the correct-orientation camera feed behind this flipped image, as it is slightly larger.



Now, a workaround for this that works for me is to always set the MixedRealityMode back to HANDHELD_AR when I leave an AR scene. I'm not sure why, but this allows me to go back into either scene without this triangles / distortmesh issue.



I had been previously trying to do Delayed Initialization with explicit VuforiaRuntime.Init() and Deinit() calls, but this seemed to be leading to camera-image freezing... when I would go back to an AR scene after having been in one previously, it would only show the last image the camera saw.



Anyway, since I have a workaround (albeit a clunky one) it's not a big deal. Just thought I'd bring this to your attention!

 

Log in or register to post comments