Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question MARS Session Camera issue

Discussion in 'Unity MARS' started by xhkong, Nov 19, 2020.

  1. xhkong

    xhkong

    Joined:
    Jul 2, 2020
    Posts:
    26
    I was following the MARS face-tracking manual. When I copied the MARS session object and facemask object from the FaceTracking template scene into my scene. MARS Session automatically turns the background of my scene into the camera view.

    How do I turn that off?

    So I have two cameras in this scene now, one from my original setup and another from MARS camera. I want to render the MARS camera view into a texture instead and still showing my other game camera's view on the screen.

    Is there a way to do that in MARS?

    Thanks in advance!
     
  2. amydigiov_Unity

    amydigiov_Unity

    Unity Technologies

    Joined:
    May 24, 2016
    Posts:
    15
    Hi, I want to make sure I understand your question correctly. Are you asking how to set up your scene such that the camera under the MARS Session renders to a texture while another camera renders to the game view?

    If so, it sounds like the issue is that both cameras have the same depth, so the one that renders to the game view is the most recently enabled camera (the MARS camera). To fix this you can either change the "Depth" value of the MARS camera to a lower value, or change the Depth of the other camera to a higher value. To get the MARS camera to render to a texture, first create a Render Texture asset ("Assets -> Create -> Render Texture") then assign that Render Texture to the "Target Texture" field of the Camera component under the MARS Session.