SteamVR Developer Hardware

SteamVR Developer Hardware

Unity: Switching between scenes without going to white room
Hello,

I am trying to make a loading scene that is used instead of the white default room.

I tried using a buffer scene that only has a CameraRig in it. This loads fine with no need for white room. Then when I call LoadLevel/LoadLevelAdditive to load the next scene and the scene goes to the white room then loads the wanted scene.

Although the above technique lowers the amount of time the player is in the white room I am unable to avoid it all together.

Can we change the white room to a pre-built "load scene"?

or

Choose to go to black instead of the white room?

Thanks!
< >
Showing 1-15 of 69 comments
Owlchemy Labs Jun 22, 2015 @ 5:50pm 
We're also curious as to how to handle this in Unity. Any blocking of the CPU is going to pull you back to the compositor so either we face the prospect of asynchronously and additively load/unload every single object in our game and building a complex loader system, avoiding the standard Unity scene structure altogether... or something else happens to make loading scenes easier with SteamVR.
aaron.leiby  [developer] Jun 23, 2015 @ 12:57pm 
The compositor interface has a FadeToColor which can be used for a fullscreen fade. You'll only want to use this for short periods though, like a blink or other short transition.

However, it also takes a bool for fading the background color. This is the color used by the "white room". Steam's VR mode sets this to a dark blue to match the Big Picture color scheme.

It used to be that this color got reset when the app hangs, but I think that has since been fixed (resets on disconnect only now), so I think you can set that yourself.

The other thing to do would be to set up an overlay with a loading screen (ideally with an animated progress bar), and explicitly control the fade to and from the grid using the compositor's FadeGrid function and force it to be a minimum time so it doesn't look like a flash if loading doesn't take particularly long.

If I find time, I'll try to put together an example.
Brainversation Jun 25, 2015 @ 6:23pm 
Hello Aaron,

I tried

SteamVR_Fade.Start(Color.black, 0.25f);

SteamVR_Fade.View(Color.black, 0.25f);

var vr = SteamVR.instance; if (vr != null && vr.compositor != null) vr.compositor.FadeToColor(0.25f, Color.black.r, Color.black.g, Color.black.b, Color.black.a, true);

and the color did not seem to stick between scenes. Maybe you fixed it in the next update?

Lastly, I tried working with SteamVR_Overlay, it would show the texture in the unity Game view but not in the hmd. Also systemOverlayVisible and activeSystemOverlay are always false.

Thanks again for the feedback.
Last edited by Brainversation; Jun 25, 2015 @ 6:24pm
patrick_hackett Aug 17, 2015 @ 2:57pm 
Just tried this as well. I called this:
vr.compositor.FadeToColor(0.0f, 1.0f, 0.0f, 0.0f, 1.0f, true);
on startup and noticed that my compositor color was red, as expected. When I hit a small hitch, the compositor would dip in red, again, as expected. However, when I triggered an intentional, long hang (by forcing a frame to be a couple thousand ms), the color wasn't saved. The compositor faded in white.

Note that I'm on the 1.0.3 version of the SteamVR plugin.
aaron.leiby  [developer] Aug 17, 2015 @ 3:25pm 
Hmm.. looks like it was still getting cleared out when apps stop sending more than 10 frames in a row. I've moved it to clear out when apps disconnect (assuming they had scene focus). I really need to switch to storing per-app and transitioning based on focus.

Related, I also recently added cubemap rendering support in the compositor, so instead of just setting a color, you can specify a skybox to display.
patrick_hackett Aug 17, 2015 @ 4:29pm 
Oh mother god that's perfect. Thanks Aaron!
patrick_hackett Sep 1, 2015 @ 5:45pm 
Hey Aaron, is there a way to manually control the amount the compositor has faded in? For controller disconnects, I'd like to fade in the compositor partially with an overlay that tells the user what's wrong. I don't want to pull them entirely out of the scene, though, so I can't use the current fade functions.
patrick_hackett Sep 2, 2015 @ 9:44am 
On second thought, Aaron, nevermind. Early tests show this idea is too jarring and we're going a different route.
aaron.leiby  [developer] Sep 2, 2015 @ 12:07pm 
For the dashboard, we attach a partially faded overlay to the hmd that takes up the entire field of view in order to "dim" the background.

We've been talking about applying a color matrix / offset that you can control to do color correction, desaturation, etc. without introducing banding, but haven't gotten to that yet.

samzh16 Sep 11, 2015 @ 1:10pm 
I would ideally like to go to pure white during the scene transition.

I have tried to LoadLevel(), LoadLevelAsync(), LoadLevelAdditive(), and LoadLevelAdditiveAsync(), but have not been able to prevent compositor "white room" from showing when switching scenes.

The best I have done is to keep everything in the same scene and use SteamVR_Fade() to make a transition with a white wash. This is unwieldy though, especially with scene level settings like lighting, fog, etc. that vary between scenes.

I have had a bit of success with vr.compositor.FadeToColor(), but the grid lines still show and vr.compositor.FadeGrid() appears to not affect the compositor grid.

Any thoughts on how to simply fade to white between scenes???

Thanks!

Brainversation Sep 11, 2015 @ 1:19pm 
@sammyh

Aaron mentioned we will have the ability to put a skybox instead of the white room in the next update. I beileve you can use that to do what you explained.

You can also use SteamVR_Fade.View(Color.white, [time]), but I'm not sure if it gets rid of the grid.

Hope that helps.
aaron.leiby  [developer] Sep 11, 2015 @ 2:40pm 
> vr.compositor.FadeGrid()

This is probably poorly name. It's for fading from the scene to the "grid" view (a.k.a. compositor or "construct").

> SteamVR_Fade.View(Color.white, [time])

This should do what you want. It draws a quad on top of everything after distortion has been applied. I really should remove this functionality though because it can be very disorienting to users to fade to a solid color. I'd much rather have folks set a skybox even if it's a simple color gradient, so players remain comfortable during these transitions. Rather than remove the Fade.View(color), I will likely take the color as a hint, and render a gradient for the horizon based on that value (which will be cheaper than a full on skybox).

Also, if you look at what SteamVR_Fade.View does, it's calling through to a compositor interface which takes a bool as the last parameter. By default, it's fading the "foreground" color. If you flip the value so it fades the "background" color instead, that will replace the default "white" value when fading to the compositor/construct with the grid still visible.

We are working on an SDK update to be released soon, and I will update the Unity plugin at the same time which will have the new skybox interface in it. I think this, plus a loading placard overlay (ideally with an animated progress bar) will make for the most pleasant user experience for dealing with level transitions.
Last edited by aaron.leiby; Sep 11, 2015 @ 2:41pm
samzh16 Sep 14, 2015 @ 9:45am 
SteamVR_Fade.View(Color.white, [time]) works within a single scene, but when a scene change occurs it forces back to compositor and the grid shows.

Hopefully the skybox will stay persistent throughout scene transitions.

I saw cubemap support in release notes for SteamVR. Are we just waiting on an update to unity plugin?

Thanks again,
Sam
aaron.leiby  [developer] Sep 14, 2015 @ 3:58pm 
Originally posted by sammyh:
SteamVR_Fade.View(Color.white, [time]) works within a single scene, but when a scene change occurs it forces back to compositor and the grid shows.

I can change this. It currently gets cleared after the game times out so we don't get stuck with a fade on, but I can move this to where the game disconnects instead. I need to do some work to store these things per-app though first.

Originally posted by sammyh:
I saw cubemap support in release notes for SteamVR. Are we just waiting on an update to unity plugin?

Correct.
samzh16 Sep 15, 2015 @ 7:37am 
Thanks Aaron!
< >
Showing 1-15 of 69 comments
Per page: 1530 50