I would like to use WorldViz Vizard 8 python (3.13) code running on a Dell Alienware Windows PC to illustrate semitransparent colored cylinders on a Magic Leap 2 headset in real space (for example). I want to create this rendering using Vizard 8 with the OpenXR module and the Magic Leap 3 Hub software to create a remote rendering of the assets generated in the Vizard 8 python code onto a Magic Leap 2 headset through a wifi connection. Please provide suggestions on how to set up the environment blend mode to create a passthrough feature. Currently, a black screen is seen behind the cylindrical assets when these objects lie in the viewing window of the headset. Otherwise, a black screen blocks the user's view of the real world when not viewing the cylindrical objects. I am trying to convince WorldViz support (we currently have license support) to set up this passthrough feature for the ML2, since the passthrough feature presently exists for the Quest 3 and Varjo headsets and soon to be on the new Vive headsets for Vizard 8. Let me know if this would be better to discuss offline with Magic Leap staff. Thanks.
Mark J
Here’s some info that might help you set up the passthrough feature for your Magic Leap 2:
Setting the Blend Mode in OpenXR
To get the passthrough working properly and avoid that black screen, you’ll need to set the environment blend mode in OpenXR to XR_ENVIRONMENT_BLEND_MODE_ADDITIVE
. This mode stops the segmented dimmer from kicking in and should keep the real-world view visible behind your cylindrical assets.
Check out Magic Leap’s docs on blend modes for more details:
Environment Blend Modes - Magic Leap Developer Docs
Adjusting the Segmented Dimmer
If you want to use the segmented dimmer for certain objects, Magic Leap 2 uses the alpha channel to control it when the blend mode is set to XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND
. When an object renders with an alpha value of 0 the dimmer will not be enabled and values above 0 will result in the dimmer increasing all the way to alpha 1 which enables the dimmer at full intensity.
So, you can tweak the alpha values of your objects in Vizard 8 to get the effect you want.
Regarding Skybox Issues
If your skybox looks opaque and blocks the passthrough view, make sure it’s rendering with an alpha value of 0. That should prevent the dimmer from applying to the background.
Working with WorldViz
If you are having trouble changing the Blend Mode in WorldViz or if you are not able to set the alpha value to 0 then you may want to reach out to them to get information or support on how to implement this OpenXR feature.