OSVR/OSVR-Vive

HTC Vive black screen in unity applications

Bundenth opened this issue · 3 comments

Hi,

After downloading the DLL and configuring the OSVR Server as per instructions the HTC vive screens remain black when running simple Unity demos. The OSVR server starts correctly and acknowledges that a Vive is connected and calibrated (along with the 2 lighthouses and a controller), and indeed in the Unity Editor the HMD is tracked and the camera moves as expected when the Vive is moved. However, the HTC vive itself remains black.

I have the HTC vive dlls in the Plugins/Android/x86 folder, and I've checked the renderManager dlls are also present. What I've noticed is that when the scene is started, Unity shows an error in the console:

[OSVR-Unity] Failed to create RenderManager.
UnityEngine.Debug:LogError(Object)
OSVR.Unity.DisplayController:SetupRenderManager() (at Assets/OSVRUnity/src/DisplayController.cs:143)
OSVR.Unity.DisplayController:SetupDisplay() (at Assets/OSVRUnity/src/DisplayController.cs:176)
OSVR.Unity.DisplayController:Update() (at Assets/OSVRUnity/src/DisplayController.cs:317)

Has anyone tested the plugin in Unity?

You shouldn't have to add any Vive-related files to Unity - part of the purpose of OSVR is to make applications hardware independent. (Why are you putting files in the Android directory? Are you running the Vive from an Android device?)

Does the Render Manager D3D Present demo (included with the OSVR runtime installer) work on your Vive? It may be that you haven't quit steamvr all the way, or that your system doesn't support direct mode (or that you have a dual-GPU system which takes some coaxing to get Unity to handle correctly). In any case, the RenderManager example will provide access to much more useful debugging information.

I have run several unity applications on a Vive using this plugin, without modifying the applications at all - just swapping out OSVR Servers/server configurations.

@rpavlik thanks for the response.

(Apologies for the long response!)

My bad, I added the dll for the vive to the Plugins/x86 (not Android) folder as when I was configuring the same thing for the OSVR-Oculus it mentioned to place the dlls in that folder (I assumed it was the same case for Vive). I have tried removing it and the behaviour remains the same (Unity Editor tracks the headset but the Vive still prints black). Incidentally, the light status on the Vive is red all the way through.

I did try the RenderManager example but that did not work at all. I managed to copy the log output for various apps there:

RenderManagerD3DTest2D

[OSVR] Connecting to default (local) host
[OSVR] Client context initialized for org.opengoggles.exampleclients.TrackerCallback
[OSVR] Got connection to main OSVR server
[OSVR] Connection process took 1000ms: have connection to server, don't have path tree
[OSVR] Interface initialized for /controller/left/1
[OSVR] Could not resolve source for /controller/left/1
[OSVR] Interface initialized for /controller/right/1
[OSVR] Could not resolve source for /controller/right/1
[OSVR] Connecting to default (local) host
[OSVR] Client context initialized for com.osvr.renderManager
[OSVR] Got connection to main OSVR server
[OSVR] Got updated path tree, processing
[OSVR] Connected 0 of 0 unconnected paths successfully
[OSVR] Connection process took 47ms: have connection to server, have path tree
[OSVR] Interface initialized for /me/head
[OSVR] Constructed a TrackerHandler for com_osvr_Vive/Vive@localhost:3883 sensor 0
[OSVR] Successfully produced handler for /me/head
[OSVR] Interface initialized for /me/head
[OSVR] Interface initialized for /me/head
[OSVR] Display: HTC Vive/Vive PRE [Display descriptor note: This is a sample descriptor file only - please follow the instructions to use the ViveDisplayExtractor to generate a correct one for your device!]
[OSVR] Created an OSVR_DisplayConfigObject!
RenderManager::createRenderManager(): Got Display info from server (ignore earlier errors that occured while we were waiting to connect)
OSVRDisplayConfiguration::parse(): Using rgb point sample distortion.
OSVRDisplayConfiguration::parse(): ERROR: Couldn't open file HTC_Vive_meshdata.json!
createRenderManager: Could not parse /display string from server.
Could not create RenderManager
[OSVR] Client context shut down for org.opengoggles.exampleclients.TrackerCallback
vrpn_Endpoint::send_pending_reports(): select() failed.
Error (10093): Either the application has not called WSAStartup, or WSAStartup failed.
.
vrpn_Connection_IP::send_pending_reports: Closing failed endpoint.
vrpn_Connection::~vrpn_Connection: Connection was deleted while 2 references still remain.
vrpn_Endpoint::send_pending_reports(): select() failed.
Error (10093): Either the application has not called WSAStartup, or WSAStartup failed.
.
vrpn_Connection_IP::send_pending_reports: Closing failed endpoint.
vrpn_Connection::~vrpn_Connection: Connection was deleted while 5 references still remain.

EnableOSVRDirectMode

Attempting to enable DirectMode for HDK 1.3:
Success!
Attempting to enable DirectMode for HDK 1.2:
Success!

DirectModeDebugging

_OK, we opened the key!
No NVIDIA manual whitelist entry found. (Ideally, it should work fine like this for common displays...)
However, if the system has not been rebooted since the whitelist entry was removed, the previous whitelist behavior will still hold.

Getting number of VR-capable displays of type: OSVR (Early - SEN) (vendor ID hex 0xae4c)
No displays of this type reported.

Getting number of VR-capable displays of type: OSVR (Current - SVR) (vendor ID hex 0xd24e)
No displays of this type reported.

Getting number of VR-capable displays of type: Vuzix (vendor ID hex 0xf226)
No displays of this type reported._

I can see in the README file something regarding whitelisting the NVIDIA card (?), I have a single GPU NVIDIA GTX 980 with 365.10 drivers which seem to be higher than the ones required (361).

For the sake of completion, here is my server config file:

_{
"description": "This configuration supports video (so-called 'positional') and IMU fusion tracking, in addition to orientation-only tracking, with the OSVR HDK. It is configured for RenderManager applications in direct mode (portrait) on HDK 1.3 optics.",
"display": "displays/HTC_Vive.json",
"renderManagerConfig": "sample-configs/renderManager.direct.landscape.json",
"drivers": [{
"plugin": "com_osvr_VideoBasedHMDTracker",
"driver": "VideoBasedHMDTracker",
"params": {
"showDebug": false,
"includeRearPanel": true,
"headCircumference": 55.75,
"calibrationFile": "videotrackerCombinedCalibrationFile13.json"
}
}, {
"plugin": "org_osvr_filter_videoimufusion",
"driver": "VideoIMUFusion",
"params": {
"name": "HeadFusion",
"input": {
"imu": "/com_osvr_Multiserver/OSVRHackerDevKitPrediction0/semantic/hmd",
"faceplate": "/com_osvr_VideoBasedHMDTracker/TrackedCamera0_0/semantic/hmd/front"
},
"eyeHeight": 0,
"cameraIsForward": true
}
}]

}_

I can see some errors there, particularly the one referring to the HTC_Vive_meshdata display file (which I have as an optional display file; using it in the OSVR server config crashed my server).

Thanks in advance!

Yeah, looks like you've found some old documentation: no hardware plugins
should have you put anything in your unity plugins folder. If you find
where it says to do this, please file an issue. Unity is strictly a client,
and the hardware is strictly on the server side: putting hardware plugins
in a folder in Unity will have at best no effect at all.

The note that appears when the display descriptor is loaded gives me the
answer here: looks like you never finished installing the OSVR Vive plugin
properly. It has to generate two files based on your specific unit, with
absolute paths to where your server is. See the instructions in the OSVR
docs repo and be sure to do the display extractor step: that's the key one
you've missed.

On Thu, Jul 14, 2016, 4:20 AM Bundenth notifications@github.com wrote:

@rpavlik https://github.com/rpavlik thanks for the response.

(Apologies for the long response!)

My bad, I added the dll for the vive to the Plugins/x86 (not Android)
folder as when I was configuring the same thing for the OSVR-Oculus it
mentioned to place the dlls in that folder (I assumed it was the same case
for Vive). I have tried removing it and the behaviour remains the same
(Unity Editor tracks the headset but the Vive still prints black).
Incidentally, the light status on the Vive is red all the way through.

I did try the RenderManager example but that did not work at all. I
managed to copy the log output for various apps there:

RenderManagerD3DTest2D

[OSVR] Connecting to default (local) host [OSVR] Client context
initialized for org.opengoggles.exampleclients.TrackerCallback [OSVR] Got
connection to main OSVR server [OSVR] Connection process took 1000ms: have
connection to server, don't have path tree [OSVR] Interface initialized for
/controller/left/1 [OSVR] Could not resolve source for /controller/left/1
[OSVR] Interface initialized for /controller/right/1 [OSVR] Could not
resolve source for /controller/right/1 [OSVR] Connecting to default (local)
host [OSVR] Client context initialized for com.osvr.renderManager [OSVR]
Got connection to main OSVR server [OSVR] Got updated path tree, processing
[OSVR] Connected 0 of 0 unconnected paths successfully [OSVR] Connection
process took 47ms: have connection to server, have path tree [OSVR]
Interface initialized for /me/head [OSVR] Constructed a TrackerHandler for
com_osvr_Vive/Vive@localhost:3883 sensor 0 [OSVR] Successfully produced
handler for /me/head [OSVR] Interface initialized for /me/head [OSVR]
Interface initialized for /me/head [OSVR] Display: HTC Vive/Vive PRE
[Display descriptor note: This is a sample descriptor file only - please
follow the instructions to use the ViveDisplayExtractor to generate a
correct one for your device!] [OSVR] Created an OSVR_DisplayConfigObject!
RenderManager::createRenderManager(): Got Display info from server (ignore
earlier errors that occured while we were waiting to connect)
OSVRDisplayConfiguration::parse(): Using rgb point sample distortion.
OSVRDisplayConfiguration::parse(): ERROR: Couldn't open file
HTC_Vive_meshdata.json! createRenderManager: Could not parse /display
string from server. Could not create RenderManager [OSVR] Client context
shut down for org.opengoggles.exampleclients.TrackerCallback
vrpn_Endpoint::send_pending_reports(): select() failed. Error (10093):
Either the application has not called WSAStartup, or WSAStartup failed. .
vrpn_Connection_IP::send_pending_reports: Closing failed endpoint.
vrpn_Connection::~vrpn_Connection: Connection was deleted while 2
references still remain. vrpn_Endpoint::send_pending_reports(): select()
failed. Error (10093): Either the application has not called WSAStartup, or
WSAStartup failed. . vrpn_Connection_IP::send_pending_reports: Closing
failed endpoint. vrpn_Connection::~vrpn_Connection: Connection was deleted
while 5 references still remain.

EnableOSVRDirectMode

Attempting to enable DirectMode for HDK 1.3: Success! Attempting to
enable DirectMode for HDK 1.2: Success!

DirectModeDebugging

_OK, we opened the key!
No NVIDIA manual whitelist entry found. (Ideally, it should work fine like
this for common displays...)
However, if the system has not been rebooted since the whitelist entry was
removed, the previous whitelist behavior will still hold.

Getting number of VR-capable displays of type: OSVR (Early - SEN) (vendor
ID hex 0xae4c)
No displays of this type reported.

Getting number of VR-capable displays of type: OSVR (Current - SVR)
(vendor ID hex 0xd24e)
No displays of this type reported.

Getting number of VR-capable displays of type: Vuzix (vendor ID hex 0xf226)
No displays of this type reported._

I can see in the README file something regarding whitelisting the NVIDIA
card (?), I have a single GPU NVIDIA GTX 980 with 365.10 drivers which seem
to be higher than the ones required (361).

For the sake of completion, here is my server config file:

_{
"description": "This configuration supports video (so-called 'positional')
and IMU fusion tracking, in addition to orientation-only tracking, with the
OSVR HDK. It is configured for RenderManager applications in direct mode
(portrait) on HDK 1.3 optics.",
"display": "displays/HTC_Vive.json",
"renderManagerConfig":
"sample-configs/renderManager.direct.landscape.json",
"drivers": [{
"plugin": "com_osvr_VideoBasedHMDTracker",
"driver": "VideoBasedHMDTracker",
"params": {
"showDebug": false,
"includeRearPanel": true,
"headCircumference": 55.75,
"calibrationFile": "videotrackerCombinedCalibrationFile13.json"
}
}, {
"plugin": "org_osvr_filter_videoimufusion",
"driver": "VideoIMUFusion",
"params": {
"name": "HeadFusion",
"input": {
"imu": "/com_osvr_Multiserver/OSVRHackerDevKitPrediction0/semantic/hmd",
"faceplate":
"/com_osvr_VideoBasedHMDTracker/TrackedCamera0_0/semantic/hmd/front"
},
"eyeHeight": 0,
"cameraIsForward": true
}
}]

}_

I can see some errors there, particularly the one referring to the
HTC_Vive_meshdata display file (which I have as an optional display file;
using it in the OSVR server config crashed my server).

Thanks in advance!


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#18 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AADuyZomO81EnoSfJpb3dFfF2qBMG95zks5qVf9zgaJpZM4JLnT9
.

Ryan A. Pavlik, Ph.D.
CTO - OSVR Platform
Sensics, Inc.
www.sensics.com

Latest news and blog posts (subscribe here
http://sensics.com/subscribe-to-our-mailing-list/ to get weekly updates):

July 20: Conversation with Dio Gonzalez, Principal Software Engineer at
Unity Labs
http://sensics.com/vrguy-podcast-episode-19-dio-gonzalez-principal-software-developer-unity-labs/

July 19: Sensics and LaputaVR team up to provide OSVR support to LaputaVR
devices
http://sensics.com/sensics-laputa-vr-team-provide-osvr-support-laputa-vr-devices/

July 13: VRguy podcast: Shaun Williams, CEO of MAG games
http://bit.ly/29vCqIW