Turning off one light engine (monocular)

Is it possible to disable one of the light engines on the Magic Leap 2 in order to create or simulate a monocular setup?

Hey @rexpiyum,

Welcome to the Magic Leap Developer forums!

If you are developing in Unity, you should be able to set the camera to target 1 eye (left or right) instead of both.

You might also need to enable multipass rendering in your XR settings.

1 Like

In the ML Rig prefab > Camera Offset > Main Camera > > Output > Target Eye only has None and Both no left eye or right eye . If we want to change it to say left eye , do we need to script that , if so , how can we override the setting on the Output ?

This dropdown only shows Both or None? Do you have multi-pass rendering enabled?

@shiveeshfotedar,

Adding on to what El said, I think it might depend on what Unity version you are using.

In Unity 2022.3.49f, I am also not able to target left or right eye, only both or none, even with multi-pass rendering enabled in my project.

If you are using the Built in Render Pipeline, you could try setting the camera target eye via script like in the following documentation

If that doesn't work for you please let us know!
I will get more suggestions for you to try out if that is the case.

Hi , Yes even I can only see Both and None ,

This is the script that I attached to my Main Camera ( ML Rig > Camera Offset > Main Camera ) I dont see any changes , I am not getting any errors either.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Monoculor : MonoBehaviour
{
public Camera xrCamera;
// Start is called before the first frame update

void Start()
{
    xrCamera.stereoTargetEye = StereoTargetEyeMask.Right;
}

}

I have the Output option in the Camera Component of the Main camera, Target Display set to Both, while my script is attached. When I put it to None , the Unity project is not running on Magic Leap . It gets stuck on the Starting Unity logo.

My render mode is Mulit-pass
My Unity version is 2022.3.53f1

1 Like

thanks @cfeist.

Target eye left/right works when you use "Built in Render Pipeline". The options show up on the UI as well.

You will have to assign two separate cameras to two eyes and set background to Black "000000" on the camera that you don't want any content. It will make the device practically monocular.

Unity version is 2022.3.53f1

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.