Forum Discussion
BLACKISH
11 years agoHonored Guest
Unity Workflow Woes with DK2
I had a really nice workflow with DK1:
I would mirror (not just extend) my 1080p screen to the Rift and whenever I wanted to test I would just maximize my game window and press play. It was very simple, very easy and most importantly very fast to test.
*** Now with DK2 the development experience is very different. So far. ***
Turning on the DK2
Unlike DK1 it's not enough for me to just press the button. For some reason I have to press the button, then unplug the USB cable, wait for the Windows sound and plug it back in for the DK2 to appear in the configuration utility and turn on properly.
Direct3D 11
Then I have to make sure I'm not in Direct3D 11 mode if I want to test, yet I must be in Direct3D 11 mode to make a build (in either case the result will be a black screen/view if in the wrong mode). Switching between the two tends to occasionally crash Unity, though my feeling is it survives more regularly if I do it in an empty scene.
Testing in the Editor
It is not possible to mirror the display anymore, because the rift's screen is in portrait orientation and trying to mirror it messes up either the rift screen or the main screen. Extending the screen works, but you have to move the game view over to the rift's screen. Having two game views at once (one on the rift and one on the monitor) will not work as one of them just goes black.
Having to do tasks like moving windows or anything non-VR really on the Rift's display is very uncomfortable and very annoying.
I managed to fix at least this problem with this editor-script I have written a while ago, that toggles between two layout modes whenever you enter/exit playmode. Just make one layout for "WORK" and one for "PLAY" where the game view is on the second monitor, click Toggle AutoSwitch in the Layouts menu and you're good to go. Still it would be so much nicer if Unity could somehow just support direct to rift mode...
Building
So going from testing in Unity to testing a build requires me to switch to Direct3D 11 (occasionally crashes Unity), switch the Rift display mode (occasionally crashes Unity), build, run (usually crashes on first try, then works on second try), test, quit, the switch back to extended desktop (occasional crashes unity) and make sure everything is set up correctly again in unity to continue to work.
Bonus Issues
Ok, now I finally have a build (Direct3D 11!) up and running in Direct to Rift mode and I notice some weird disconnect in the center of my view. Initially I thought these were performance issues, but luckily I stumbled across this post which tought me to toggle v-sync off and on again (do this automatically a few sec after launch), which fixes it.
There you have it. The hard life of trying to make something great with Unity and Oculus DK2.
Now I know that not all of these problems are problems with the DK2, but given that David Helgason mentioned at the Unite Keynote that about 90% of all Oculus Rift apps are done in Unity, I very much hope that someone on each end is working to make this a more pleasant experience! :)
All I'm asking is: Please let me focus on creating great content for VR! Thanks for listening.
I would mirror (not just extend) my 1080p screen to the Rift and whenever I wanted to test I would just maximize my game window and press play. It was very simple, very easy and most importantly very fast to test.
*** Now with DK2 the development experience is very different. So far. ***
Turning on the DK2
Unlike DK1 it's not enough for me to just press the button. For some reason I have to press the button, then unplug the USB cable, wait for the Windows sound and plug it back in for the DK2 to appear in the configuration utility and turn on properly.
Direct3D 11
Then I have to make sure I'm not in Direct3D 11 mode if I want to test, yet I must be in Direct3D 11 mode to make a build (in either case the result will be a black screen/view if in the wrong mode). Switching between the two tends to occasionally crash Unity, though my feeling is it survives more regularly if I do it in an empty scene.
Testing in the Editor
It is not possible to mirror the display anymore, because the rift's screen is in portrait orientation and trying to mirror it messes up either the rift screen or the main screen. Extending the screen works, but you have to move the game view over to the rift's screen. Having two game views at once (one on the rift and one on the monitor) will not work as one of them just goes black.
Having to do tasks like moving windows or anything non-VR really on the Rift's display is very uncomfortable and very annoying.
I managed to fix at least this problem with this editor-script I have written a while ago, that toggles between two layout modes whenever you enter/exit playmode. Just make one layout for "WORK" and one for "PLAY" where the game view is on the second monitor, click Toggle AutoSwitch in the Layouts menu and you're good to go. Still it would be so much nicer if Unity could somehow just support direct to rift mode...
Building
So going from testing in Unity to testing a build requires me to switch to Direct3D 11 (occasionally crashes Unity), switch the Rift display mode (occasionally crashes Unity), build, run (usually crashes on first try, then works on second try), test, quit, the switch back to extended desktop (occasional crashes unity) and make sure everything is set up correctly again in unity to continue to work.
Bonus Issues
Ok, now I finally have a build (Direct3D 11!) up and running in Direct to Rift mode and I notice some weird disconnect in the center of my view. Initially I thought these were performance issues, but luckily I stumbled across this post which tought me to toggle v-sync off and on again (do this automatically a few sec after launch), which fixes it.
There you have it. The hard life of trying to make something great with Unity and Oculus DK2.
Now I know that not all of these problems are problems with the DK2, but given that David Helgason mentioned at the Unite Keynote that about 90% of all Oculus Rift apps are done in Unity, I very much hope that someone on each end is working to make this a more pleasant experience! :)
All I'm asking is: Please let me focus on creating great content for VR! Thanks for listening.
22 Replies
Replies have been turned off for this discussion
- lmbarnsHonored GuestYeah this is a customer service nightmare in the making. Why is the dk2 more difficult to use than the first one????
When I extend the desktop to the rift and change it to portrait, dragging a unity game window, the entire editor, or a build onto the rift's screen (which is above my desktop for some reason rather than to the right....) it never fills the screen and I have yet to get the camera in the scene to move with the rift......the demo's included with the direct-2-rift examples do work perfectly.....
Biggest flaw for the rift beyond how much choppier it is than the dk1 when you're rotating your head away from the stupid little IR camera you now have to look at. The first thing people do when using a rift is look behind them and all around. Duh.
:cry: - StapledonHonored GuestI have to agree with all the feedback here - for my first post I was hoping to have something wonderful to say, but my feelings after a day of trying to work with OR in Unity are rather 'gahh!'. It's unpleasant.
I don't have DK1 so I don't have the benefit of prior experience (and Mirroring isn't an option with a 1440 display), so some proper integration into Unity is what I would like to see, and preferably Direct Mode as there are are inconsistencies between Extended and DM (desktop gamma appears to be in play for instance) meaning more awkwardness to setup/usage.
However this is probably Unity's job, and given they're in the middle of multiple cycles (4.5.x, 4.6.x beta, 5.x beta) it's probably not going to happen until Unity 5 surfaces. - moltonExplorer
"Stapledon" wrote:
...Mirroring isn't an option with a 1440 display...
I never thought of that. Some screens support 1440 I think, I don't know about Windows 8, but in 7 and below you can activate an option that allows your monitor to display any resolution, if the resolution is too big it just gets cut off. That could work ok for one eye at least. - guyo83Honored GuestI really hate developing with the DK2, which is a big problem for Oculus if developers are finding it a chore to create content that would otherwise drive the Rifts success.
- BLACKISHHonored Guest
"guyo83" wrote:
I really hate developing with the DK2, which is a big problem for Oculus if developers are finding it a chore to create content that would otherwise drive the Rifts success.
Exactly my point! If I could spend all the time I spend cursing at the DK2 to do some actual work, it would be stellar. Yes, not everything needs to be tested on the device but a lot of things do... :( - MartinSchultzHonored GuestI so agree with Blackish and all posters on this topic. Developing for the DK1 was easy, but DK 2 is a nightmare. How on earth with all those rockstar developers can Oculus deliver such a lousy SDK? The sdk is even worse than any Google SDK and so far Google always won the most-lousy-sdk-awards.
It's probably the old eat-your-own-dogfood thing.
I developed a medical application for the Rift DK1 and the content mirroring to main screen was great - but that doesn't work anymore. Screen mirroring does not work anymore for me with latest SDK.
Has anyone gotten the mirroring working with latest drivers? I can try to press M or set up the screen mirror mode in code, but I never see a window appearing on the desktop mirroring the Rift contents. - AnonymousNot applicableI have to agree with this thread. I'm not going to repeat the issues above...
Will the Unity platform support be a major difference? We are spending so much time with workarounds and broken aspects of the SDK, its a shame. I'm hoping for a major system/asset that is on the asset store. It would get regular updates, new functionality, fixes, experimental features.. like the other assets (megafiers, playmaker, Usequencer...)
I do realize you folks are working very hard, thank you! Just trying to add some wood to this fire ;)
Thanks! - ColinBAdventurerI don't think that the DK1/2 were ever really made for Unity as such
The Unity folk have a lot more to do than waste time on a piece of hardware that won't even be remembered in a couple of years or less.
Each Oculus update has meant a change in requirements or scripting
Reality:
The Oculus folk have a consumer Rift pretty close to release so the DK series is probably nearly forgotten.
Most work now must surely be focused on commercial activity and stability.
The Development Kits are now past their used by date and so one must put up with it, I guess?
As far as Unity is concerned. Wait for 5 and wait for a more stable commercial Oculus. - vrdavebOculus Staff
"BLACKISH" wrote:
It is not possible to mirror the display anymore, because the rift's screen is in portrait orientation and trying to mirror it messes up either the rift screen or the main screen.
Another issue with OS display mirroring is vsync. While DK1 was 60Hz, like most monitors, that won't do for CV1. It usually works better to mirror what's on the Rift to a window on the main display."BLACKISH" wrote:
Toggle Direct to Rift displaying of the game at any time during a game, so I can mix normal and VR experiences more easily.
If you run in Direct mode and rename OVRManager.Start to OnEnable, you can disable the OVRCameraRig GameObject and enable a standard Camera instead. That should allow a single build to toggle VR at runtime."Marbas" wrote:
In-game "Out of range" message
We removed that for 0.4.3 but we are planning to bring back a less-distracting out-of-range indicator and a more accurate range check. Any thoughts on what the visual cue should be?"Marbas" wrote:
The newer Oculus SDK 0.4.x, takes control away from the developer by forcing the startup configuration dialog to be hidden.
The main reason for this is that the original resolution dialog was a minefield for VR. You could easily choose the wrong resolution, monitor, or full-screen mode.We are working with Unity to bring back the resolution dialog with options that won't break VR. Today, you can still make the resolution dialog appear by holding ALT after launching your app."zwickarr" wrote:
What is the official response from Oculus regarding using the Rift in the Unity editor?
We are working with Unity on it."zwickarr" wrote:
How does Oculus work on their projects? are they just making builds each time they want to test something?
With the current integration on Windows, I always run the Unity editor in extended mode and configure the DK2's orientation the windows Screen Resolution control panel. I tear out the Game view, drag it onto the Rift, and maximize it. On Mac, I use Maximize on Play and mirror the main monitor to the DK2. Both setups are far from ideal, but allow for rapid iteration. When I need a higher-quality preview or don't want to bother with setting up the editor, I just build a standalone player and set it to target the Rift display."khos85" wrote:
How can these concerns be raised to the oculus product manager/team?
Post to the forum, submit a ticket at https://support.oculus.com/hc/en-us/requests/new, or email support@oculus.com."Gerald" wrote:
blur issues in dark areas
This has to do with the time it takes DK2's screen to change colors. We are working on a system to fix it, but there isn't an ETA yet. I would suggest tone mapping to reduce the contrast at low illumination levels."MartinSchultz" wrote:
Has anyone gotten the mirroring working with latest drivers? I can try to press M or set up the screen mirror mode in code, but I never see a window appearing on the desktop mirroring the Rift contents.
If you run with SDK 0.4.4 in direct mode, mirroring should work. M will toggle it. Is it still giving you trouble?"HeadTrip" wrote:
Will the Unity platform support be a major difference?
Yes. Our 0.4 SDK is hard for Unity to support as a plugin. We've had to compromise some features to get basic functionality. First-party support from Unity will make it a lot more robust. We already have some internal prototypes that render to the Rift in direct or extended mode without the issues you currently see there. Unity just hands us the eye textures and the Rift gets a separate window. Unity then renders to the main window with a standard Camera, so you can show one of the undistorted eye textures or something completely different. We need to work out some remaining issues there and get it through review and testing on Unity's side, but we are working on it. - AnonymousNot applicable
"vrdaveb" wrote:
We need to work out some remaining issues there and get it through review and testing on Unity's side, but we are working on it.
This is fantastic news. :D
(I recently dumped testing on Mac because the workflow was painfully counter productive. I now send all builds to a dedicated Windows gaming machine, and advise anyone testing on Mac to do the same until the Unity workflow is a little[lot] less painful. )
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 months ago
- 1 month ago
- 3 years ago