Forum Discussion
ima747
11 years agoExplorer
Gray Display in Unity (Mac)
I have 2 projects where I am integrating the new SDK. Both had previous version of the SDK in them, which I have deleted (OVR and Plugins folders and the camera prefab which is all I used from the SDK in the scene). Using the 0.4.1 SDK on Mac I'm seeing the following when I import and then toss the camera prefab into my scene where it used to be.
Project #1
* If I don't turn off my 2d camera then I see that (in the past the OVR camera would take over so this wasn't needed)
* If I turn off or delete my 2d camera I get a gray screen. Selecting the OVRCameraController shows the same just flat gray in the preview so I presume I'm seeing that camera as I should, it's just that camera isn't getting the 2 eye cams...
* Selecting either eye shows the proper preview for each, implying that they are working fine, but not getting combined for the final output (hence the gray screen)
Project #2
* Doesn't have a 2d camera to disable or delete (purely a VR experiment)
* Sometimes I get the same gray screen (usually after trying the other project, which makes me guess it's somehow in the Oculus service/drivers/etc. rather than just unity since it will persist between launches of Unity and projects)
* One time I got the left eye working and the right eye got stuck displaying the health and safety dialog... can't reproduce
* Sometimes it works fine (mostly this)
* Sometimes when I get the gray screen if I turn the rift off and then back on it will being working (seems to be about 50% of the time I can fix it like this. This off/on approach has no effect on project 1)
Any thoughts? I've rebooted and replugged things etc. Didn't have issues in windows under 0.4.0 with a proper configuration (mirroring, etc.). Even when I get gray the demo scene in the config util works fine. It doesn't matter what screen the game view is on in unity so it doesn't appear to be hardware or Unity, or other drivers, seems localized to the Oculus mac SDK under some peculiar configuration in Project 1, which I have yet to figure out. Does the layer of the OVRCameraController play some roll by any chance?
Project #1
* If I don't turn off my 2d camera then I see that (in the past the OVR camera would take over so this wasn't needed)
* If I turn off or delete my 2d camera I get a gray screen. Selecting the OVRCameraController shows the same just flat gray in the preview so I presume I'm seeing that camera as I should, it's just that camera isn't getting the 2 eye cams...
* Selecting either eye shows the proper preview for each, implying that they are working fine, but not getting combined for the final output (hence the gray screen)
Project #2
* Doesn't have a 2d camera to disable or delete (purely a VR experiment)
* Sometimes I get the same gray screen (usually after trying the other project, which makes me guess it's somehow in the Oculus service/drivers/etc. rather than just unity since it will persist between launches of Unity and projects)
* One time I got the left eye working and the right eye got stuck displaying the health and safety dialog... can't reproduce
* Sometimes it works fine (mostly this)
* Sometimes when I get the gray screen if I turn the rift off and then back on it will being working (seems to be about 50% of the time I can fix it like this. This off/on approach has no effect on project 1)
Any thoughts? I've rebooted and replugged things etc. Didn't have issues in windows under 0.4.0 with a proper configuration (mirroring, etc.). Even when I get gray the demo scene in the config util works fine. It doesn't matter what screen the game view is on in unity so it doesn't appear to be hardware or Unity, or other drivers, seems localized to the Oculus mac SDK under some peculiar configuration in Project 1, which I have yet to figure out. Does the layer of the OVRCameraController play some roll by any chance?
23 Replies
Replies have been turned off for this discussion
- vrdavebOculus StaffDoes everything render correctly if you build and run a standalone player? Note the OVRCameraController's Camera is no longer used for compositing the two eye images. It is just a dummy that we keep for internal reasons, so you should ignore the preview there.
- ima747ExplorerGood to know about the camera. The camera's output does seem to be the output I am seeing however. If I alter it's culling mask I can get things to appear but obviously they're not correct: wrong projection setting, not 2 eyes, etc. since I presume the camera should just be a way to combine the render textures from the eye cams this is what I would expect, but through it I can confirm that the preview of that dummy camera is what I am seeing on the main output. And also disabling that camera doesn't make the output work.
Building an executable does seem to work correctly, but it's tricky to get it to the right monitor, and obviously far less convenient for debugging etc.
I figured out a way to make it work technically... When the game panel is in the primary Unity editor window it seems to work (I don't think it was doing this the other day but can't confirm so that's just speculation). When I pull the panel out into a floating window (so I can put it on the rift monitor) it just renders gray. I think I forgot to specify before, the game window shows a single cam preview when the game is *not* running (as you would expect) it's only when you hit play that it turns gray. - ima747ExplorerAlso per this other thread https://developer.oculusvr.com/forums/viewtopic.php?f=37&t=12510&p=169061#p169061, making 2 game tabs and floating one has the expected result: game tab in main unity window displays correctly, floating tab shows gray. This would imply it's a unity editor bug specifically to me, but not knowing it well enough I wouldn't know where to start looking for anything relating to tab floating...
- thorpHonored GuestI'm seeing a similar result. Developing on a MBP with Unity. I've tried the DK1 in extended and mirrored modes. I can get the rift binocular camera display when the game tab is docked and the game behaves normally, but when the game tab is torn off into a separate window i get a black screen. The app is Hitchhiker. There's a single cam for play without the rift and the ovr cam for when it's present. Detection of the HMD is happening correctly.
For what it's worth, I set the background color in the OVRCameraController to black, not gray and my "blank screen is black. ima747, is your OVRCameraController bg color set to grey? - ima747ExplorerThe background on the OVR camera is set to black (default, I haven't changed it). The gray appears to be the same color as the background of the window/panel, which makes sense since the camera default is set to clear nothing (thus not drawing any background), and since if I toggle culling masks on I can get it to render stuff the windows is definitely showing that camera (per previous post)
- vrdavebOculus Staff
"ima747" wrote:
When the game panel is in the primary Unity editor window it seems to work (I don't think it was doing this the other day but can't confirm so that's just speculation). When I pull the panel out into a floating window (so I can put it on the rift monitor) it just renders gray.
We are actually rendering over the game view from a native plugin. It sounds like we are doing it for the wrong context. When the game view renders gray, does another area of the editor turn black or show corruption? Does it help to hide the Scene view? - ima747Explorer
"vrdaveb" wrote:
It sounds like we are doing it for the wrong context.
This sounds like a *perfect* explanation of what's going wrong. There is no artifacting or anything strange in the normal scene etc. If I move the scene to the same window as the game view the game view renders correctly, so it would appear that the game panel is being targeted properly for rendering but perhaps it's getting the window context from the scene view... Definitely targeting the window containing the scene, and then the game tab.
If it is of any help I am running on a Mac Pro with an nvidia GTX 670, using nvidia drivers rather than OS standard, Mac OS 10.9.4. If requested I will configure and confirm behavior on MacBook Pro Retina 15" as well. Happy to provide any other requested details or trial any suggestions. - vrdavebOculus StaffThanks. This should behave better when the next release goes out.
- ima747ExplorerFantastic, thank you!
- CubicleNinjasProtegeDoes the gray display look something like this?

"vrdaveb" wrote:
When the game view renders gray, does another area of the editor turn black or show corruption?
I'm seeing corruptions. The top bar in Unity corrupts on play and stop. Textures also can be impacted by this, having the glitch effect. The game view looks like the below for a second.
A recent thread on this issue here as well."vrdaveb" wrote:
Thanks. This should behave better when the next release goes out.
Sweet!
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device