Search Unity

Unity 5 Optimizations

Discussion in 'AR/VR (XR) Discussion' started by idunlop_oefun, Feb 9, 2015.

  1. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
    Hi,

    I'm having a difficult time finding information on the already existing or planned optimizations for the Rift in Unity 5. Can anyone shed light on them?

    Thanks.
     
  2. Pete-Moss

    Pete-Moss

    Joined:
    Mar 18, 2013
    Posts:
    15
    The existing work has mostly been about integration. But optimization work is happening now as well, with a focus on working for the Rift and future HMDs. While we do have a list of desired changes internally, I dont think we are sharing that just yet. Is there particular info you are seeking?
     
    jashan likes this.
  3. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
    Hi Pete - thanks for the reply.

    I'm an experienced Unity / game developer who is just getting started on the VR side - don't even have the DK2 in my hands yet (waiting on it).

    I'm looking for any information I can get. But specifically I know that performance is important and had previously heard mentioned a bunch of optimizations that were going to be made in Unity specifically for the Rift.

    Are those already present in the Unity 5.0 RC1?

    I currently use a Mac Pro and I'm not sure what I can expect prior to these aforementioned optimizations or afterwards. I've also heard that things don't run as well as they could using Unity but once these changes are made things should be a lot better.

    Can you shed any light on this?
     
  4. Pete-Moss

    Pete-Moss

    Joined:
    Mar 18, 2013
    Posts:
    15
    The optimized VR version is still in alpha for now, but those changes should be hitting the main trunk soon, as I understand it. I dont have a date yet for the release, other than Real Soon Now (tm).

    The best VR support is currently in windows, which is a shame, since I am also a mac guy. But that is primarily because the drivers still have a ways to go.
     
    jashan and idunlop_oefun like this.
  5. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    Will there also be a way to test VR applications in the Editor and see them trough the Oculus Rift?
    Also it would be cool to have support for Android / iOS devices, where you can run the application in the editor and have the device interact with the input. For now I have to publish my Android application always to my phone to test it. The Unity Remote app still doesn't support all the other information from the phone that's used for head rotation. Also Samsung Gear VR Gamepad is something you want to test inside the editor. Maybe Unity Remote can send over this information that the phone received from the bluetooth device?

    At the moment I'm creating a several VR applications and lots of time is spend on publishing, testing on the actual device, find a problem and go back into the editor. I hope these are problems of the past soon, because it's a waste of time. Anything improving this workflow is something I would cheer at. :)
     
  6. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Whats the issue with using the rift in the editor? I do that all the time.
     
  7. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    That it's useable in the editor, but the oculus rift display itself stays black. To test certain 3D effects I need to put the Oculus Rift Headset on and see if the 3D works fine. I can see the Editor screen realtime display, but inside the Oculus I don't see anything.

    Especially when dealing with non realtime 3D content it's hard to check if the 3D effect is correct. You actually need to see it inside the rift itself. The editor screen is to test scripts and other visual parts, but doesn't give you the stereoscopic 3D effect on your eyes ;)
     
  8. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Thats what i meant, i put on the headset very often when running stuff in the editor, never had any issues with it : )
     
  9. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    Weird, when I have the oculus rift in extend or direct mode on pc I can't get the display working at all while running the application inside Unity. How did you manage that?
     
    El Maxo likes this.
  10. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    I just hit play : D
    Did you try change the extended mode in the oculus setting tool as well? I use extended mode i think and then i just clone my screen and run the game window full screen.
     
  11. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    Ooh ok, well I was thinking about an all in support without doing things manually. If they redo and optimize, why not have this as a default feature. So when you hit the play button, the editor starts and directly plays the content also in the Oculus Rift Direct mode, would be nice as an default feature.
     
  12. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    well, i always have my computer set up as cloned, so thats kind of how it works, hehe.
    But yes, i get your point : )
     
  13. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,079
    Thank you for this. This the first time the Oculus config options didn't have the options for extended desktop mode and so forth greyed out. I just tried extended mode and dragged the window on to the Rift monitor and it indeed worked in playback mode as you said.

    Thanks again, this will be a time saver. :)
     
  14. Pete-Moss

    Pete-Moss

    Joined:
    Mar 18, 2013
    Posts:
    15
    Yep, it should be possible to view the game screen on the device in the editor. I also do that all the time. I would like to see it supported better though, maybe also making it easy to have a stereo game view on the device, while the monitor maintains a mono view.
    I agree the Gear VR needs better support as well, and that the remote app likely needs some major update to support VR on mobiles better. I feel like that is a ways out at this time, however.
     
    Todd-Wasson likes this.
  15. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
    Using a Mac / 5.0rc2 / dk2.

    How exactly do you test / run the game from the editor? I can see a game view with the two camera views (on my main display inside Unity), however I can't get the game view to appear on the rift "display".

    I can sort of drag it over blindly to the rift display but that is very difficult to do because you can't see the mouse or the window and there is no way to maximize it.

    Currently my only way to test is to do a complete build.
     
  16. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    This is how i do it, no need to drag anything.
     
  17. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
    I'm on the mac - is that the same as the OculusConfigUtil tool? My understanding was that on Mac there is no direct mode so you're always in Extended mode (by default).
     
  18. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Ahh, on mac i have no idea : p
     
    idunlop_oefun likes this.
  19. Recluse

    Recluse

    Joined:
    May 16, 2010
    Posts:
    485
    I find using Extended Mode on the Rift causes horrible jitter in Unity when head tracking, both in editor and in the build. I use Direct Mode, which gives a smooth build, however it only shows a black screen in Unity editor. So for now, my workflow is to view the game in normal single camera mode while in the editor, and then do a build to play it in VR.