Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Does URP Camera Stacking work on OpenVR?

Discussion in 'VR' started by djlins, Jun 11, 2020.

  1. djlins

    djlins

    Joined:
    Jun 15, 2013
    Posts:
    23
    I am having real troubles with URP camera stacking for the SteamVR Vive and Rift headsets.

    As the simplest of tests I have installed the latest unity (2019.4.0) and then started a new URP project. Then imported the SteamVR unity asset.
    Then opened the scene - \\Assets\SteamVR\InteractionSystem\Samples\Interactions_Samples.unity
    So it is the base steamvr sample scene for unity.
    All is good, if I run it, I can mess about in the world in my headset.

    I now introduce a cube and give it a new layer (TestOverlayCamera)
    I introduce a new camera and set the culling to be only "TestOverlayCamera" and set it to be an OVERLAY camera
    I set the VR camera culling to be everything but TestOverlayCamera
    again all is good, I cant see the cube.

    I add the overlay camera to the VRbase camera's stack
    I still cant see the cube, but I can see it on the camera view on my editor window.

    Are SteamVR cameras just not set up to handle URP camera stacking or has anybody managed to get this going?

    Cheers,

    Lindsay.
     
  2. djlins

    djlins

    Joined:
    Jun 15, 2013
    Posts:
    23
    It is definitely only the SteamVR headset camera that has these issues. If I unplug the headset so that it forces the demo scene to play through the game panel through the FallbackObjects Camera then it does show the cube on the overlay camera rendered over the primary camera.

    So it is a fundamental difference with just the SteamVRObjects\VRCamera and the NoSteamVRFallbackObjects\FallbackObjects

    I think that it is pointing towards a bug then with the SteamVR. Would anybody be able to sanity check my reasoning?
     
  3. algorithmicvertex

    algorithmicvertex

    Joined:
    May 22, 2016
    Posts:
    8
    Having the same issue, did you find a solution to this?

    Thank you
     
  4. djlins

    djlins

    Joined:
    Jun 15, 2013
    Posts:
    23
    Hi there,
    It seems that URP camera stacking didn't work in Unity 2019 (at least not very well)
    They claim to be introducing it properly in Unity 2020. See point 2 here for the announcement:
    http://www.cgchannel.com/2020/07/discover-5-key-features-for-cg-artists-in-unity-2020-1/
    If you are doing a production release of something then they still recommend using Unity 2019 but depending on how important camera stacking is to your project you might want to gamble on a production release using 2020?
     
  5. m-i-e-c-z

    m-i-e-c-z

    Joined:
    Nov 10, 2010
    Posts:
    27
    Hey guys! I bumped into this recently. But I've figured out a workaround. You can use a custom URP Renderer and add a rendering feature to render UI on top of the cameras (ignore it's Z depth essentially). That worked for me:

    upload_2020-12-31_15-0-44.png
     
    sfoust likes this.