Gamma color mode on Oculus with OpenXR.

Hello everyone,

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.

We’re using Unity 2020.3.31f1 and the recommended Oculus XR plugin from the package manager, which is Version 1.11.2.

I understand starting in Oculus XR Package version 2.0.0-preview.1 gamma color space is no longer supported with GLES and OpenXR, that seems to imply it should work in versions prior to that, correct? (source: Changelog | Oculus XR Plugin | 2.0.2-preview.1 )

Thanks in advance,
Andy

In the oculus tab at the bottom you need to use the legacy oculus input handling instead of openxr. Then it might work with openGL.
Have you tried looking at the visuals with linear color space? Usually it doesn’t degrade the visuals

Ah, we’ve got openXR support on our other VR platforms, so I’m really hesitant to add support for the legacy oculus input handling. That would be our third VR SDK, and we’re really hoping to use OpenXR as much as possible, since it’s working well for our app. It’s definitely a possibility, but it’s probably my least favorite option.

Yeah, the visuals are fairly messed up in linear color space. I think a lot will need to be redone, especially our custom lightmapping solution.

Lots of stuff like this when using linear on things that weren’t made for it: http://kortham.homeip.net/files/Unity_2022-06-30_11-13-55.png

http://kortham.homeip.net/files/vlc_2022-06-30_10-42-06.png

It didn’t work for me. I’m trying to build Oculus XR and Gamma. We can’t use Linear because it breaks our panoramas. Which version of oculus xr should I use with Unity 2021.3.13f to use Oculus and Gamma without Vulkan?

8608644--1155279--upload_2022-11-23_18-6-5.png

@AndyKorth_1 From the OpenXR spec here, OpenXR always expects colors to be linear: XrColor4f(3)

@kazak_tm out of curiousity, why are you not targeting Vulkan?

In our application, when playing a video from the url (in the unity video player), the build crashes. There are no errors in unity. I thought it was because of Vulkan. But no. This is a unity 2021.3.xx bug. It does not crash in versions 2019 and 2020. Unity does not crash in the editor. Only the build.
Now I’m using vulkan.
Do you know why the video crashes? It breaks only when playing the url a second time. The first time it plays, I close it. The second time I reproduce it - crash. When the video file is downloaded, everything is fine.

If it works in 2020 please make a bug report for it

Now the bug is only in unity 2021.3.13f1.
Everything works great in 2020.

As @DevDunk mentions, @kazak_tm - you should file a bug. I’m not aware of any crashes with 2021.3 with video playback.

1 Like

Can you help? How do I file a bug report for oculus quest 2? Or give a link where to file a bug?

In your project (or even better, a smaller reproduction project), press Help → Report a Bug

1 Like