vuforia-engine
vuforia-engine copied to clipboard
Please update to Digital Eyewear Sample (Unity) to work with Magic Leap SDK >= 2.3.0
Summarize your feature feedback Hi, I am currently working on a model target application running on Magic Leap 2 and am using the Digital Eyewear Sample from the Unity Asset Store. It is working all right but there are some features in newer releases of the Magic Leap SDK that I would like to use but whenever I update the SDK version the sample does no longer work.
Describe your feature Digital Eyewear sample to be updated to use Magic Leap SDK >= 2.3.0,
Use-case description There are new features within the magic leap SDK that I (and other people based on the magic leap forums) would like to take advantage of but the sample does not seem to work with an updated version of the SDK.
Business impact We are currently developing a MR application to showcase Vuforia's ability to track objects using the model target feature in hope of getting clients to buy services and Vuforia.
Workaround No.
Many thanks!!!
Hi,
Thanks for reaching out.
We regularly evaluate newer platform versions and SDKs but generally prioritize stable versions. That said, I will let the team know there's interest in upgrading the minimum supported Magic Leap SDK.
Now, I'm curious. Could you let me know which features you're looking to use?
Also, could you share more information on what errors you're getting when upgrading the Magic Leap SDK in the Digital Eyewear sample? It may be we can find a workaround.
Thanks,
Hi, Many thanks for your quick reply.
I understand the importance of working with stable versions but there has been quite a lot of updates on the Magic Leap side (migrating namespaces over to align with OpenXR and additional bug fixes and features) so I think lot of developers are struggling with wanting to use these features but not being able to update the SDK to work with the Vuforia example.
The feature I'm looking at is the Secondary View feature which fixes the misalignment of the virtual content when the headset experience is recorded or streamed. So using Image Targets for example, during the user's experience in the headset the overlaid content aligns perfectly on top of the Image Target but in the video capture, or streaming, the virtual content is displayed at an offset. As we want to be able to stream the user's experience this is not optimal. I saw another developer wanting to use the Pixel Sensor feature.
I will create a new project with the Magic Leap SDK 2.3.0 and share information on the errors soon.
Many thanks,
These are the errors I get when trying to update the Magic Leap SDK to 2.3.0:
Hi @thorbjorgp93, to update the MagicLeap SDK package in the Digital Eyewear sample, you also need to update the MagicLeap MRTK3 package that you can find at the bottom of the list in the Package Manager of the Magic Leap Hub.
This combination of versions works for me:
- Magic Leap SDK 2.4.0
- Magic Leap MRTK3 1.2.0
After that, I would recommend you to check that all the MagicLeap and OpenXR settings are configured as specified in the documentation. Additionally, it is also recommended to fix any potential error in ProjectSettings > XR Plug-in Management > Project Validation.
You might still see a compilation error or warning in your project coming from the XRSettingsValidation.cs script in SampleResources/Scripts/Editor. If that's the case, you can change line 22 in the script from:
using UnityEngine.XR.OpenXR.Features.MagicLeapSupport;
to:
using MagicLeap.OpenXR.InteractionProfiles;
Hope this helps! In the meantime, we will look into updating the sample in a future release of Vuforia. Thank you for your feedback!
Hi,
Many thanks for your answer, I think this has worked!!
The only warning I am getting now is:
Do you know whether this is acceptable warning or is there a fix for this?
Best, Thorbjorg
Hi @thorbjorgp93, glad to hear it worked! The warning seems to come from the Magic Leap packages, so I think the only possible thing to do is to ignore it.
If you deploy the sample on device, please let us know how it goes and if everything works as expected.
Thank you, Ettore
Hi, yes I'll let you know how it goes once I deploy it on the device!
One other thing, are you able to confirm which subsystems are required for the sample, I'm trying to reduce it to only what's needed:
Thanks, Thorbjorg :)
Hi @thorbjorgp93, we configured the sample using the default settings by MagicLeap to simplify the setup and the documentation, so I don't have a list of what is strictly necessary for the sample at the moment. That said, I am pretty sure that you need the Magic Leap 2 Support, Rendering Extension, Spatial Anchor Subsystem and Spatial Anchors Storage, but don't know much about the others. If you experiment with those, we would greatly appreciate if you could share your results with us :)
Hi @ptc-epassaro I can confirm the sample works on Magic Leap 2 (OS 1.8.0) with Magic Leap SDK 2.4.0 and OpenXR subsystems:
- Magic Leap 2 Eye Tracker
- Magic Leap 2 Reference Spaces
- Magic Leap 2 Rendering Extensions
- Magic Leap 2 Spatial Anchor Subsystem
- Magic Leap 2 Spatial Anchors Storage
- Magic Leap 2 Support
- Magic Leap 2 System Notification Control
Steps to upgrade sample:
- Create new Unity project with the 3D (Built-In Render Pipeline)
- Setup project using the Magic Leap Setup Tool
- Import Vuforia Digital Eyewear Sample project
- Update Magic Leap SDK to 2.4.0
- In XRSettingsValidation.cs script in SampleResources/Scripts/Editor, change line 22 in the script from:
using UnityEngine.XR.OpenXR.Features.MagicLeapSupport;to:using MagicLeap.OpenXR.InteractionProfiles; - Enable the OpenXR subsystems listed above.
Hi @thorbjorgp93, thanks for the awesome summary! We will definitely discuss either adding this to our documentation or update the sample directly in an upcoming release and update this ticket once a decision has been made.
Thank you again!
EDIT: just to be clear, there's one step missing: after updating the Magic Leap SDK to 2.4.0, also update the Magic Leap MRTK3 package to 1.2.0
Hi, I am trying to make Vuforia appropriately work for almost 3 weeks. I have the same problem (virtual objects shift on camera image (not overlap)) since Secondary View of Magic Leap OpenXR feature does not probably work. I do the settings below which is almost the same defined above but I cannot solve the issue. Unity 2022.3.54 Magic Leap 2 Glasses OS 1.11.0 Magic Leap Unity SDK 2.6.0 (instead of 2.4.0). MRTK 3 Package 1.4.0 (instead of 1.2.0) that comes with Magic Leap Hub 3
I tried Vuforia in different settings, but always one different feature is not working, there are 3 different main configurations are problems are below:
-
At first Vuforia never works with Magic Leap standard ML Rig. If there is any XR Session on an object Vuforia cannot start the camera (not RED camera dot appears). But if I remove XR session from the rig, then Vuforia works but ML trackings cannot work correctly, depending on different settings, either head/controller are not moving or there is an offset with real objects (for instance, controller or hands are not on real world objects, there is several cm offset).
-
Vuforia works correctly with old ML Camera (as described in sample) which is initialized from camera prefab in Magic Leap SDK packages folder and if Settings are checked as "Magic Leap" in XR Plugin Management settings in addition to OpenXR. But this time Secondary View is not working so there is a significant difference between camera image and virtual objects. If I use stereo convergence point offset decrease but not enough to showcase people. I tried what is written in this post, but not worked for me.
-
If Settings are NOT checked as "Magic Leap" in XR Plugin Management. Then everything works but this time Vuforia cannot locate objects to its correct position. Vuforia targets are visualized on floor instead of in front of me. With old ML Camera if "Magic Leap" is not checked, XR origin is not set correctly. Although I select device from anywhere I found in settings including MRTK3 settings, floor is chosen and head coordinate starts at about 1.05 meters instead of zero meter. So Vuforia thinks it is putting objects on device but actually it puts markers to floor.
I spent weeks to find a working configuration but always at least one thing works in correct. What shall I do? How can I make one of these configurations work. I prefer to make the first one work first (Make Vuforia work with XRSession), since this is Magic Leap's current working configuration. All the others are temporary solutions.
Best regards
Hi @cundeger, we missed your update, sorry for that! Some improvements to tracking on Eyewear will be included in the next version of Vuforia which might help you in the scenarios you describe. We will post an announcement on this repository when the new version is available. Hope this will help!
With the release of Vuforia Engine 11.2, the Digital Eyewear sample has been updated to use the MagicLeap SDK v2.6.0. This thread will be closed, but feel free to reopen this or open a new one if you encounter any issue.