All Headsets: Color Space and Color Scaling

The Oculus integration for Unreal engine offers functions and blueprints for affecting the displayed color of your apps. You can get the color space of the device your app runs on, set the color space for the client app, and do color scaling.

Color Space

Each Oculus device has its own color space, and colors display differently on monitors used during the development compared to devices. You can set the color space in which you have mastered your app so the appropriate colors are shown when the app runs. We recommend that you master your applications for the Oculus Rift CV1 color space for Rift CV1 and Rift S, and Rec.2020 color space for Oculus Quest and Go to maintain compatibility with VR apps on the Oculus Store. For more information about color spaces and Oculus devices, see the Color and Brightness Mastering Guide.

You can get the device color space and set the client app color space using project settings, blueprints or native code.

Project Settings

To set the color with Plugin settings for the project. Find the color settings in the general section. To access the settings:

  1. Open your project in UE4.
  2. Go to Edit > Project Settings
  3. Go to Plugins and select OculusVR The Plugins - OculusVR page displays.
  4. Find the General Settings section.

The following image shows an example of this page:

  • Enable Specific Color Gamut - Sets whether the target Oculus device performs a color space transformation on the app.
  • Color Space - Sets the target color space for the app from the drop-down. For more information, see Plugin Settings.

Color Space Blueprints

You can get the device color space and set the color space for the client app using blueprints. See:

Set Color Space in Code

You can also get the device color space and set the client app color space in code. See SetClientColorDesc in the Mobile SDK reference documentation.

Color Scaling

Color scaling can be used to inexpensively modify the brightness of all the pixels output by the compositor. It is commonly used for effects like fade-in or fade-to-black.

The Set Color Scale and Offset blueprint node performs the color scaling operation. In the Oculus compositor, once a frame is rendered, warped, and ready to be displayed, you can then multiply each pixel by the Color Scale, and add it to the Color Offset. Thus, newPixel = oldPixel * colorScale + colorOffset. Note that for mobile devices such as Oculus Quest and Go, Color Offset is not supported, so Color Scale is all that can be used.