Search Unity

HDRP + VR - Target Eye - None (Main Display)

Discussion in 'High Definition Render Pipeline' started by rtilton1, Mar 24, 2020.

  1. rtilton1

    rtilton1

    Joined:
    Jan 4, 2017
    Posts:
    62
    In the default Unity pipeline - it's easy to create a scene with a VR camera rig and then create an additional camera as a 3rd person cam that will display on a computer monitor when the .exe is running. This allows one user to see the stereo vr camera rig when wearing the headset while others outside of VR can see the scene from a 3rd person view. To do this I'd just set my additional 3rd person camera to Target eye > None (Main Display)

    With HDRP - the camera no longer has a "Target Eye" property. Thus I can't create a 3rd person camera. I tried changing the depth of the camera, but then it overrides the VR camera viewer. Any idea how I can achieve this with HDRP?

    Any advice or leads would be appreciated...
     
  2. fabien-unity

    fabien-unity

    Unity Technologies

    Joined:
    Oct 17, 2018
    Posts:
    60
    Hi,
    Right, at the moment all cameras will render in VR unless they have a render texture.
    We're working on improving this. Stay tuned !

    Fabien
     
  3. fabien-unity

    fabien-unity

    Unity Technologies

    Joined:
    Oct 17, 2018
    Posts:
    60
  4. rtilton1

    rtilton1

    Joined:
    Jan 4, 2017
    Posts:
    62
    @fabien-unity YOU ARE THE BEST!!!! I used your PR's and it worked!!! I'm so grateful for your help as I can now launch my project without porting it to the default pipeline. Thank you, thank you, thank you!!

    My only feedback is that it would be ideal if I could also target my 3rd person cam (camera with XR Rendering off) to receive post effects and also target my XR camera to *not* receive post effects. This would improve my FPS as it would only be applied to 1 camera rather than 3 cameras (each eye and 3rd person cam). I know this is possible in the default pipeline, but targeting post effects doesn't seem to be an option with HDRP.

    Regardless of the post-effects - being able to do render textures, 3rd person cameras and proper camera culling - opens a huge range of possibilities for me with HDRP and VR! I have several projects in the works that will all use this. Thank you so much!!!
     
  5. fabien-unity

    fabien-unity

    Unity Technologies

    Joined:
    Oct 17, 2018
    Posts:
    60
  6. rtilton1

    rtilton1

    Joined:
    Jan 4, 2017
    Posts:
    62
    Ahh - that's wonderful. Just got a 30fps boost from removing those post effects from the VR camera. Thanks! I'll keep you posted if anything new comes up in the future. This is wonderful!!
     
  7. rtilton1

    rtilton1

    Joined:
    Jan 4, 2017
    Posts:
    62
  8. fabien-unity

    fabien-unity

    Unity Technologies

    Joined:
    Oct 17, 2018
    Posts:
    60
  9. rtilton1

    rtilton1

    Joined:
    Jan 4, 2017
    Posts:
    62
    Got it! Thanks! Will do that.
     
  10. simozampa

    simozampa

    Joined:
    Jun 19, 2018
    Posts:
    2
    @fabien-unity Hi, I am experiencing the same issue but the GitHub link is not working anymore.
    What should I do?
     
  11. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,684
  12. simozampa

    simozampa

    Joined:
    Jun 19, 2018
    Posts:
    2
    @eizenhorn Thanks for the link but I can't find pull #6372. Any suggestion?
     
  13. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    The PR is already merged in the mainline and backported for next 8.1.0 packages. So it doesn't exist in Graphics. you can still cherry pick the commit of the PR if you need.
     
  14. Soundguy

    Soundguy

    Joined:
    Oct 30, 2009
    Posts:
    49
    How do i make my camera not render into VR and be used as the main camera on the PC - using URP in unity 2020.1 ?
     
  15. korinVR

    korinVR

    Joined:
    Jul 7, 2012
    Posts:
    34
    Hi, I'm facing the same issue. I couldn't find the method to use the HDRP 3rd person camera from this thread. And I would like to know whether it is possible on URP.
     
  16. Usernotfound8

    Usernotfound8

    Joined:
    Oct 16, 2017
    Posts:
    1
    I just figured it out in URP try going to the debug settings and setting target eye = 0 (for nonVR cameras just like you do in the regular render pipeline). Hope this helps!
     
  17. beijerxingredient

    beijerxingredient

    Joined:
    Oct 29, 2020
    Posts:
    1
    Hi the latest pull request is numbered #2441? Am I missing something.

    Or is there another way to get a non-VR view on an external monitor?

    Thanks!
     
  18. Soundguy

    Soundguy

    Joined:
    Oct 30, 2009
    Posts:
    49
    how do yo uaccess these debug settings?
     
  19. Trailzendesigns

    Trailzendesigns

    Joined:
    Jul 17, 2019
    Posts:
    1
    In URP, you can switch the inspector to debug display (top right ... menu on the inspector pane), and you will be able to access the TargetEye setting for your spectator camera. Set it to '0' for 'none-(main display)'. Probably works the same for HDRP
     
    Jordylicious and CharlstonChew like this.
  20. Jordylicious

    Jordylicious

    Joined:
    Feb 18, 2020
    Posts:
    2
    I've been looking everywhere for this! Thank you so much!
     
  21. scot9000

    scot9000

    Joined:
    Apr 27, 2021
    Posts:
    1
    Could you tell me how I access the commit?
    I'm trying to render a camera with HDRP 10.5.1 on one eye only, but it keeps rendering on both eye when I change the Target Eye settings in the debug inspector view. Using Unity XR plugin management in Unity 2020.3.16f1.
     
  22. BinariJames

    BinariJames

    Joined:
    Mar 21, 2021
    Posts:
    2
    Hello, how can I get the fix for this? Link to PR is broken. I am using 2019.4.31f1 and can't render a spectator camera in VR, which makes it difficult to get quality screen captures
     
  23. frpe1

    frpe1

    Joined:
    May 4, 2020
    Posts:
    10
    I have land into the same issue as above!. Is there any fix for this yet ?
     
  24. TheCoreOfTheEarth

    TheCoreOfTheEarth

    Joined:
    Apr 2, 2022
    Posts:
    1
    I'm also having this issue in 2021.2.11f1. What was the fix PR's commit?
    And setting the target view to 0 in the debug inspector doesn't work for me unfortunately.