简体   繁体   中英

Loading Multiple Scenes Additive Makes Compositor kicks in (Steam VR Unity)

I am having a issue where i suppose to load a large number of objects in my scene on an event, so when ever i start loading these Scenesmy Vive/vr goes to compositor screen and it kinda flickers between my main scene and compositor screen until my loading of Scenes is finished.

So my question is how to stop this flickering, i am happy to call the compositor screen till my Loading is completed and then it switch back to my Main scene or something like that which can solve this flickering issue

i have been searching around that how to call compositor screen on my own or how to stop it being called when my Loading is in progress but in vein.

any help would be much appreciated because i am out of ideas.

Thanks...

Flickering and showing compositor screen is generally caused by Unity not being able to Render a frame. I'm sure you will be able to find which object(s) (if any in particular) is causing a lag in the Profiler Tab. I assume by "Loading" objects you mean Instancing them. If so, it depends:

a) If you instancing multiple identical objects - look up into GPU instancing methods

b) if the objects aren't unique, you may try to:

  1. Load scene asynchronously
  2. Place all (deactivated) objects on the first scene and instead of instancing or loading new scene, just activate them. This will only increase initial loading time.

Another things that you can use is:

  • Single Pass Stereo Rendering

  • use of ONLY or mostly baked lightning - which will SIGNIFICANTLY increase performance (that let me display in real time VR scene with model that counts more than 40 million vertices)

By default, SteamVR fades to grid whenever an app hangs. While of course it's ideal to keep your framerate above the threshold that would normally trigger this, there are many cases (such as loading scenes) where all the optimization in the world won't keep Unity from hanging long enough to trigger this issue.

Fortunately, this behavior can be disabled entirely! SteamVR Settings -> Developer -> Do not fade to grid when app hangs . This setting can be also be changed in the steamvr.vrsettings file which can be found using vrpathreg.exe . There, set steamvr.doNotFadeToGrid to true. This file is modified by the SteamVR Settings interface as well, but accessing it via the file directly allows you to modify settings for your target devices from within a game installer, for example.

Unfortunately as of now there isn't a way to configure this on a per-app basis, meaning the behavior will be turned off for all SteamVR apps on a user's machine. Tweaking this setting comes with the caveat that low framerates make users feel sick and the fade-to-grid feature prevents this from happening. However, in my experience, the feature is a nuisance that detracts from immersion far more than a temporary dip in framerate as long as you're following performance best practices, and if framerate is dropping anyway, this fade to grid feature causes intense flickering that's just as uncomfortable as low framerate.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM