Search Unity

VR development on Mac - current state (?)

Discussion in 'AR/VR (XR) Discussion' started by DeepShader, Sep 27, 2018.

  1. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    615
    Hello,
    is it possible to develop on an iMac Pro (Vega64) for VR right now?

    I saw some demos, sure. But does it really work seamless?

    And is it possible to develop for an Oculus Go or still only HTV Vive (without using Windows)?

    Thank you :)
     
  2. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    284
    We develop on a Standard iMac (not even Pro) using HTC Vive and SteamVR in Unity. It's about 10%-20% less performant than in Windows (the Advantage of using an iMac is having dual-boot and making sure Mac and PC Versions both work), but it works well. The greates Advantage (to me) of being able to work in OSX is that Unity's Interface is so much cleaner (a 5K Editor does wonders for editing), and direct access to apps like Logic Pro, FCPX, BBEdit and the myriad of small apps that help cleaning up small things).

    Since SteamVR is based on OpenVR I would think that it also integrates nicely with Oculus.

    -ch
     
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    7,680
    And as another data point, I'm doing all my Oculus Go development on my MacBook Pro. It works fine, although the Oculus plug-in doesn't work in the editor, so you just have to #if around any calls to it (or don't enable the object or script that accesses it). There are only a handful of those and they're easily isolated from the rest of the project, so it hasn't been a problem.
     
  4. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    615
    Yes, developing on a Mac is soooo much better in so many ways. Love it a lot *___*
     
  5. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    615
    Ok, could you explain how you develop on your MacBook Pro for Oculus Go, if the plug-in doesn't work? Because Im thinking to buy a Go as my first VR-device :)
     
  6. sfjohansson

    sfjohansson

    Joined:
    Mar 12, 2013
    Posts:
    275
    The Go is just an android device...
     
  7. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    615
    Ohhh, ok. So I just can connect it like a standard Android-phone via USB to test my stuff?
     
  8. bricefr

    bricefr

    Joined:
    May 3, 2015
    Posts:
    5
    Hello there.
    I happened to use macOS for VR development through Unity3D using SteamVR beta channel. But since Unity3D 2018.3 and/or last updates of SteamVR macOS channels, I can't seem to be able to test my games in Play mode from Unity.
    The HTC device is working when I start SteamVR from the mac (I can see the blank wireframed world and the controllers through the HUD). I enabled XR support in Unity (with OpenVR), I click Play: the game starts, no error, the main camera is active (but seems static) and nothing in the VR HUD.
    I am using an external GPU (Vega 56) and like I said: it worked those last months until a few days... I tried all the SteamVR channels on Steam (default, macOS default, macOS beta, ...) nothing. In the past they were some kind of "daily macos beta channel" (can't remember the exact name), which worked fine, but it has been apparently removed.
    One different thing is now Unity doesn't seem to start SteamVR automatically (if needed) like it did in the past.
    Does somebody use this kind of setup and can help me out please?
    Thanks.
     
    Last edited: Dec 21, 2018
  9. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    284
    There is a very sneaky bug in SteamVR that switches your project from Metal to OpenGL. You must go into the project settings, switch Metal on manually, save, and then re-start Unity. Look at Unity's main window title. If it says 'OpenGL' you need to switch, if it says 'Metal' you are good to go.
     
  10. bricefr

    bricefr

    Joined:
    May 3, 2015
    Posts:
    5
    Hello. Thanks for your reply, I checked my setup: I am in "Auto Graphics API for Mac" and I have <Metal> in the title bar :( I tried disabling Auto Graphics and removing OpenGL. Still nothing. I may have to check the libraries used for the VR (HTC.UnityPlugin) maybe there is something outdated in there.
     
  11. bricefr

    bricefr

    Joined:
    May 3, 2015
    Posts:
    5
    Ok so sorry for that, I found the problem (guess speaking helps :p): the OpenVR support is in a Unity package now, and apparently not imported automatically (on macOS at least I guess). I imported it and it's working now. Thanks for your help csofranz.
     
  12. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    284
    We now have built a mac mini (2018, i7, 32 GB RAM) and added a Vega 64 via eGPU. I am very disappointed to see that in this configuration, SteamVR performs only at roughly 50% of what we get when we boot the Mac into Windows. If the Mac wants to be a serious contender for VR apps, Steam and Apple should sit together and optimize the HELL out of their VR implementation. This is with the VIVE, and we are somewhat apprehensive of what we'll see with the Vive PRO, which we are currently setting up in the test studio.
     
  13. duzbot

    duzbot

    Joined:
    Aug 31, 2017
    Posts:
    4
    I am having no luck getting VR Vive to work on Mojave 10.14.1 2017 Macbook Pro with Vega 56 EGPU on Unity 2018.2 + 2018.3
    I have imported OpenVR in the package manager and of course SteamVR
    SteamVR works normally.
    Starting the Simple Sample i get a host of errors. If I try setting up SteamVR input then Unity crashes. It's been in this state for 3 months. I'm surprised to hear that some of you guys are running it ok.
     

    Attached Files:

    Last edited: Jan 13, 2019
  14. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    284
    Well, I'm using 2017.4 so I wouldn't really know how 2018 reacts. My setup is a mac mini with eGPU and Vega 64, so it is quite similar. from the errors you are receiving, your projetc's SteamVR setup seems corrupted.

    I recommend you try the following:
    1. create a new project - note that I don't know what the correct pipeline is for vr in 2018
    2. re-download SteamVR
    3. Import steam VR into your project, and accept all setings from Steam except the Windows64 build. Make sure to not import anything else.
    4. Save and close the project (do not do anything except importing)
    5. Load the project, go to project settings, and ensure that you have METAL active, and switch to linear color space, then save and quit unity
    6. When you start up now, the window title sould show Metal instead of OpenGL
    7. Create a new scene, add a cube, add the steamVR rig, remove the original camera. Save scene, and run it.

    Do the errors still occur?

    (you may also need to import the OpenVR package)

    -ch
     
    Last edited: Jan 14, 2019
  15. duzbot

    duzbot

    Joined:
    Aug 31, 2017
    Posts:
    4
    Thanks for your help.
    Unfortunately errors still occur!
    Which beta branch are using for SteamVR?
    Has anyone tried SteamVR beta plugin from Github?

    If I try moving the actions.JSON file to the root like in this report
    https://github.com/ValveSoftware/steamvr_unity_plugin/issues/265

    Then the scene will at least start but I will get terrible performance + controllers are not visible (in the interactable example scene)
     
  16. cf42

    cf42

    Joined:
    Dec 19, 2018
    Posts:
    4
    Hello! I'm thinking of using Unity for Steam VR development on my MacBook Pro (+ an eGPU) under macOS 10.14.3. I do have a Windows 10 PC, but prefer to use the Mac for development if possible. Headset is a HTC Vive.

    What's the current state of play, is this viable with the current version of Unity and Steam VR or am I likely to run into lots of issues?

    Many thanks.
     
    Last edited: Mar 12, 2019
    JoeStrout likes this.
  17. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    284
    While the whole experience on the Mac is superior in almost any regard, the performance loss is still disappointing. If VR development is viable on your Mac depends on which mac you have, and what GPU sits in your external case. We are using a AMD Vega 64 and it can drive a Vive PRO, but we still get some occasional image drops on one eye every now and then, which doesn't happen when we boot into windows and run the exact same project on the exact same hardware.
     
    cf42 and JoeStrout like this.
  18. cf42

    cf42

    Joined:
    Dec 19, 2018
    Posts:
    4
    Thank you, that's very helpful.

    The MBP has a quad-core 3.1Ghz Core i7 and the eGPU would initially contain a Radeon 580 Nitro+, though I'd look to upgrade the card in the future if needed.

    What I'm most interested in is the software compatibility between macOS, SteamVR and Unity. It sounds like that's not a problem, albeit that there may be some performance issues in macOS vs Windows? I'm keen not to reboot into Windows, in fact, I have recently removed Bootcamp from the MBP as I found Bootcamp somewhat temperamental.

    What I'm exploring is the practicality of developing under macOS and doing most of my testing on there, but then doing occasional testing on a PC with exactly the same model of headset.
     
    Last edited: Mar 12, 2019
    JoeStrout likes this.
  19. chilton

    chilton

    Joined:
    May 6, 2008
    Posts:
    466
    Performance might not be there yet, but I love being able to finally do my work on my MacBook Pro. My i7 2018 works pretty well with a Vive, even without an eGPU. Well enough that I don't use my PC anymore, except for testing.
     
    JoeStrout and cf42 like this.
  20. cf42

    cf42

    Joined:
    Dec 19, 2018
    Posts:
    4
    Thank you - that's very encouraging! May I ask what GPU you have in your MBP 2018? Mine's an earlier model and has the Radeon Pro 560, hence my thoughts on using the eGPU.
     
  21. chilton

    chilton

    Joined:
    May 6, 2008
    Posts:
    466
    I have the Radeon Pro 560X 4096 MB.
    Again, the performance is definitely not there for a lot of stuff, but it's more than enough for basic work. For example, I recorded this yesterday...

     
  22. cf42

    cf42

    Joined:
    Dec 19, 2018
    Posts:
    4
    Thank you Chilton, that's very helpful, thank you for posting the video.
    Looks like developing under macOS is perfectly viable. Good news!