Screen position out of view frustum ошибка unity

I’m trying to dynamically set the position and size of my camera in my scene,If I execute the below code the error occurs.It works fine if I set the properties in my scene,so the error is in my code

Error : Screen position out of view frustum (screen pos 959.000000, 454.000000) (Camera rect 0 0 960 907)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32)

using UnityEngine;
public class CameraInt : MonoBehaviour
{
    public Camera cam1;
    private int row, col;
    private float size;
    void Start()
    {
        MazeLoader ml = gameObject.AddComponent<MazeLoader>();
        row = ml.mazeRows;
        col = ml.mazeColumns;
        size = ml.size;
        float r = row * size / 2;
        cam1.transform.Translate(new Vector3(r, 0,col*size/2),Space.World);
        cam1.orthographicSize = r;
    }
}
  • Camera View : Orthographic
  • Unity version : 2019.3.13f1

БЛОГ НА HUSL

  • Деловая переписка на английском языке: фразы и советы
  • Принцип цикады и почему он важен для веб-дизайнеров
  • В популярных антивирусах для ПК обнаружили лазейки в защите

Автор вопроса: titov_andrei

Выдаёт на консоли:

Screen position out of view frustum (screen pos 0.000000, 0.000000, 0.300000) (Camera rect 0 0 0 0)
UnityEditor.DockArea:OnGUI()

Источник

Ответы (1 шт):

Автор решения: DarkOwl

Как и было отмечено в комментариях, данная ошибка связана с внутренними Unity-причинами. Ее можно игнорировать или обновить версию редактора на более новую.

→ Ссылка

licensed under cc by-sa 3.0 with attribution.

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account

Open

hdavid-bpg opened this issue

Aug 8, 2021

· 12 comments

Assignees

@1runeberg

Comments

@hdavid-bpg

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:

  • Vive Pro
  • Vive Controllers

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

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

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

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

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

Thanks

@1runeberg

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

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

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.

@1runeberg

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

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)
<#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?


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/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>
.

@1runeberg

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

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

That’s good to know.

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

Search Issue Tracker

Steps to reproduce:

1. Create a New Project

2. Select Main Camera in Hierarchy

3. Set Viewport Rect H to 0.0001 or lower in the Camera component

Result: Errors are shown in the Console.

Reproduced with: 5.6.0b6, 5.5.1p2, 5.4.3p3, 5.3.7p2.

A list of Errors shown in the Console:

Screen position out of view frustum (screen pos 0.000000, 0.000000, 1000.000000) (Camera rect 0 0 860 0)

UnityEditor.DockArea:OnGUI()

Screen position out of view frustum (screen pos 0.000000, 0.420000, 1000.000000) (Camera rect 0 0 860 0)

UnityEditor.DockArea:OnGUI()

Screen position out of view frustum (screen pos 860.000000, 0.420000, 1000.000000) (Camera rect 0 0 860 0)

UnityEditor.DockArea:OnGUI()

Screen position out of view frustum (screen pos 860.000000, 0.000000, 1000.000000) (Camera rect 0 0 860 0)

UnityEditor.DockArea:OnGUI()

Screen position out of view frustum (screen pos 0.000000, 0.000000, 0.300000) (Camera rect 0 0 860 0)

UnityEditor.DockArea:OnGUI()

Screen position out of view frustum (screen pos 0.000000, 0.420000, 0.300000) (Camera rect 0 0 860 0)

UnityEditor.DockArea:OnGUI()

Screen position out of view frustum (screen pos 860.000000, 0.420000, 0.300000) (Camera rect 0 0 860 0)

UnityEditor.DockArea:OnGUI()

Screen position out of view frustum (screen pos 860.000000, 0.000000, 0.300000) (Camera rect 0 0 860 0)

UnityEditor.DockArea:OnGUI()

Screen position out of view frustum SOLUTION

I was getting this error importing in the standard water assets for Unity. No thread seemed to give me a solution so I decided to try and tackle it myself to try and fix it, and it worked! So I’m just gonna be placing this here for any future Googlers.

This error seems to be thrown when the euler angles of a camera are 0. I’m not too well-informed on how graphics and rendering and such works, so I don’t really know why this is a problem, but it is an easy fix. Here’s how it looks in the Planar Reflection script for Unity’s water assets.

You go from

    reflectCamera.Render();

to

if (reflectCamera.transform.eulerAngles != Vector3.zero)
            {
                reflectCamera.Render();
            }

This should theoretically work on any other scripts throwing this rendering error.

Happy coding!

Понравилась статья? Поделить с друзьями:
  • Scx 4300 ошибка сканера треск
  • Scrap mechanic ошибка при запуске мира
  • Scx 4220 ошибка нет бумаги
  • Scrap mechanic ошибка failed to create graphics device
  • Scx 4200 ошибка сканера стучит