Search Unity

VR on macOS preview build

Discussion in 'VR on macOS Preview' started by aet, Jun 5, 2017.

  1. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    External monitor on the eGPU
     
    Tom-Chen likes this.
  2. jm999

    jm999

    Joined:
    Feb 10, 2014
    Posts:
    5
    I can confirm that the frame rate is WAY better now with the latest SteamVR update. The example scene in the SteamVR plugin (sea of boxes) runs on my new 13 inch MacBook Pro + eGPU devkit + Vive HMD at about ~140 fps (~7ms per frame).
     
    aet and elbows like this.
  3. aet

    aet

    Unity Technologies

    Joined:
    Jun 5, 2014
    Posts:
    44
    Hey! Sorry for delayed response, I was on vacation for few days. :) There's now a new preview build #3 out that's based on 5.6.2p2, it should have the fix included. See first post for details / link
     
    DiscoFever, JagCesar and elnacho like this.
  4. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    Will this fork be merged with 2017.x ? When ?
     
  5. aet

    aet

    Unity Technologies

    Joined:
    Jun 5, 2014
    Posts:
    44
    All the changes are in 2017.2 beta, but single-pass isn't enabled yet
     
    elbows likes this.
  6. dpentecost

    dpentecost

    Joined:
    Apr 3, 2009
    Posts:
    136
    Hi folks - I just got all this running pretty well on a 2013 Mac Pro/Unity/SteamVR/Vive - pretty happy with it. Many thanks to Unity, Apple, Steam for this finally happening!

    But just so I am clear - I can view and interact while running in the Unity editor, but a MacOS build does not play in VR. I am guessing you cannot make a MacOS build that runs in VR, only a Windows build. Is that the case?

    Related, how do I go about building an app and putting it on Steam? Will I then be able to view it on Steam (on my Mac!)? I'm not familiar enough with the VR ecosystem (being a late arriving Mac guy) to understand that part of it. Or are we just not there yet?
     
  7. JagCesar

    JagCesar

    Joined:
    Jun 27, 2017
    Posts:
    5
    I'm running a MBP 13" late 2017 with touchbar and I can export builds from unity that play in VR. I'm fairly new to the "game industry", so I might have misunderstood your question.

    If you want to get your game on Steam you should look into Steam Direct.
     
  8. dpentecost

    dpentecost

    Joined:
    Apr 3, 2009
    Posts:
    136
    Thanks for the response. You are exporting a build for MacOS, correct? When I tried, I got a black screen. Is there a build setting I am ignoring? (VR, OpenVR selected, Metal enabled in my setup.)

    I'll keep trying and see what I come up with. If I can export MacOS builds I don't need the game on Steam, for now.
     
  9. aet

    aet

    Unity Technologies

    Joined:
    Jun 5, 2014
    Posts:
    44
    OpenVR on standalone Mac application should work. Is it 64bit only app?
     
  10. dpentecost

    dpentecost

    Joined:
    Apr 3, 2009
    Posts:
    136
    Okay, seems to be building fine. I may have picked a scene that was too complex before. I did wonder, when playing the build, why I was getting a grey screen on the monitor while it looked fine in the headset. Checking Windowed in the app startup display fixed that.

    For the benefit of other folks just starting up, I will try to post other simple tips I run across.

    And thanks to aetfi for keeping us all posted on new software builds as this thing evolves. With 2017.1 just out, it may be time to try this with a non-beta Unity release. Timeline + Cinemachine + VR = a great summer project!
     
  11. dpentecost

    dpentecost

    Joined:
    Apr 3, 2009
    Posts:
    136
    Another update on my setup (2013 Mac Pro, not EGPU) - I am finding the limits of what I can throw at it, but it seems that using Unity 5.6.2xMacVR-p2 works better than the latest 2017.2 beta.

    Using 5.6 with a fairly simple scene I get 170-180 frames and smooth panning when moving my head. With the 2017 beta, same scene, I get 130 frames which should be fine, but significant jittering and doubling when panning.

    I'm running it on a High Sierra beta but it may not be the latest. I am also wondering if we will see a SteamVR update that helps this.

    Is anyone else running into a performance drop with the 2017.2 beta?
     
  12. aet

    aet

    Unity Technologies

    Joined:
    Jun 5, 2014
    Posts:
    44
    Single-pass rendering isn't enabled yet in 2017.2 beta, so if you're expecting that to work, that'll probably explain the slow-down
     
  13. RmvZ3

    RmvZ3

    Joined:
    Sep 29, 2016
    Posts:
    5
    Just to be clear. I have a MacBook Pro with HTC Vive and a GTX1070 eGPU which runs perfect on Bootcamp but I've always used Unity on macOS and I'd prefer not having to use Windows except for gaming. I'm about to install the new High Sierra GM. Will I be able to use Unity (mac version) to develop for my Vive or the Nvidia card will avoid the HMD from being recognized by Unity? Are there new Nvidia drivers now that High Sierra is GM?

    Thanks
     
  14. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    High Sierra does work with Apple's eGPU DevKit (which I have) it has AMD RX580 and Unity (VR Build) works fine with Vive; I've been able to work seamlessly on our VR Projects.

    Regarding Nvidia, there are some rumors that some have succeeded with Build 9 but it stopped worked on the build 10 (which I believe is the last one, the GM Candidate)

    I believe there will be another iteration before final release, as it's only a 'Candidate'. For sure, if you go with AMD it should work.
     
  15. RmvZ3

    RmvZ3

    Joined:
    Sep 29, 2016
    Posts:
    5
    Thank you for answering DiscoFever. Too bad. I hope Nvidia release decent drivers since they are missing the mac market in favor of AMD (ok, it may be small by now but who knows). Pity is I had a RX 580 but I changed because eGPU setup problems with bootcamp.
     
  16. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    So High Sierra is out; I just tried with Unity 2017.1.1 and ... it doesn't work, not recognized. Back to 5.6.4p2VR and frame rate is around 13-20fps, unusable ...

    What's the catch here ? Should I try 2017.2 ?
     
  17. lokieliot

    lokieliot

    Joined:
    Mar 4, 2017
    Posts:
    7
    Now that High Sierra is out i decided to take look at creating VR experiences with Unity on mac. While i was able to build a windows VR experience (i tested it on bootcamp) i wasn't successful in making anything work in VR on MacOS. Is there something wrong with the current SteamVR beta? i get the white grid room but am unable to run anything else on it. Was wondering if anyone here has any clues to whats going on with VR on Mac now that High Sierra is released.
     
  18. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    I have made the same experience. We've successfully built VR experiences for HTC Vive on Windows (which was quite simple - basically it involves importing the SteamVR asset and dragging the two prefabs to your scene). On OSX not so much. We can't get it to work with Unity 2017.1 - is there any information available that can help us getting this to run?

    Thanks,
    -ch
     
    lokieliot likes this.
  19. lokieliot

    lokieliot

    Joined:
    Mar 4, 2017
    Posts:
    7
    Is this project dead?
     
  20. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    No - it's just that I've got it to work with Unity 2017.2, just like it is supposed to (also requires the newest beta Steam drivers that you get from Steam) and forgot to write about it.

    Performance is still below Windows, but at least I now can code on the Mac.

    Yay!

    -ch
     
    lokieliot and elbows like this.
  21. lokieliot

    lokieliot

    Joined:
    Mar 4, 2017
    Posts:
    7
    Where can i get these ‘beta steam drivers’?
     
  22. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    From Steam, takes roughly 50 seconds. You need to look up the SteamVR properties, and allow beta content. Once you enabled that, Steam will automatically download the beta version to steamVR.
     
  23. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    OK, here's some more info. I was able to import a working Windows VR project written for HTC VIVE using the SteamVR plug-in and no other VR specific items; the Mac is using the current openly available Mac SteamVR beta and the current release of 2017.2 (non-beta). It's a late 2015 iMac 5K.

    The project imported successfully (all 14 GB, 8 scenes), and started without any changes (it did require a restart of Unity though) in VR; all scenes run with little to no artefacts. Performance-wise the Mac is 20%-30% below that of the Windows version (same machine, Win10 via boot camp), which I'm hoping Apple/Unity will be able to resolve. I've come across some minor shader issues (usually resulting in color or transparency differences to the windows version), but in all I'm deeply impressed with what Apple/Unity/Steam have accomplished. Having this high degree of compatibility between platforms is rare, and very encouraging.

    Cheers,
    -ch
     
    lokieliot and elbows like this.
  24. lokieliot

    lokieliot

    Joined:
    Mar 4, 2017
    Posts:
    7
    I seem to be misding a piece of the puzzle some where. I have a new imac 27” at top spec, macos high sierra, an htc vive, the latest beta of steam & steamvr, unity 2017.2, the steamvr unity plugin. What am i missing?

    At the moment with all this i am unable to test my unity VR projects, when built for windows they work, when built for MacOS they dont work.

    I cant tell if unity it not working, steam vr, or my mac. But if CSfranz is saying its all working for him, i need to know what is different between us thats preventing us having same results. How are you connecting your htc vive?
     
  25. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    What happens when you play SteamVR from within the steam app and then select things like 'Run Room Setup' and 'Run Tutorial' from the dropdown menu in the small SteamVR window? That should rule in/out some non-Unity issues.
     
    lokieliot likes this.
  26. lokieliot

    lokieliot

    Joined:
    Mar 4, 2017
    Posts:
    7
    When running, steamVR presents a white grid room in the vive along with the controllers. The tutorial does not exist as an error pops up to say it cant be found. I was able to play blobby tennis, so this made me think everything is set up and working with the vive.

    I had a break through..
    I also took greater notice of the pop up notifications the unity SteamVR plugin causes. It keeps recomending i set my build settings to windows. I realised there are 3 build settings for mac, and that choosing macstandalone_64 to buid created a build that finally worked with the vive.

    Im wondering now if there is some setting i’ve missed or need to change in order for unity to display the experience unities preview.?

    Thank you for your help @CSfranz & Elbows
     
  27. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    I'm not entirely sure what your question is: In order to test if VR works I have done the following:
    - create a new Project
    - Import steamVR, and allow the settings
    - add 10x1x10 a plane at 0, 0, 0, add a cube and a sphere to 0,0,0
    - add the SteamVR camera Rig prefab to the Scene close to 0,0,0
    - add the steamVR prefab (i.e. your Scene must have 2 prefabs from the SteamVR plugin)
    - (this is important) delete the existing camera (non-steam), so there is only one camera present (the steam rig)

    You should now be able to view the Scene from your VIVE (you need to wear the Headset) when you press Play (there is nothing visible during edit, only during play)

    I'm not entirely sure what "in order for unity to display the experience unities preview" means.
     
    lokieliot likes this.
  28. hellobard

    hellobard

    Joined:
    Sep 26, 2012
    Posts:
    140
    Do I need to have High Sierra installed for the Vive to work with SteamVR? I get a headset not connected error when plugging in my Vive to a Macbook Pro Touchpad in the SteamVR beta. Using a usb-c connector with the hdmi / usb of the vive to get them connected.
     
  29. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    From my own experience, you may also have a connector issue. When I initially set up my Mac with the Vive, I used a miniDisplayPort to HDMI connector that wasn't rated for 4K Video, and the HMD did not connect successfully. I had to Exchange the Adapter for another that was cost exactly as much as the first one, but rated 4K and it worked. You may have to check the specs on the connector.

    Depending on your MBP, I seem also to dimly recall that on that Mac, not all of the usb-c ports have thunderbolt speed, so you may also have to check that, and connect with the port from the other side.

    I've only successfully connected the Vive using High Sierra; but then I only tried with El Capitan before that.

    Cheers,
    -ch
     
    lokieliot likes this.
  30. hellobard

    hellobard

    Joined:
    Sep 26, 2012
    Posts:
    140
    Thanks for the reply! I will try it with some other connectors and see if that helps!
     
  31. lokieliot

    lokieliot

    Joined:
    Mar 4, 2017
    Posts:
    7
    Thank csofranz,

    My question was how to make the vive display what i made in unity once i pressed play. I’ve done exactly what you listed i should do but when i hit ‘play’ nothing is displayed on my vive. Right now im having to ‘build’ my experience to test and preview the experience.

    I’m not even able to get the vive to work with WebVR in firefox beta so im assuming there is something vital i’ve missed when setting things up.
     
    Last edited: Nov 2, 2017
  32. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    It seems that steam VR is quite buggy. Every other time I update steam VR, it stops working. Right now, for some reason, it switched to some emulation mode where I only have an image in the eye (black with 2 overlapping circles that contain the full two eye image), and nothing in the right eye - as if the full, two-eye image was scaled to fit into the left eye. This started when I accidentally started steam VR with the Vive disconnected.

    I hope a new release will fix this. Currently, I have to go back developing on Windows.
     
  33. Mikkel-Christiansen

    Mikkel-Christiansen

    Joined:
    Nov 9, 2016
    Posts:
    2
    Hi all. I have a macbook pro late 2017 with touchbar. I have a devkit eGPU and htc vive. I get a very bad framerate in unity. Any ideas?
     
  34. AmazingRuss

    AmazingRuss

    Joined:
    May 25, 2008
    Posts:
    933
    Is this supposed to work now, or have HTC, Valve, and Unity just kind lost interest and wandered off? I can get the white room, but steam VR self-launches room setup, which rapes my cpu for a few minutes and crashes.
     
  35. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Well the beta version of SteamVR for macOS was updated 2 days ago so interest has not evaporated at that end of things! As for Unity I cannot comment, since I've not tried this stuff for some months.
     
  36. AmazingRuss

    AmazingRuss

    Joined:
    May 25, 2008
    Posts:
    933
    Does that come down automatically with the steam client, or do I need to go hunt for it?
     
  37. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    It comes through steam but you need to tell steam that you want the beta stream (or whatever the right term is) of steam VR.

    SteamVRbeta.jpg
     
    Last edited: Jan 27, 2018
  38. AmazingRuss

    AmazingRuss

    Joined:
    May 25, 2008
    Posts:
    933
    I'll give that a try, thanks.
     
  39. dpentecost

    dpentecost

    Joined:
    Apr 3, 2009
    Posts:
    136
    Hoping someone is still working on this now that Apple has announced new compatible eGPUs. I bought the Sonnet Breakaway Puck with RX570 and it is working but with awful jitter in VR using Vive on a 13” MacBook Pro. Strange thing is that Unity shows consistent 100+ FPS, but the headset is not getting it or is updating badly. Latest Steam VR beta, latest High Sierra, HDMI on eGPU, USB through adapter to USB-C on MacBook. Any settings I might have missed, any tips? Hoping for a breakthrough before I send the eGPU back!
     
  40. dpentecost

    dpentecost

    Joined:
    Apr 3, 2009
    Posts:
    136
    Additional info - I am running a 2018 beta version of Unity. You would think the latest would work. But I will try the 5.6 VR version and 2017 release and see if I have better luck. Any other ideas?
     
  41. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    406
    Hey, did you get it working? I’m on the verge of ordering an eGPU and Vive to get this running in macos for developing.

    Currently I’m on 2017.4, but I can of course upgrade if it help.

    I’m a little let down by the little amount of threads on Mac/VR..

    Thanks!
     
  42. dpentecost

    dpentecost

    Joined:
    Apr 3, 2009
    Posts:
    136
    Sorry, swamped with other things. Trying again is on my list. I have searched for any updates on eGPU use on Mac with Unity, but have not seen any. Apple's WWDC Quixel demo apparently used a MBP with eGPU for a 5200 pixel wide display. It may be, sadly, that eGPUs help with massive or multiple displays, but VR still problematic on Mac. Or that I don't know what I am doing. But you are right - nobody is jumping in on this thread with tips.
     
  43. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    Made it work in on my Mac. The key was to re-enable Metal after SteamVR switched it off during import.
     
  44. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    406
    I got a Vive and an Sonnet Breakaway Box 550 (The one Apple recommends), with an RX 570. It was just plug and play and logging out/in to get it detected by the system, Mac OS 10.13.2. However it was detected as "R9 XXX" by Mac OS and Blender says it's an "RX 580". Doesn't matter much as long as it works.. :)

    However I haven't tried connecting the Vive to it yet, and I don't know how to make Unity use the GPU, but I will try this in a few days.

    I read somewhere to set the screen connected to the eGPU as the primary display, by dragging the title bar in the screen setup settings, not sure how this would affect working in Unity. Since this screen would be the Vive, it might be kind of weird if parts of the desktop shows up on it.

    Optimally, I would like only the Game-output to go through the eGPU to the Vive.

    Let me know if you figure something out, and I'll report back when I've tried the setup. :)
     
  45. dpentecost

    dpentecost

    Joined:
    Apr 3, 2009
    Posts:
    136
    Can you remind me how to re-enable Metal? And thanks for the tip!
     
  46. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    406
    Try: Edit > Project settings > Player then select "Other settings", and make sure to check "Metal editor support" if it's not unchecked. Also check that Graphics APIs for Mac has Metal, if not, try adding it.

    I'm not sure my eGPU is working as intended, I just tried the Blender BMW 27 GPU benchmark in Blender 2.78 and it took 13 minutes, even after selecting it through preferences.

    Do you know of any other good way to test if the eGPU is working as it should or how to enable it in Unity?
     
  47. Glowing_Slab

    Glowing_Slab

    Joined:
    Jun 19, 2015
    Posts:
    43
    Adding to this, I'm testing using a 2017 MacBook Pro, Unity 2018.2.0f2, the Sonnet eGFX 650W Breakaway box and a AMD Radeon WX 9100 GPU.

    I can see that the WX9100 eGPU is being used by running Activity Monitor and setting it to show GPU History. To get Unity to use the eGPU, you will need to set 'Device to use' under Preferences to your eGPU card. I've been testing the 'Book of the Dead' demo, running in Metal. The MacBook is also running in 'clamshell mode' - with the laptop closed so the internal GPU is not being used, and 'Automatic Graphics Switching' is turned off.

    Even with all of this to ensure that the eGPU is running, the performance increase is very slight - really about a 5 fps increase, giving me an average of 25 fps. This is also the case in other Unity projects of my own, the performance increase is very tiny and not at all satisfactory. I presume the performance bottleneck is in the data transfer rate from the CPU to the eGPU (the Activity Monitor shows that the eGPU is running at around 50%). Has anyone had a satisfactory result? As in, a significant increase in actual frame rate?
     
  48. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    This probably isnt the source of your issue, but I thought I would mention it anyway.

    Which Macbook Pro? I only ask because I know the 2017 13" model with Touch Bar has limited bandwidth for the ports on the right side, only the ones on the left have full bandwidth.
     
  49. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    406
    Hmm, interesting with the "Device to use" setting. I read somewhere to set the primary display to the one that is connected to the eGPU, but since I have a 5K monitor, the 5K screen got really blurry when I did that, and I haven't had a chance to try the setting you mentioned.

    I have a 2016 MacBook Pro 15".

    @Glowing_Slab: Did you try using any 3D benchmarking software, like https://benchmark.unigine.com/heaven? I'm gonna test it now on my internal Radeon Pro 460 4 GB, and then on my Sonnett eGPU box with an RX570. Then try it somehow from inside of Unity, but currently my game is more limited by the CPU than the GPU.. :p
     
  50. nicmarxp

    nicmarxp

    Joined:
    Dec 3, 2017
    Posts:
    406
    The Heaven benchmark showed a great performance boost with the RX570 in the eGPU, from 20-30 fps to 80-100. I still don't know how to test it in Unity. Is there some example scene to try it with?