Converting Colors in Blueprints

Apply color transformation using Blueprints with OpenColorIO in Unreal Engine

You can apply OpenColorIO (OCIO) color transformations with Blueprints on any input texture, including a MediaTexture that plays back a video source, and get the converted results in a RenderTarget. This page shows how to use the Apply Color Space Transform Blueprint function in your project.


You must set up the following in your project to complete the sections below:

  • An OpenColorIO Configuration Asset. Refer to the OpenColorIO Quick Start for steps on creating this Asset.

  • A Blueprint Class, created from a Blueprint Actor that has an Event Tick.

Using the Apply Color Space Transform Function

Follow these steps to apply color conversions with Blueprints. These steps use the EditorUtilityActor Blueprint Class as an example.

  1. Double-click your Blueprint Class to open it in the Blueprint Editor.

  2. In the My Blueprint panel, under Variables > Components, click Add (+) Variable to create a new variable. Name the new variable InputTexture.

    Add new variable in Blueprint Class

  3. Next to the new InputTexture variable, click Make Public to make it visible outside this Blueprint.

    InputTexture variable set to public

  4. Set the Variable Type for the variable InputTexture to Object Types > Texture > Object Reference.

    Setting InputTexture variable type to Texture Object Reference

  5. Create two more variables and make them public:

    • OutputTexture with the Variable Type Texture Render Target 2D > Object Reference

    • ColorConversionSettings with the Variable Type Open Color IOColor Conversion Settings.

    Blueprint with all variables created

  6. Drag the InputTexture variable into the Event Graph, and choose Get InputTexture. This creates a new InputTexture node in the Event Graph.

    InputTexture variable dragged into Event Graph to create Get InputTexture node

  7. Repeat the process for the OutputTexture and ColorConversionSettings variables.

    Blueprint nodes created from all the variables

  8. Right-click within the Event Graph, and add a new Apply Color Space Transform node.

    Apply Color Space Transform node created

  9. Connect the nodes together:

    • Connect the output execution pin from the pre-supplied Event Tick node to the input execution pin of the Apply Color Space Transform node.

    • Connect the output data pin of the InputTexture node to the Input Texture input data pin on the Apply Color Space Transform node.

    • Connect the output data pin of the Output Texture node to the Output Render Target input data pin on the Apply Color Space Transform node.

    • Connect the output data pin of the Color Conversion Settings node to the Conversion Settings input data pin of the Apply Color Space Transform node.

    Blueprint nodes connected

  10. Compile and Save the Blueprint. Close the Blueprint Editor.

  11. Drag your Blueprint Asset into the level to create its Actor.

  12. In the Outliner, select your Blueprint Actor to open its Details panel.

  13. In the Details panel, expand the Default section, and set Input Texture to your desired input file.

  14. Create a Render Target Asset in the Content Browser, and set Output Texture to point to the new Render Target Asset.

    Details panel of the Blueprint Class Actor with all the variables assigned

  15. In the Details panel of the Blueprint Actor, expand the Color Conversion Settings section. Set Configuration Source to your OpenColorIO Configuration Asset, and adjust the Source Color Space and Destination Color Space to match the color space of the input and output media.

  16. Drag your Render Target Asset onto an Actor in the Level to preview your media with the color transformation. You can continue to adjust the Source Color Space and Destination Color Space settings to preview different outputs.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey