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
- AnonymousI second....all that. And to make matters worse i'm running on a mac. (where most of my creationary tools live). I've tried windows 8.1 via bootmap the the same machine and seem to have TONS of trouble with DX11. Go figure.
Anyhow, I'm still looking for the configuration of screens that work. Currently i'm running 3 1080p screens with the center being switched in and out of my game view into the rift. This has it's own set of issues on the win and mac sides.
Sadly i'm finding it easier to develop (via DIVE plugin) for something like Google Cardboard and porting if back to Rift when the gameplay is ready. Thats ugly. :shock: - BLACKISHHonored GuestOne especially cool thing I was able to do with the DK1 and display mirroring was to have the app running in normal desktop mode, then at any point press a button to toggle on VR mode, pull out the Rift from under the desk and say "here, give it at try in VR!"
Having to quit the app and launch a special build (that will most likely crash on first try) is not blowing quite as many minds. ;)
My wishlist for the next beta (dare I dream?):- Direct to Rift from inside Unity (this would make in-editor testing so much easier)
- Toggle Direct to Rift displaying of the game at any time during a game, so I can mix normal and VR experiences more easily. Have fullscreen menu/settings screens (or whatever), then go to "put on your VR Goggles", go!
- MarbasHonored GuestI agree with all of that and more. I find myself letting my brand new DK2 collect dust and going back to the DK1 for development purposes (which is crazy!). Guess I'm glad I didn't sell my DK1 afterall.
Also I would add this to your list of annoyances, if you like me develop VR apps in Unity.
In-game "Out of range" message
This warning is ridiculous. Apart from destroying immersion, it doesn't even serve it's intended purpose, as the message is scaled too big to be able to read the entire phrase. There is no setting in the Oculus SDK for Unity to let the developer turn this warning off. It's FORCED ON, in the SDK. The only way it seems, to get rid of the lame warning, is to disable positional tracking all together. Which I did. Any games / demos I may release for the DK2 in the future will not support positional tracking, unless Oculus disables the warning in the SDK once and for all.
Unity player configuration overrides
The newer Oculus SDK 0.4.x, takes control away from the developer by forcing the startup configuration dialog to be hidden. Apart for the app resolution and quality, the config dialog serves as a tool for tweaking input settings, which is something Id like to offer to the users of my software.
I payed good money for Unity Pro and Id like to be in charge about the behavior of the apps I build with it! - FrostFireHonored GuestHave to agree, having to make a build to test things properly in unity, or go through all those steps really defeats the key iterative features of unity that make it so strong.
- moltonExplorerI wish they could update the DK2 firmware and somehow switch that screen from 1280x1920 to 1920x1080 so mirroring would work properly again. That being said, I have a pretty good system for keeping the workflow of my development about the same with the DK2. I can only get builds to work in extended mode, but when I develop I switch it to direct mode and leave the DK2 on standby. You can't look through it, but you can hold it in front of your face and simulate looking through it in the unity editor fine. If I wanted to run a build I'd have to switch it to extended, make the rift the primary display, etc.
The mirroring issue is much bigger than a workflow problem me though. I kind of was hoping to bring back taking turns multiplayer in my game, and if mirroring won't work with the CV1, that's a big problem for that. - zwickarrHonored GuestWhat is the official response from Oculus regarding using the Rift in the Unity editor?
Is Oculus working on a solution? or is it Unity who needs to provide more support? How does Oculus work on their projects? are they just making builds each time they want to test something? The iteration time lost when having to make a build when tweaking and tuning VR really hurts.
I also use Unreal 4 for my personal VR projects and the support has been really good. I think Epic really made sure their support was solid and with their latest release (4.1.1) developing for the DK2 is a joy. - khos85ExplorerHow can these concerns be raised to the oculus product manager/team? send an email? Do Oculus even monitor these forums? :)
I have to agree that with the DK2 the Unity integration is become worse in many ways! Oculus please listen to us and get things fixed. - GeraldExpert Protegeyeah I share a lot of the same issues, but I have to actually build each time I test something because of my system not liking extended mode. so I stay the whole time in DX11 which means I can build without any fear of crashes (my shader setup is very simple).
the phenomen of the direct2rift version sometimes needing a 2nd go before the blue light turns on is something I encounter too.
what is most annoying is that I no longer can adjust parameters at runtime. everything needs to be mapped to a key for testing. kind of annoying, but a workaround.
really hoping we will see a "direct to rift run from the editor" soon, that would be such a treat given the current situation. :)
on the other hand - I am very happy with the results so far, except for the blur issues in dark areas. that fix is even more important to me than direct rift support in the editor, because currently I have to adjust the art style to avoid the smear (gives me terrible eye strain). - BMWGROUPHonored GuestI have the same issues and it is slows down the developing process a lot. I hope there will be a fix for that soon.
- CurtisExplorerCould not agree more with OP, this workflow is a bit much at the moment. Can't wait for an update!
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
- 1 year ago
- 9 months ago