How to handle scene loading in Unity like when using SteamVR (compositor)
I'm currently evaluating how feasible adding a native Oculus SDK version of Holodance is and the greatest challenge I see so far is porting our approach to loading scenes over. The way we currently do this is based on Valve's SteamVR_LoadLevel example. In a nutshell: Set the skybox for the compositor, set a load texture in front of the player in the compositor, fade the game to the compositor, once that is done, stop rendering to VR (because the player now only sees what's in the compositor), start loading the scene and wait until it's done, do other things that could cause hiccups like prewarming shaders and a garbage collection round, start rendering to VR, fade back in. Play. In addition to what the standard SteamVR_LoadLevel does, we render a preview of the level that is being loaded, with some text and a progress bar using Unity UI, into a RenderTexture that we also show and update on changes in the compositor. Also, to make things a little more fancy, we have several textures on quads to have our logo in 3D on several planes. Theoretically we could even animate those planes but Unity does have some hiccups while loading levels (even when using async and additive), so we don't do this. Reviewing the API provided by Oculus Utilities for Unity 5.x, it seems that one class we could use is OVROverlay. Putting the texture to the right position is simply by using the Transform location and mesh primitive, right? Then, there's OVRScreenFade, which lets us fade ... but only to a color. So ... it seems there are two things missing: How can we fade full to the compositor and stop rendering to VR while we are doing things what would cause framedrops? When using SteamVR / OpenVR, this is done by calling CVRCompositor.SuspendRendering(true).Solved12KViews1like18CommentsHow to use Underlay mask shaders with LWRP?
Unity Version: 2019.1.7f1 Oculus SDK: 1.36 Device: Oculus GO Hello, currently I'm using the VR compositor layers to create nice looking UI, OVROverlay with "Overlay" type has been working fine, but I'm interested in using the "Underlay" option so I can have 3D Objects in the scene appear over the UI, such as the controller laser beam. The problem is that when I use the shaders suggested by oculus here, it appears pink in the game engine even when altering the texture/color while applied to an object in my scene. I'm using the Lightweight Render Pipeline in my project so I assume the issue is that I need to use a shader that works for the render pipeline, and when trying to upgrade the material, it says it isn't compatible. The shaders I'm referencing are (located in VR/Resources of oculus package) -Underlay Transparent Occluder.shader -Underlay Imposter.shader Any ideas here? Would it be simple enough to recreate the same functionality in shadergraph?947Views0likes0Comments[OVRPlugin][ERROR] Error -1006 in CommitTextureSwapChain() for LayerId 2
This error recently started happening in my application after I updated to the new version of the Oculus runtime. Has anyone else experienced this? It happens after disabling the in-compositor loading screen I use.637Views0likes0CommentsOVROverlay rendered correctly from HMD in editor - but from origin in builds
Does anyone know why sometimes, the compositor does no head-tracking or is stuck in front of your face (i.e. all layers from the compositor are rendered to the HMD from origin aka position / rotation zero, instead of from the HMD position)? So far, this seems very random to me: It always works correctly in the editor (i.e. OVROverlay instances are in world-space, and rendered from the actual HMD pose), but earlier, I made a build, and the build had the compositor stuck. Then, I did some work on the project, eventually did another build: Now it also worked correctly in the build. And currently, again, in the builds, the headset renders from origin. This only occurs in the compositor, otherwise, the game renders just fine. Also, I never saw this in the Unity Editor - only in builds (this is obviously on Oculus Rift, via Oculus SDK). I have now done quite a bit of experimentation trying to make this work correctly in builds again - but no matter what I do, the compositor is "stuck on the HMD" (i.e. all the OVRLayer instances are rendered with the camera at origin, instead of being rendered from the actual HMD position). Version information: Unity v2017.4.12f1, Oculus Utilities v1.32.0, OVRPlugin v1.32.0, SDK v1.33.0. I originally reported this here, but that thread became a little big.1.5KViews0likes2CommentsVR Compositor Cubemap display issue
Hello, Having a strange display issue with VR compositor cubemap in my game loader scene, the same code worked before so wondering if something changed in the driver/runtime.. (using Unity 5.4.5p4 - same problem in 5.4.4p3 - and Utilities 1.15). The cubemap OVR overlay now appears only in periphery of vision (almost as if there was a near clipping plane problem), so only clipped sections of the cubemap walls are visible, depending on headset orientation. Other compositor layers are not affected, removing them doesn't change anything, changing camera clipping plane distances doesn't affect it either. Tested all settings for the Cubemap texture, to no avail. Does this symptom ring a bell for anyone?566Views0likes0CommentsHow to set the render scale for a single world-space compositor layer in Unity?
I have a mesh with a texture that includes some critical text, and I'd like to render very sharply for readability. So I'm hoping to put it on its own world-space compositor layer and then bump the render scale on that layer only. I've associated the OVROverlay script with the world-space quad mesh in question. If I read the docs right, that should cause the Oculus renderer to treat it as its own compositor layer. But I can't see a good way to set the render scale for that layer ONLY. I could associate an OVRManager script (which does expose a render scale option) with the object, but it's my understanding that that behaves as a singleton under the hood, so it would apply the render scale universally rather than to just the one layer. Any guidance?1.3KViews0likes1Comment