Skip to main content
Up and Coming
July 30, 2014

Set up for working with DK2 in Unity

Hi all, how are you setting up your system for developing in Unity with DK2?

I love the idea of direct access, a great step forward, but until (if ever?) that works in the unity editor, the DK2 seems even more awkward to me than the DK1 was... unless I'm doing something wrong.

If I duplicate the displays, I get a maximum resolution of 1080x948, which is too small to work with - I don't understand why that's not 1920x1080, and it'd be much more useful if it was - any ideas?

If I extend displays with my main monitor as the 'primary', everything works ok, but the display in the rift is very significantly slower and more juddery.

If I extend displays with the rift as 'primary', the display in the rift is nippy, but then windows becomes practically unusable, with all the menus, icons and any new apps appearing in the rift and needing to be moved with lots of awkward one-eyed peering.

Any advice on optimizing the setup much appreciated - how do the Oculus guys have it configured? I think the main reason it seems more awkward than before is because I used to duplicate, and get a decent resolution (I think?!). Having seen how well it works, I now *really* want direct access mode to work in Unity. I guess at the moment I have to choose between slow rift, awkward windows, or really low resolution.

(BTW: I'm running Windows 8.1)

Thanks,

Dave
    This topic has been closed for replies.

    33 replies

    New Participant
    August 2, 2014
    I tried out several things over the last day to get the Unity Editor Game View to work without judder. Without luck so far.
    I run a tripple monitor setup + the rift. The 3 screens are running with 60Hz and the rift with 75hz. VSync in the NVidia panel is set to on. Aero turned off (Win7 Pro). I am using fraps to visualize the fps. The unity game window is maximized on the rift display. I'm always testing both modes: LowPersistenceMode on and off.

    Using one of the 3 screens as primary:
    When i set vsync to off in the Unity Quality Settings, my scene runs with 150 fps. Game window on the rift has heavy judder
    When I turn vsync on, scene runs with 60 fps. Rift has heavy judder.
    When i use Application.targetFrameRate = 75 without vsync. Rift has heavy judder.

    Using the rift as primary screen:
    Same effect as described above. Every setting still comes coupled with judder on the rift. Although the scene runs "around" 75 fps with vsync enabled.

    No matter what i do... the editor game window on the rift always is rendered out of sync causing judder. Not a small judder. It pretty frequent and heavy if you look around.

    Made another test with RadialG in winwowed mode:
    Primary screen is a 60Hz monitor, not the rift.

    Starting RadialG without command line option.
    Game syncs to 60Hz and has judder.

    Starting RadialG with -adapter 1 (rift) command line parameter.
    Game runs with 81 fps on two of the 3 screens. But with 75Hz on one screen and the rift.
    Resulting in a perfect, in sync rendered window, without any judder at all in the rift.

    It seems that the Unitor Editor messes up the vsync here. Even when the editor is started on the rift by choosing the rift as primary screen, the vsync is not working as it should be. At least it behaves different compared to a build launched with the -adapter command line option. I think it would be pretty cool if Unity Devs would implement the -adapter option for the editor too, using the same methods that work perfect for a build that renders in sync whithout judder in windowed mode.

    On the other hand I don't undestand why the rift has this severe judder even when LowPersistenceMode is turned off.
    It's a frequent pulse where the frame makes a sudden jump, Turning off timewarp makes it even more worse.
    I loved to use the DK1 in cloned display mode. It was a "fun" and "easy" way to develop content in the unity for the rift.
    Now it's pain in the ass. Yeah, i still can make a build which runs fine on the rift, but it lost a lot of the "fun" factor to develop content now in the unity for the rift. I'm hoping that this issue will be solved fast ;)
    Up and Coming
    August 2, 2014
    Same problem here; tried all the same solutions. As it stands I can't even rationalize updating our game for DK2 because its pretty well unplayable.
    Inspiring
    August 2, 2014
    "fredrum" wrote:
    I hit my hotkey to OVRDevice.SetLowPersistenceMode(true) and Prediction is now back (0.03) and no more camera lag. But still no sense of actual persistence blur being different.

    Are you using OVRMainMenu? It sounds like you used the P key, which that script already uses to toggle prediction. Instead, can you try removing your hotkey script and pressing F1 when the game is running?

    "Dhrog" wrote:
    Game window on the rift has heavy judder

    For 0.4.0, the Game view will always render with judder. We are working to improve the editor experience. For now, I would recommend building a standalone player and running *_DirectToRift.exe to make it run at 75Hz on the Rift. And I would recommend sticking with Unity 4.5.2f1 for now. The new release (4.5.2p2) always judders unless you make the Rift your primary monitor.

    "jakeleehigh" wrote:
    The problem is when I try the Tuscany demo I see a floating plane that has the scene rendered onto it.

    This sounds like an issue with our TimeWarp timing. Did you make any changes to the Tuscany scene, or is it using DX11? Can you make sure OVRCameraController's "Freeze Time Warp" checkbox is not checked? Are there any errors in the output (editor console or output_log.txt)?
    Up and Coming
    August 5, 2014
    I tried the "extended display" option of dragging the game window over to the Rfit screen, but nothing appears in the "game" view of the Unity editor - it just matches the Unity gray background. Doesn't seem to matter what display I'm using, or even if the Rift is connected. As long as the OVR Camera prefab is being used, my game view is empty. In the scene view, I can still see that the Rift camera is rotating when I rotate the headset.

    I've tried a lot of the suggestions mentioned in this topic (DX9 vs DX11, 60hz vs 75hz, etc) and nothing seems to make a difference.

    When I make a build, my game works fine with no noticeable judder, but having to make a build every time I want to test is a big downgrade from my previous workflow (particularly with UI). Keeping the DK1 around for day to day stuff for now, but look forward for the Unity Editor support to improve with the next DK2 update!

    I'm on Windows 7x64 with a GeForce 680, by the way.
    http://www.turbo-button.com SMS Racing • A Night at the Roculus • Floculus Bird
    August 6, 2014
    "stupidn00b" wrote:
    I tried the "extended display" option of dragging the game window over to the Rfit screen, but nothing appears in the "game" view of the Unity editor - it just matches the Unity gray background. Doesn't seem to matter what display I'm using, or even if the Rift is connected. As long as the OVR Camera prefab is being used, my game view is empty. In the scene view, I can still see that the Rift camera is rotating when I rotate the headset.

    I've tried a lot of the suggestions mentioned in this topic (DX9 vs DX11, 60hz vs 75hz, etc) and nothing seems to make a difference.

    When I make a build, my game works fine with no noticeable judder, but having to make a build every time I want to test is a big downgrade from my previous workflow (particularly with UI). Keeping the DK1 around for day to day stuff for now, but look forward for the Unity Editor support to improve with the next DK2 update!

    I'm on Windows 7x64 with a GeForce 680, by the way.


    Have you tried changing the game window to Free Aspect?
    Up and Coming
    August 6, 2014
    "stupidn00b" wrote:
    I tried the "extended display" option of dragging the game window over to the Rfit screen, but nothing appears in the "game" view of the Unity editor - it just matches the Unity gray background. Doesn't seem to matter what display I'm using, or even if the Rift is connected. As long as the OVR Camera prefab is being used, my game view is empty. In the scene view, I can still see that the Rift camera is rotating when I rotate the headset.

    I've tried a lot of the suggestions mentioned in this topic (DX9 vs DX11, 60hz vs 75hz, etc) and nothing seems to make a difference.

    When I make a build, my game works fine with no noticeable judder, but having to make a build every time I want to test is a big downgrade from my previous workflow (particularly with UI). Keeping the DK1 around for day to day stuff for now, but look forward for the Unity Editor support to improve with the next DK2 update!

    I'm on Windows 7x64 with a GeForce 680, by the way.


    Hi. For me the step-by-step guide, mentioned in this thread worked 100% :

    viewtopic.php?f=37&t=11115

    Might be the solution, to use TWO Game View Tabs. For me it works now in that way, that when running the demo, I see it corrctly in the rift, but the "Game" View Tab in editor is blank. When I stop the demo, the camera view of (one) camera is back in the editor Game Tab correctly, but the rift shows a non-correct view.

    Before dragging the second Game view tab in the rift view, be sure that you see your "Extended Desktop" background in BOTH lenses. I had the issue, that only one side was desktop background, the other was blue. Had to restart windows - everything worked fine again.

    Greets, gunair
    LocomotionVR.de - Virtual reality in eMotion http://www.locomotionVr.de Organizer of HANNOVER VIRTUAL REALITY MEETUP & Member of COLOGNE VIRTUAL REALITY MEETUP DK2 Status: OWNER SINCE 04.AUG.14 Ordered: Mar 19, 2014 09:52 AM PDT
    Up and Coming
    August 6, 2014
    "gunair" wrote:

    Hi. For me the step-by-step guide, mentioned in this thread worked 100% :

    viewtopic.php?f=37&t=11115

    Might be the solution, to use TWO Game View Tabs. For me it works now in that way, that when running the demo, I see it corrctly in the rift, but the "Game" View Tab in editor is blank. When I stop the demo, the camera view of (one) camera is back in the editor Game Tab correctly, but the rift shows a non-correct view.

    Before dragging the second Game view tab in the rift view, be sure that you see your "Extended Desktop" background in BOTH lenses. I had the issue, that only one side was desktop background, the other was blue. Had to restart windows - everything worked fine again.

    Greets, gunair


    Hey, thanks - I just ran through the steps again and got it sort of working this morning. I can't get it to work with two game view tabs. If I have the game tab active on my primary monitor, the game tab on the Rift desktop is blank, but if I switch to scene view on my primary monitor, the Rift shows the game view just fine. As soon as I switch back to the game tab on the primary monitor, the Rift view freezes and the game only updates on the primary monitor.

    So I guess it was kind of working, I just didn't realize only one game view worked at a time with my setup.
    http://www.turbo-button.com SMS Racing • A Night at the Roculus • Floculus Bird
    Up and Coming
    August 8, 2014
    I've written up the steps I followed here:

    http://talesfromtherift.com/

    It's disappointing that only one game view works now, my standard DK1 method was too have 1 game view in my editor, and a second game view full screen on the rift display. :-(
    Check out my Unity VR development blog: http://talesfromtherift.com @peterept
    Up and Coming
    August 8, 2014
    To throw an extra bit into the mix, here's a little editor-utility I use to maximize the game window on the rift in extended mode: https://gist.github.com/dbuck/40b8a72750aad664eeb8
    Dave Buchhofer | Dev @ Matterport
    Up and Coming
    August 9, 2014
    These kind of challenges are why I didn't develop as much for the DK1 as I planned. I couldn't get a setup where I could develop with both monitors and still easily run stuff on the rift.