Magic Leap 2 Remote Rendering With Unreal 5 And OpenXR
In today's blog, we're diving into Magic Leap 2's Remote Rendering features and how you can seamlessly integrate them with Unreal Engine 5. If you're as intrigued as I am about pushing the boundaries of virtual and augmented reality experiences, then you're in for a treat. So, without further ado, let's embark on this thrilling journey together!
Unveiling the Power of Remote Rendering
Picture this: you're working with complex 3D assets, and you're eager to unleash their full potential. Enter Remote Rendering, a game-changer for Magic Leap 2 users and developers alike. This feature lets you tap into the might of a remote powerhouse machine to render stunningly high-quality 3D visuals. Personally, I'm rocking a Titan RTX, which serves as my trusty host machine. But don't fret; you can achieve this magic with any RTX card. Although, it's worth noting that using 2x GeForce RTX 3090 or higher is recommended for optimum performance.
Before we delve into the details, let's kick things off with a quick demonstration by watching this video which showcases these features. Once we've had our dose of fun, we'll unravel the prerequisites and all the essentials you need to set up this remarkable system.
Laying the Groundwork: Prerequisites and More
In the world of remote rendering, certain building blocks need to be in place. Here's what you'll need before you can dive headfirst into this immersive experience:
A "Developer Pro" or "Enterprise License" is a must-have to access remote rendering capabilities.
The Magic Leap Hub should be comfortably residing on your system.
Be prepared to grant developer permissions when the Remote Rendering App launches on your ML2.
Be sure to double check your ML2 device for the latest OS (minimum 1.1.0), which you can swiftly update through the Magic Leap Hub.
Now, let's talk system requirements. Naturally, GPUs are the stars of the show, but there are a few more actors in this ensemble:
Windows 10+ is your ticket to the show, as remote rendering currently only supports Windows.
An Intel i7 or AMD Ryzen CPU is your trusty companion.
A minimum of 4 CPU cores ensures a smooth ride.
RAM should be at least 16GB, though 32GB is the recommended sweet spot.
VRAM comes next, with a recommended 6GB or even 24GB for ultimate performance.
Storage shouldn't be overlooked; ensure you have at least 512GB to house your creative ventures.
Nvidia Driver 495 or later should be comfortably installed (you can easily check your version using nvidia-smi.exe).
But let's not forget about our digital lifelines—Wi-Fi. To handle the data streaming from the remote computer to your ML2, you'll require a minimum bandwidth of 100Mbps for Wi-Fi version 5 or a recommended 500+Mbps for Wi-Fi version 6. Trust me, you'll be grateful for this robust connection.
Configuring Your Setup: Step by Step
With the groundwork laid, it's time to roll up our sleeves and get into the practical details. Follow these steps to get your Magic Leap 2 and Unreal Engine 5 ready for some remote rendering action:
Installing Magic Leap Remote Rendering: Begin by installing the necessary software for remote rendering on your ML2.
Setting up the Device for Wi-Fi Device Bridge Access: Ensure your device is ready for seamless Wi-Fi communication.
Installing Unreal Engine 5: Install Unreal Engine 5 on your system to unlock a world of creative possibilities.
Setting Up Your UE5 ML2 Project: Create your VR project within Unreal Engine 5 and get ready to transform your visions into reality.
Fine-Tuning Graphics Settings: Make critical adjustments to your project's graphics settings:
Update DirectX from DefaultGraphicsRHI_DX12 to DefaultGraphicsRHI_Vulkan by using the INI files under your project config folder or simply within Project Settings search for RHI.
Enable OpenXR under plugins.
In Project Settings, activate "Start In VR."
Enable alpha channel support in post-processing (Allow through tonemapper).
If any of these settings are updated in the future, consider reviewing the official ML2 Remote Rendering docs here.
Creating A Material: SimpleAlphaXR
This is necessary because OpenXR sends an inverted alpha value. With this material, we will convert it to control the post-processing opacity and harness the segmented dimming features of the Magic Leap 2. To set up this configuration, follow these steps:
Create a new Material
Set the “Material Domain” to a Post Process Material.
Check the "Output Alpha" option.
Add a SceneTexture and select PostProcessInput0.
Map Color to Emissive Color.
Incorporate a ComponentMask node and a OneMinus node.
Link SceneTexture.PostProcessInput0:Color output to the ComponentMask node (set to Alpha only), then to an OneMinus node, and finally into the material's Opacity input.
Putting it All Together
As you embark on this cool journey of remote rendering with your Magic Leap 2, don't hesitate to drop your questions and thoughts in the comments section. If you found this guide helpful, a thumbs-up would be greatly appreciated. And of course, if you want to stay updated on all things XR, don't forget to hit that subscribe button on my channel and ring the notification bell. Also, if you missed my previous video about setting up your Magic Leap 2 with Unity then check it out here.
Thanks for joining me today, and until next time, happy rendering!