SteamVR Developer Hardware

SteamVR Developer Hardware

View Stats:
aaron.leiby Mar 6, 2016 @ 11:10pm
Unity plugin update (v1.0.8)
This is live now.

http://u3d.as/content/valve-corporation/steam-vr-plugin

One pain point in upgrading to this version is that all OpenVR array definitions in C# have been switched to individual vars. Arrays in structs turned out to be the main culprit of per-frame garbage generation. Fixing up your code is very straight-forward (e.g. vCorners[0] becomes vCorners0).

You will want to upgrade to this version of the plugin before downloading the next Unity 5.4 beta build (b9) which introduces native OpenVR support.

Post any bugs or issues that you run into to this thread.

Thanks!


UPDATE:

(From a response on the second page of this thread.)

If you are currently on an older beta of Unity 5.4 (e.g. 5.4.0b8), you should hold off updating to this version of the plugin until you can install 5.4.0b9 or later.

If you upgrade to Unity 5.4 (b9+) you *must* upgrade to the latest plugin (v1.0.8), otherwise you will get conflicts with openvr_api.dll when building.

If you are on an older version of Unity (i.e. 5.0.1 through 5.3.x), then I recommend upgrading to this latest version. This will make your eventual upgrade to 5.4 smoother, but more importantly includes massive reduction in per-frame garage generation which reduces hitching due to garbage collection.
Last edited by aaron.leiby; Mar 7, 2016 @ 4:27pm
< >
Showing 46-60 of 83 comments
jashan Mar 19, 2016 @ 7:21am 
Is there a reason why the "native VR integration" removes the "Camera (head)" object? I'm asking because I believe in the past, the object you'd want to use if other objects needed access to the tracked camera was "Camera (head)", so that's what I'm usually assigning. Now that this is deleted, I'm getting quite a few missing reference exceptions and need to re-assign things.

Another issue is that instead of using local zero (position / identity rotation) regardless of how the camera transform was moved / rotated (as was previously the case), SteamVR now also uses the rather weird idea of Unity that you'd want to have whatever the Transform has as "base setting".

Is there a way to fix this? I'm also filing a bug report with Unity (once again - they had fixed that before and then reverted to the nonsense behavior). It makes a lot of sense to put that transform to a nice offset (e.g. Y = 1.72) and also some rotation (e.g. to look down a little bit) for non-VR mode. But using these offset when in VR is obviously giving the player a very weird experience.
wadams201 Mar 20, 2016 @ 5:51pm 
I just updated to 5.4.0b10 and I'm having a problem with the compositor -

VR: OpenVR ERROR! Compositor failed initialization with error code VRInitError_Init_InterfaceNotFound: "Interface Not Found (105)"!

and

OpenVR initialization failed. Ensure 'Virtual Reality Supported' is checked in Player Settings, and OpenVR is added to the list of Virtual Reality SDKs.
UnityEngine.Debug:Log(Object)
SteamVR:CreateInstance() (at Assets/SteamVR/Scripts/SteamVR.cs:75)
SteamVR:get_instance() (at Assets/SteamVR/Scripts/SteamVR.cs:44)
SteamVR_Render:Update() (at Assets/SteamVR/Scripts/SteamVR_Render.cs:399)

SteamVR is running fine, and settings are correct in player settings. Has anyone else run into this?


aaron.leiby  [developer] Mar 21, 2016 @ 5:55pm 
Originally posted by Mike Tucker:
Anyone know if there is a Git repo corresponding with this plugin? There's one for OpenVR: https://github.com/ValveSoftware/openvr

If not, would you (Valve) consider it? Commit logs make it much easier to understand changes between versions, and of course there's the Issues + comments features on Github to submit bugs.
Done.

https://github.com/ValveSoftware/openvr/tree/master/unity_package/Assets/SteamVR
wadams201 Mar 21, 2016 @ 8:05pm 
Originally posted by wadams201:
I just updated to 5.4.0b10 and I'm having a problem with the compositor -

VR: OpenVR ERROR! Compositor failed initialization with error code VRInitError_Init_InterfaceNotFound: "Interface Not Found (105)"!

and

OpenVR initialization failed. Ensure 'Virtual Reality Supported' is checked in Player Settings, and OpenVR is added to the list of Virtual Reality SDKs.
UnityEngine.Debug:Log(Object)
SteamVR:CreateInstance() (at Assets/SteamVR/Scripts/SteamVR.cs:75)
SteamVR:get_instance() (at Assets/SteamVR/Scripts/SteamVR.cs:44)
SteamVR_Render:Update() (at Assets/SteamVR/Scripts/SteamVR_Render.cs:399)

SteamVR is running fine, and settings are correct in player settings. Has anyone else run into this?


FIXED, EDIT:

By opting in to the SteamVR Beta, I got an newer version of SteamVR which fixed the problem.
Kubold Mar 22, 2016 @ 4:01am 
I don't really know what am I supposed to do with SteamVR_Controller script to get Haptics working. It is not used in any of the examples and the script itself from 1.0.8 says:

"! no monobehaviour scripts in the file or their names do not match the file name". Is seems like this is incorrect. Anyone has this too?
Originally posted by Kuba:
I don't really know what am I supposed to do with SteamVR_Controller script to get Haptics working. It is not used in any of the examples and the script itself from 1.0.8 says:

"! no monobehaviour scripts in the file or their names do not match the file name". Is seems like this is incorrect. Anyone has this too?


SteamVR_Controller.Input((int)m_steamVRTrackedObject.index).TriggerHapticPulse(Convert.ToUInt16(duration* 1000f));

m_steamVRTrackedObject = the SteamVR_TrackedObject component on controller
duration = duration of hatic pulse (float)
jashan Mar 23, 2016 @ 4:43am 
Originally posted by PsyKaw:
You can fix the error like this :
#if !(UNITY_5_4_OR_NEWER || UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0) camera.targetEye = TargetEyeMask.kTargetEyeMaskNone; #endif

I'm not sure - but wouldn't a more correct fix be:

#if !(UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0) camera.stereoTargetEye = StereoTargetEyeMask.None; #endif

To me, it looks like UT simply has changed the API from 5.4.0 beta 9 to beta 10, so this is something that actually should be done in Unity 5.4.
Red River Studio Mar 23, 2016 @ 1:01pm 
I just got a notification email from valve, as most of you probably have, saying that VR needs to be ready and registered by April 5th. Does the team have any insights into when a stable version will be in Unity, or should we just go for it with the SDK?
Earl Grey Mar 24, 2016 @ 10:24am 
I was curious about the 'Camera (ears)' object and the 'Steam VR_Ears' script. What speakers is the usingSpeakers bool referring to? Is this for games with spectator cameras to have mirrored audio from the VR head listener?
So I am having a very specific problem with the new unity plugin.

I am doing a bunch of fragment shaders that involve raytracing, and for some reason it seems like this update destroys the effect on these shaders.

I was wondering if there was something different about how the rendering was done in this new plugin that would change the way that shaders treat built in variables such as

_WorldSpaceCameraPos ??
Red River Studio Mar 25, 2016 @ 8:30pm 
Hello,
Without integrating the SDK, and using only the native 5.4 api, how can I get the camera back to the origin instead of in the standing position? I have my Vive settings set for "Seated" but whenever the game is run, I get a blue circle on the ground and my head level is towering above the scene.

Miss Stabby Mar 26, 2016 @ 4:35am 
can this tech be expected for Unreal Engine in the future anytime soon?
aaron.leiby  [developer] Mar 26, 2016 @ 10:32am 
Originally posted by Red River Studio:
Hello,
Without integrating the SDK, and using only the native 5.4 api, how can I get the camera back to the origin instead of in the standing position? I have my Vive settings set for "Seated" but whenever the game is run, I get a blue circle on the ground and my head level is towering above the scene.
You don't have to use the plugin, but if you download it and look at how SteamVR_Render.cs sets the tracking space, you can just copy that code. You will need to include openvr_api.cs from the plugin folder still.
Red River Studio Mar 27, 2016 @ 3:11am 
Yes, forcing the compositor to compositor.SetTrackingSpace(ETrackingUniverseOrigin.TrackingUniverseSeated); has solved my height issue. Thanks very much.

New issue: My layered cameras are now doubling up post process effects, or what appear to be doubled up. I have my garage cam ( one camera) which seems to handle all post processing fine, and then my race cam ( 2 cameras, near /far) which blow out the bloom, double the contrast, etc). Is this a bug or my own fault? For testing purposes, I can force disable all post processing, but thats hardly a final solution.
aaron.leiby  [developer] Mar 27, 2016 @ 12:12pm 
I would think you'd only want the post fx on the near/second rendered camera.
< >
Showing 46-60 of 83 comments
Per page: 15 30 50

Date Posted: Mar 6, 2016 @ 11:10pm
Posts: 83