cancel
Showing results for 
Search instead for 
Did you mean: 

OpenXR and Gamma Color Mode in Unity

chelseahardy076
Explorer

We have a VR app we'd like to bring to Oculus platforms, and it's made in Unity using the gamma colorspace. We're finding that the OVRGradleGeneration build step reports the following:

 

"Oculus Utilities Plugin with OpenXR only supports linear lighting. Please set 'Rendering/Color Space' to 'Linear' in Player Settings"

 

It's not practical for us to convert our app to linear color space at this time. Is there a timeline for gamma color space support in Unity with OpenXR? Is it intended to only ever support linear color space? Any potential workaround for this? We are using OpenXR on other platforms, so we're not enthusiastic about moving to non-OpenXR options on Oculus. 

1 ACCEPTED SOLUTION

Accepted Solutions

chelseahardy076
Explorer

Well, we ended up putting in the work to upgrade to Unity 2021. We're using the Vulkan renderer, which works in Gamma color space. Still on Oculus XR plugin version 1.11.2, from the package manager inside Unity. So it all works, and the Unity upgrade was pretty easy for our project this time.

View solution in original post

9 REPLIES 9

chelseahardy076
Explorer

I forgot to mention. We're using Unity 2020.3.31f1 and the recommended Oculus XR plugin from the package manager, which is Version 1.11.2. It's hard to make sense of this, but I think that corresponds with "v33" on the Oculus site. 

chelseahardy076
Explorer

Well, we ended up putting in the work to upgrade to Unity 2021. We're using the Vulkan renderer, which works in Gamma color space. Still on Oculus XR plugin version 1.11.2, from the package manager inside Unity. So it all works, and the Unity upgrade was pretty easy for our project this time.

ZorakMantis2
Explorer

Hey, have you gotten any farther with this?  I'm trying to see if there is a sneaky way to use Gamma color space with the latest OpenXR backends.  I'm still using com.unity.xr.oculus 1.11.2 to keep it working.  Very frustrating for us as Linear space imposes a not-insignificant frame rate hit.

Hey Zorak,

Our current setup is working pretty well for us. We're on Unity 2012.3.17f1, using Oculus XR Plugin 3.2.2 from the Unity Asset Store. (Full plugin list here, if that helps: 

)

We are using Gamma space on all our platforms now, and it's working nicely. MSAA also works on all platforms- there were some combinations of MSAA where it doesn't work. We're using Vulkan on Quest, and that was a nice boost. 

I don't recall when we moved from "Oculus XR plugin version 1.11.2" to what now seems to be 3.2.2. We've got a mid-sized project, and I remember both the unity upgrade and the oculus xr plugin upgrade being easier than expected. 

 

Hope that helps!

ZorakMantis2
Explorer

Interesting.  So, if I use OpenGL and if I upgrade to 3.2.2 it won't let me build because of the color space issue.  Are you suggesting that I can get around this by switching to Vulkan?  And you've seen a little performance improvement with Vulkan, huh?  About to try it!

Yes, definitely move to Vulkan if possible. We're stuck on OpenGL on Pico because the headset doesn't support it... and on older versions of Unity we ran into bugs with Vulkan. Or unsupported features. It will depend on your render pipeline choice as well, unfortunately. The landscape changes quickly since it seems like there can be separate issues in different versions of each VR platform's plugin, each unity version, each unity render pipeline version, etc. My memory is a bit fuzzy, but there were render-backend specific issues with MSAA, other antialiasing options, and also full screen effects in VR. 

ZorakMantis2
Explorer

Yeah, last time I tried Vulkan, it was not ready for prime-time so I shelved it until now.

Just ran a few test builds - all with Gamma color space:

  • Vulkan + plugin 3.2.2 + legacy backend: improved performance, but dark graphics - like a color space mismatch
  • Vulkan + plugin 3.2.2 + OpenXR backend: good graphics, slower performance, CPU pegged at level 4,  much improved z-buffer resolution (we have a very "deep" scene.)

Not sure what to make of this all yet!

 

I'm trying to do the same thing, but it won't let me build. I'm still getting "Oculus Utilities Plugin with OpenXR only supports linear lighting. Please set 'Rendering/Color Space' to 'Linear' in Player Settings" even though I'm using Vulkan. Did you manually remove the check in in OVRGradleGeneration.cs or something?

That does sound like something I'd do, but I took a look at the project, and I don't have a OVRGradleGeneration.cs file anywher ein the project. The only Oculus plugin we have is via the package manager, and it's "com.unity.xr.oculus" version 3.2.2. I don't see anything labeled Oculus Utilities Plugin, but it sounds familiar... so I'm wondering if you've also got an older plugin installed too, or some extra utilities.