ValveSoftware / steamvr_unity_plugin

SteamVR Unity Plugin - Documentation at: https://valvesoftware.github.io/steamvr_unity_plugin/
BSD 3-Clause "New" or "Revised" License
1.03k stars 256 forks source link

Screen position out of view frustum #978

Open hdavid-bpg opened 3 years ago

hdavid-bpg commented 3 years ago

We are having an error when playing our Unity game build with the following error:

Screen position out of view frustum (screen pos 1024.000000, 0.000000, 1000.000000) (Camera rect 0 0 1024 768) UnityEngine.XR.XRDisplaySubsystem:GetCullingParameters(Camera, Int32, ScriptableCullingParameters&) UnityEngine.Rendering.Universal.XRSystem:CreateLayoutFromXrSdk(Camera, Boolean) UnityEngine.Rendering.Universal.XRSystem:SetupFrame(CameraData) UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderCameraStack(ScriptableRenderContext, Camera) UnityEngine.Rendering.Universal.UniversalRenderPipeline:Render(ScriptableRenderContext, Camera[]) UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal(RenderPipelineAsset, IntPtr, List`1)

This was tested using the following devices:

We have already submitted this to Unity and were told that it was from invalid culling parameters from the Steam VR plugin and was advised to use OpenXR.

https://fogbugz.unity3d.com/default.asp?1355340_fvospupu8mhn250f

Is it advisable and compatible if we use OpenXR instead of your plugin?

Is there a workaround or fix for these?

Thanks

1runeberg commented 3 years ago

we should probably fix this - is this happening with Vive Pro or Vive Pro 2? We've tested the plugin in Vive Pro before release so it might be an issue or error that wasn't visible to us at the time as this was on the very early days of the XR system in Unity. Which version of Unity is this happening btw?

If you have the chance however, OpenXR is indeed recommended moving forward as this is where our efforts are as well on our end (vr runtime).

stocks109 commented 3 years ago

we should probably fix this - is this happening with Vive Pro or Vive Pro 2? We've tested the plugin in Vive Pro before release so it might be an issue or error that wasn't visible to us at the time as this was on the very early days of the XR system in Unity. Which version of Unity is this happening btw?

If you have the chance however, OpenXR is indeed recommended moving forward as this is where our efforts are as well on our end (vr runtime).

Hi, this was tested on Vive Pro. My guess is it's probably happening on the Vive Pro 2. We also think is specific to URP. We are using a custom version of URP that has fixes provided to us from Unity (no idea if that matters).

This was happening in the latest LTS version of Unity 2020 (so 2020.3.15f2).

Noted about OpenXR.

hdavid-bpg commented 3 years ago

Hi,

I am having issues when I turn off the VR Loader from SteamVR and enable OpenXR.

I have already installed the necessary plugins for OpenXR.

DllNotFoundException: Unable to load DLL 'openvr_api': The specified module could not be found. at Valve.VR.OpenVRInterop.GetInitToken () [0x00000] in <00000000000000000000000000000000>:0 at Valve.VR.OpenVR+COpenVRContext.CheckClear () [0x00000] in <00000000000000000000000000000000>:0 at Valve.VR.OpenVR+COpenVRContext.VRSystem () [0x00000] in <00000000000000000000000000000000>:0 at Valve.VR.SteamVR_RenderModel.OnEnable () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.Object.Instantiate[T] (T original) [0x00000] in <00000000000000000000000000000000>:0 at GameManager._InitCamera () [0x00000] in <00000000000000000000000000000000>:0 at GameManager.Awake () [0x00000] in <00000000000000000000000000000000>:0 UnityEngine.Object:Instantiate(T) GameManager:_InitCamera() GameManager:Awake()

Is there a procedure or documentation somewhere to safely transition with the OpenXR plugin so that the SteamVR integration could properly work with it?

Are there additional requirements?

Thanks

hdavid-bpg commented 3 years ago

@1runeberg stocks109 has the answer to your question. We are using the 2020.3.13f1 version of Unity when this was tested.

Thanks

1runeberg commented 3 years ago

Hi,

I am having issues when I turn off the VR Loader from SteamVR and enable OpenXR.

I have already installed the necessary plugins for OpenXR.

DllNotFoundException: Unable to load DLL 'openvr_api': The specified module could not be found. at Valve.VR.OpenVRInterop.GetInitToken () [0x00000] in <00000000000000000000000000000000>:0 at Valve.VR.OpenVR+COpenVRContext.CheckClear () [0x00000] in <00000000000000000000000000000000>:0 at Valve.VR.OpenVR+COpenVRContext.VRSystem () [0x00000] in <00000000000000000000000000000000>:0 at Valve.VR.SteamVR_RenderModel.OnEnable () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.Object.Instantiate[T] (T original) [0x00000] in <00000000000000000000000000000000>:0 at GameManager._InitCamera () [0x00000] in <00000000000000000000000000000000>:0 at GameManager.Awake () [0x00000] in <00000000000000000000000000000000>:0 UnityEngine.Object:Instantiate(T) GameManager:_InitCamera() GameManager:Awake()

Is there a procedure or documentation somewhere to safely transition with the OpenXR plugin so that the SteamVR integration could properly work with it?

Are there additional requirements?

Thanks

OpenXR supersedes the SteamVR plugin - you can't use both at the same time. There are a number of features in SteamVR that we are working through to bring to our SteamVR OpenXR runtime support (e.g. Analog thresholds, Dpad, etc). Controller render models, while there is a Microsoft extension for it in OpenXR and I believe can be activated via Microsoft's unity plugin, we don't currently support that extension in our runtime.

Re: XR Plugin issue havent had a chance to look at it closer yet. 2020 was one of the versions we (including Unity qa) cleared the plugin for - it was early 2020 versions however, need to see what's changed and if i can repro with a vanilla Unity 2020 LTS. Can't recall atm if URP was the rendering pipeline that had issues with the new XR archi at the time and hence we couldnt provide support.

hdavid-bpg commented 3 years ago

Upon further checking the amount of effort and throwing out all existing systems done down the drain that can shatter companies for a fairly big game, if we move to OpenXR since we also support multiple platforms with different plugins and inherent components, and tools specific to those platforms. It is simply unfeasible for us in terms of financial, time, and the tremendous effort required to reimplement the same nature of tasks to migrate to OpenXR, we really need support for the issue presented and to continue to use the SteamVR / OpenVR loader for our current game.

stocks109 commented 3 years ago

Hi, we are at the tail end of the project so, as Hedrick said, we really can't redo our entire input system at this point especially considering that OpenXR / Unity integration appears to be lacking functionality.

Unfortunately, we cannot ship our game with Vive support broken.

We really need some support or direction as to what we should do at this point.

On Thu, Aug 12, 2021 at 7:48 AM hdavid-bpg @.***> wrote:

Upon further checking the amount of effort and throwing out all existing systems done down the drain that can shatter companies for a fairly big game, if we move to OpenXR since we also support multiple platforms with different plugins. It is simply unfeasible for us in terms of financial, time, and the tremendous effort required to reimplement the same nature of tasks to migrate to OpenXR, we really need support for the issue presented and to continue to use the SteamVR / OpenVR loader for our current game especially.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/steamvr_unity_plugin/issues/978#issuecomment-897611233, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKJQ2OMFJWVMFUFN2LS573T4O7K7ANCNFSM5BYL45IQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

-- Thanks in advance!

Chris Stockman Studio Director Bit Planet Games, LLC 512-940-6392

twitter: @BitPlanetGames facebook: https://www.facebook.com/bitplanetgames website: www.bitplanetgames.com

1runeberg commented 3 years ago

Hi, we are at the tail end of the project so, as Hedrick said, we really can't redo our entire input system at this point especially considering that OpenXR / Unity integration appears to be lacking functionality. Unfortunately, we cannot ship our game with Vive support broken. We really need some support or direction as to what we should do at this point. On Thu, Aug 12, 2021 at 7:48 AM hdavid-bpg @.**> wrote: Upon further checking the amount of effort and throwing out all existing systems done down the drain that can shatter companies for a fairly big game, if we move to OpenXR since we also support multiple platforms with different plugins. It is simply unfeasible for us in terms of financial, time, and the tremendous effort required to reimplement the same nature of tasks to migrate to OpenXR, we really need support for the issue presented and to continue to use the SteamVR / OpenVR loader for our current game especially. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#978 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKJQ2OMFJWVMFUFN2LS573T4O7K7ANCNFSM5BYL45IQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email . -- Thanks in advance! Chris Stockman Studio Director Bit Planet Games, LLC 512-940-6392 twitter: @BitPlanetGames facebook: https://www.facebook.com/bitplanetgames website:* www.bitplanetgames.com

Hi - didnt realize you're at the tail-end of your project? did the vive issue just came up recently? anything that's changed on the rendering side?

If you can send a minimal repro with vanilla Untiy that'd be great since we cant support custom unity builds.

stocks109 commented 3 years ago

Hi Rune,

Yes, I believe this was working when we implemented Vive controls about 6 months ago or so? Hedrick, please correct me if I'm mistaken.

Honestly, our main development platform is Oculus devices so we don't continually test Vive controls until we really need to.

W

On Thu, Aug 12, 2021 at 3:13 PM Rune Berg @.***> wrote:

Hi, we are at the tail end of the project so, as Hedrick said, we really can't redo our entire input system at this point especially considering that OpenXR / Unity integration appears to be lacking functionality. Unfortunately, we cannot ship our game with Vive support broken. We really need some support or direction as to what we should do at this point. … <#m-5903889077770448565> On Thu, Aug 12, 2021 at 7:48 AM hdavid-bpg @.**> wrote: Upon further checking the amount of effort and throwing out all existing systems done down the drain that can shatter companies for a fairly big game, if we move to OpenXR since we also support multiple platforms with different plugins. It is simply unfeasible for us in terms of financial, time, and the tremendous effort required to reimplement the same nature of tasks to migrate to OpenXR, we really need support for the issue presented and to continue to use the SteamVR / OpenVR loader for our current game especially. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#978 (comment) https://github.com/ValveSoftware/steamvr_unity_plugin/issues/978#issuecomment-897611233>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKJQ2OMFJWVMFUFN2LS573T4O7K7ANCNFSM5BYL45IQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email . -- Thanks in advance! Chris Stockman Studio Director Bit Planet Games, LLC 512-940-6392 twitter: @BitPlanetGames facebook: https://www.facebook.com/bitplanetgames website:* www.bitplanetgames.com

Hi - didnt realize you're at the tail-end of your project? did the vive issue just came up recently?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/steamvr_unity_plugin/issues/978#issuecomment-897936604, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKJQ2NZSED2PRSEMQBOJ7TT4QTNRANCNFSM5BYL45IQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

-- Thanks in advance!

Chris Stockman Studio Director Bit Planet Games, LLC 512-940-6392

twitter: @BitPlanetGames facebook: https://www.facebook.com/bitplanetgames website: www.bitplanetgames.com

1runeberg commented 3 years ago

oh ok, do we know which version of Unity was working at least? I can try to coord with Unity and see what's changed as long as it's not custom.

we can also start an email thread with your unity contact if you want: runeb@valvesoftware.com

1runeberg commented 3 years ago

just moving this back here as it might benefit other users-

status: with the URP Template for 2020.3.16f1 LTS and adding a tracked pose component in the Main camera along with our XR plugin, using Vive Pro, the frustum error msg doesn't come up.

i might be mistaken but I do vaguely recall a similar issue before for the Vive as well on an older version of Unity, and after troubleshooting it was something Unity fixed on their end.

I'm not sure if it's related to that or potentially the custom Unity build you have, since we can't repro with a vanilla 2020 LTS.

stocks109 commented 3 years ago

That's good to know.

Currently, the evidence seems to point that it has to do with our custom Unity URP.

On Thu, Aug 12, 2021 at 4:06 PM Rune Berg @.***> wrote:

just moving this back here as it might benefit other users-

status: with the URP Template for 2020.3.16f1 LTS and adding a tracked pose component in the Main camera, using Vive Pro, the frustum error msg doesn't come up.

i might be mistaken but I do vaguely recall a similar issue before for the Vive as well on an older version of Unity, and after troubleshooting it was something Unity fixed on their end.

I'm not sure if it's related to that or potentially the custom Unity build you have, since we can't repro with a vanilla 2020 LTS.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/steamvr_unity_plugin/issues/978#issuecomment-897968081, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKJQ2M2LASGDV25KN2VFVLT4QZXDANCNFSM5BYL45IQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

-- Thanks in advance!

Chris Stockman Studio Director Bit Planet Games, LLC 512-940-6392

twitter: @BitPlanetGames facebook: https://www.facebook.com/bitplanetgames website: www.bitplanetgames.com