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:
    682
    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:
    1,556
    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:
    9,859
    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:
    682
    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:
    682
    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:
    369
    The Go is just an android device...
     
  7. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    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:
    61
    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:
    1,556
    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:
    61
    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:
    61
    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:
    1,556
    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:
    17
    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:
    1,556
    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:
    17
    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:
    1,556
    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:
    564
    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:
    564
    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!
     
  23. blaineL

    blaineL

    Joined:
    Apr 20, 2016
    Posts:
    3
    Hi everyone - wondering if anyone could point me in the right direction with where/what the current working items are needed to get Unity up and working for VR development using a new VivePro and an iMacPro with the internal Vega64.

    Steam VR (Mac beta) doesn't seem to work as when launching (clicking Play) as the app switches to 'running', the headset turns on and goes white for a few seconds, then the Steam window then closes, checks for an update (which there is none), then opens again with Steam VR not running.

    FYI -
    I'm using a USB-C to Minidisplay cable (this one from Amazon https://www.amazon.com/DisplayPort-Thunderbolt-Compatible-MacBook-More-6Ft/dp/B07P8RXQ79).

    Also came across some discontinued versions of ARKit that took me for a loop.

    Has anyone documented the steps to get this up and running?

    Appreciate and direction to get me started.

    Thanks!
     
    Last edited: May 10, 2019
  24. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    You must also make sure (in Project/Player settings) that Metal is enabled, then restart Unity. The window title must contain 'Metal' (not OpenGL), and VR will work with steam VR
     
    blaineL likes this.
  25. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    461
    Hi there.
    I'm on OSX with a Macbook Pro. Running Unity 2018.3.
    I'm about to run some tests in the Oculus GO. I'd prefer to work in OSX, vs. rebooting into bootcamp or getting a Winbox.
    Are there GO solutions that one can download, or purchase in the app store, that don't require the Oculus SDK?

    If not, does someone have the Oculus sdk scripts that have been #if'd, so it will work during Authoring?

    As per what Joe posted previously.
    "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."

    Thanks.
    /S
     
  26. dwatt-hollowworldgames

    dwatt-hollowworldgames

    Joined:
    Apr 26, 2019
    Posts:
    104
    oculus integration is totally not needed at all. You can just use XRInput and Tracked Pose Driver.
     
  27. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    461
    Thanks, David.
    Very good to hear that!
    I'll see if i can figure out how to use those.
    /
     
  28. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    461
    Hi.
    Does anyone have some links to docs or videos, or specific assets in the asset store, that would be helpful to get basic VR working on the Oculus GO using Unity on a Mac?
    I'm more artist/designer, than coder.
    Thanks!