About
Applications
HoudiniUnreal EngineUnity 3DNukeMayaBlenderZBrushPythonMixed RealityMachine LearningGraphic DesignExtrasAboutSetup
Magic Leap Lab
Installations
- Install the
Magic Leap Lab
from https://developer.magicleap.com/downloads/lab. - Install
Lumin SDK
.
Installation Dir:
C:\Users\<username>\MagicLeap\TheLab
Installation Dir:
C:\Users\<username>\MagicLeap\mlsdk\v0.25.0
Packages
- Install
NVIDIA Nsight Graphics
&Nsight Systems
: https://developer.nvidia.com/gameworksdownload - Install
Device Bridge
,Device Stream
, andZero Iteration
viaPackage Manager
for PC management of linked ML device.
Certificates
Management
- From ML developer account, generate developer certificate for testing to ML device.
- Certificate and accompanying key need to be stored together in the same directory.
- Developer certificates expire 1 year after being issued.
UE4 Workflow
Project Settings
Installations
Currently employing Epic Games Store Version of Magic Leap UE4, which is based on UE4 4.24.2
and uses Lumin SDK 0.24.0
.
Installation Dir:
C:\MLDev\MagicLeapUE4Editor
Project Settings
- Configure project for Magic Leap via
Project Settings
>Platforms
>Magic Leap
>Magic Leap App Tile
>Configure Now
. - Set path to certificate in
Project Settings
>Platforms
>Magic Leap
>Distribution Signing
>Certificate File Path
. - Specify SDK path in
Project Settings
>Platforms
>Magic Leap SDK
>SDKConfig
. - Restart UE4 editor.
Build Settings
Package & App Name
Project Settings
> Platforms
> Magic Leap
> MPK Packaging
>
Magic Leap Package Name
Application Display Name
Naming convention
com.Company.ProjectName
Example
com.Hans.Sandbox
This is the name to be displayed if ProjectName
not specified in Package Name
parameter.
Icons (App Tiles)
Requires Model & Portal folder.
Project Settings
> Platforms
> Magic Leap
> Magic Leap App Tile
Reference: https://developer.magicleap.com/en-us/learn/guides/portal-icon-guidelines
Privileges
- Types
- Auto-granted
- Sensitive
- Requires user consent.
- Reality
- Requires user consent.
- User consent requested on first request and not prompted for each session.
- Privileges located in
Project Settings
>Platforms
>Magic Leap
>Advanced MPK Packaging
>App Privileges
Reference: https://developer.magicleap.com/en-us/learn/guides/privileges
Simulator & Device Testing
Preview Testing in ML Device
- Start
Zero Iteration
fromLab
and set toDevice
mode. - Launch UE4 and open UE4 project.
Play
>VR Preview
to view/interact with game in ML device.
Preview Testing in Simulator
To re-enable mouse controls when UE4 preview runs, press SHIFT
+ F1
.
Eye View Window Controls
Name | Shortcut | Notes |
---|---|---|
View Navigation |
| |
Scene Navigation (Forward, Backward, Right, Left, Up, Down) |
|
Development
Control
Frame Definition (UE4)
- Origin: Center of touchpad
Video capture of axis superimposed on control through Magic Leap device.
Reference: https://developer.magicleap.com/en-us/learn/guides/control-6dof-unreal-engine
Resources
Starter Magic Leap Dev Guide for UE4
Samples, Tutorials & Snippets
https://developer.magicleap.com/en-us/learn/guides/unreal-tutorials-samples
UE4 Examples
Overview
Some of the documented examples provided by Magic Leap and UE4 include the following. My testing and documentation notes are outlined in the next sections.
- Controller
- Hand Tracking
- Image Tracking
- Detect & track image targets.
- Meshing
- Scan world environment for collision data, occlusion.
- Planes
- Raycast
Reference: https://developer.magicleap.com/en-us/learn/guides/sdk-examples-landing-page
UE4 Example Files
Project Directory
C:\Users\<username>\MagicLeap\tools\unreal\v0.24.1\examples\Unreal
Documentation
C:\Users\<username>\MagicLeap\tools\unreal\v0.24.1\examples\Unreal\Content\Examples\Documentation
Testing & Documentation
Image Tracking
Image Tracking BP & Event Graph
Details (MagicLeapImageTracker
component)
Image Tracking
>MagicLeap
>Target Image Texture
Longer Dimension
- This is the physical image target size in UE dims,
cm
. - Components
MagicLeapImageTracker
- Enabled
Events
On Image Target Found
On Image Target Lost
- These drive event/s such as hiding/unhiding target asset/s.
- Position of target asset/s are at the origin of BP.
- This component serves as the parent to any assets intended to be linked as children to image tracker/target.
GetWorldLocation
- This is an alternative way of positioning an asset relative to the
MagicLeapImageTracker
.
Reference: https://developer.magicleap.com/en-us/learn/guides/image-tracking-unreal-engine
Assets
The asset used in this test is a burrito model that I generated in Houdini and have been using as a test subject in my computer graphics exploration. It was imported into the UE4 project as a .glTF file and through UE4's glTF Importer
plugin.
Testing on Magic Leap
Image tracking test on Magic Leap device. Recording via The Lab and Magic Leap device utilized camera, so the image tracking was not functioning when recording. However, this video captured the digital version of the experience, but not the mixed reality environment. Although the physical image tracker is not visible in this capture, it was used to test the tracking stability. The test used a good image for tracking, but still showed some instability..
Initialize Scene
Specify the actor intended to be the focal point of the initial interaction within the ML experience with Event BeginPlay
> Set Focus Actor
in the Level BP
.
Raycast
Capture Documentation
Reference: https://www.magicleap.care/hc/en-us/articles/360020300672-Capturing-Screenshots-and-Video
Zero Iteration
Use The Lab
> Zero Iteration
to enable deployment from tools such as Unity and UE to a connected Magic Leap device or the simulator. This needs to be enabled before recording video to capture the mixed reality experience.
Recordings via Magic Leap device
These captures are recorded through the Magic Leap device by pressing the Home
button on the controller and then tapping the Bumper
button to start/stop recording.
Recording can also be enabled via the Magic Leap mobile app.
Using The Lab
> Device Bridge
, the recordings are listed in the Files
section and can be downloaded to the the computer. These files are saved to the following directory:
C:\Users\<username>\MagicLeap\downloads
Recordings via Device Stream
When enabled in The Lab
, content streamed from use of Magic Leap device can be recorded to snapshots and video. These files are saved to the following directory:
C:\Users\<username>\MagicLeap\captures
Resources
Control
https://developer.magicleap.com/en-us/learn/guides/control-6dof
Magic Leap Controller GLB file
Source: https://aframe.io/docs/1.2.0/components/magicleap-controls.html#example
Notes
Lighting
Use cubemap with PPV rather than directional light
If it results in an issue with viewing the scene when packaged, then disable this cubemap and instead using a Skylight and set to Movable and set the Cubemap here.
Set interactive actors to Movable, not Static.
Packaging
Disable Project Settings > Project > Packaging > Exclude editor content when cooking to expedite and optimize .MPK file.
Navigate to the Builds directory.
Install_UsingML.bat
Run this file.
Uninstall_UsingML.bat
ApplicationFile.mpk
Launch > Project Launcher > Advanced
Select Magic Leap One Creator Edition
> Data Build
> By The Book
Then Launch
.
When log shows Launching on Lumin, then it should be running on device.
On This Page
- Setup
- Magic Leap Lab
- Installations
- Packages
- Certificates
- Management
- UE4 Workflow
- Project Settings
- Installations
- Project Settings
- Build Settings
- Package & App Name
- Icons (App Tiles)
- Privileges
- Simulator & Device Testing
- Preview Testing in ML Device
- Preview Testing in Simulator
- Development
- Control
- Resources
- Starter Magic Leap Dev Guide for UE4
- Samples, Tutorials & Snippets
- UE4 Examples
- Overview
- UE4 Example Files
- Testing & Documentation
- Image Tracking
- Raycast
- Capture Documentation
- Zero Iteration
- Recordings via Magic Leap device
- Recordings via Device Stream
- Resources
- Control