Search Unity

XR Camera Layers for long view distances?

Discussion in 'AR/VR (XR) Discussion' started by RetroFlight, Jul 5, 2020.

  1. RetroFlight

    RetroFlight

    Joined:
    Nov 16, 2019
    Posts:
    41
    Hey All,

    I'm trying to set up multiple cameras for long view distances. I had this working fine with OVRCamera Rig, but since switching to XR I can't get it to work properly.

    Main Camera - Nearclip/Farclip: 0,01 -> 1,000 - Depth: 0 - Clear Flags: Depth only
    Far Cam - Nearclip/Farclip: 1,000 -> 10,000 - Depth: -1 - Clear Flags: Solid Color

    On the Oculus Quest you only see the main camera's clipping distances, with the far camera's solid color as a clear. I can't get the "layered" camera effect so one camera sees the foreground, one camera sees the background so I can get around z-clipping issues at long distances.

    I have tried with and without a tracked prose driver on the far cam, and also have it as a child of the main cam so it gets the proper movement. In the editor I can see the two camera's properly but it does not work on the Oculus Quest.

    Any ideas?

    Thanks!!
     
  2. RetroFlight

    RetroFlight

    Joined:
    Nov 16, 2019
    Posts:
    41
    Hey All, just wondering if anyone has figured out how to have multiple camera's using the XR rigs?
     
  3. Mulbin

    Mulbin

    Joined:
    Feb 8, 2016
    Posts:
    64
    Bumping this as I have the same problem. Is XR just not fit for purpose for large area space sims?
     
  4. BrBarry

    BrBarry

    Joined:
    Jul 16, 2019
    Posts:
    10
    Maybe check out the new 'stack' setting with overlaid camera settings in the 'main camera'. I've seen it there but haven't had a good play with it yet. I can see that there are no clear flag settings anymore.
     
  5. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    296
    I have gotten this working. I'm not quite sure why it's not working for you, but you may want to disable post processing and play with your urp settings (particularly the depth buffer setting)
    https://m.youtube.com/watch?v=HoC-xfeNZ84