Difference between revisions of "OpenColorIO"

From Terragen Documentation from Planetside Software
Jump to: navigation, search
(What's Supported in v4.5.32)
(Replaced comparison image between Fusion and Terragen, with image comparing Fusion, Terragen and Nuke.)
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''We are currently working on integrating OpenColorIO (OCIO) into Terragen. This feature is in closed beta testing. If you're using a version of Terragen with OCIO options we hope you find this page useful. It will be updated as our OCIO features are worked on.'''
+
[[File:TG_OCIO_Project_Settings_Colour_Managment.PNG|None|500px|Terragen's Project Settings Colour Management interface]]
 +
 
 +
=== Overview ===
 +
 
 +
OpenColorIO (OCIO) is integrated into Terragen 4.5 Professional. It aims to allow you to work with colour spaces consistently with other applications in your pipeline.
 +
 
  
 
=== Requirements ===
 
=== Requirements ===
Line 26: Line 31:
  
 
When "Use OCIO" is enabled, rendered images should also look different in the Render View.
 
When "Use OCIO" is enabled, rendered images should also look different in the Render View.
 +
 +
When rendering with Path Tracer mode and viewing the 3D Preview in RTP mode, be sure to enable “Enable Path Tracing in the 3D Preview” button, above the 3D Preview pane.
 +
 +
[[File:TG_OCIO_RenderView_3DPreview_Settings_v002.jpg|None|867px|Terragen's 3D Preview pane and Render View pane using OCIO colour management and ACES colour space.]]
  
  
Line 42: Line 51:
 
This allows you to choose the colour space that is used by the colour parameters in most shaders, with some exceptions. It doesn't apply to atmosphere parameters, and some other shaders have parameters which are locked to a raw colour space. We'll update this document soon with more details.
 
This allows you to choose the colour space that is used by the colour parameters in most shaders, with some exceptions. It doesn't apply to atmosphere parameters, and some other shaders have parameters which are locked to a raw colour space. We'll update this document soon with more details.
  
You should choose a linear colour space for "shader params (linear)". Values stored in scene files are linear. Terragen automatically applies a gamma of 2.2 when editing colours with the colour picker.
+
You should choose a linear colour space for "shader params (linear)". RGB values stored in Terragen scene files have always been linear, and Terragen automatically applies a gamma of 2.2 when editing colours with the colour picker.
  
By default, Terragen tries to find a colour space in your OCIO configuration which is linear and uses Rec.709 primaries. It maps this to a virtual colour space called "linear_rec709". If it makes the wrong choice you will need to choose something more appropriate. Please ensure that you choose a linear colour space for the shader params space.
+
By default, Terragen tries to find a colour space in your OCIO configuration which is linear and uses Rec.709 primaries, based on the name. If it finds a colour space that it thinks is suitable, it maps it to a special built-in role called "linear_rec709" which Terragen always add to the list if it doesn't find a role by that name in your OCIO config. By using this built-in role, our goal is for project files to be portable between different OCIO configurations that have this colour space even if there isn't a standardized name for it. If it makes the wrong choice you will need to choose something more appropriate. Please ensure that you choose a linear colour space for the shader params space.
  
You might want to change this to the same colour space that you use for rendering. If you do, bear in mind that most assets generated by third parties will use linear Rec.709.
+
If you want to change this to a colour space other than linear Rec.709, bear in mind that most assets generated by third parties will have been built assuming linear Rec.709.
  
 
'''8-bit textures'''
 
'''8-bit textures'''
Line 52: Line 61:
 
This allows you to choose the colour space that is used by Image Map Shaders which have "convert to linear" enabled in their options. It is also used by some of the images in the Default Shader.
 
This allows you to choose the colour space that is used by Image Map Shaders which have "convert to linear" enabled in their options. It is also used by some of the images in the Default Shader.
  
By default, Terragen tries to find a colour space in your OCIO configuration which has the words "sRGB" and "texture" in its name. If it finds one it maps it to a virtual colour space called "sRGB_texture". If it makes the wrong choice you will need to choose something more appropriate.
+
By default, Terragen tries to find a colour space in your OCIO configuration which has the words "sRGB" and "texture" in its name. If it finds one it maps it to a special built-in role called "sRGB_texture" which Terragen always add to the list if it doesn't find a role by that name in your OCIO config. By using this built-in role, our goal is for project files to be portable between different OCIO configurations that have this colour space even if there isn't a standardized name for it. If it makes the wrong choice you will need to choose something more appropriate.
  
  
Line 59: Line 68:
 
* You can choose the rendering/working space from the roles defined in the OCIO config. It defaults to "scene_linear", e.g. "scene_linear (ACES - ACEScg)".
 
* You can choose the rendering/working space from the roles defined in the OCIO config. It defaults to "scene_linear", e.g. "scene_linear (ACES - ACEScg)".
 
* You can choose the display/view space from the displays/views defined in the OCIO config. It defaults to whichever display/view the OCIO config says is the default, e.g. "sRGB (ACES)".
 
* You can choose the display/view space from the displays/views defined in the OCIO config. It defaults to whichever display/view the OCIO config says is the default, e.g. "sRGB (ACES)".
* You can choose the colour spaces used by shader parameters (a linear colour space). It defaults to a role called "linear_rec709". If it doesn't find this in your OCIO config it tries to guess a suitable colour space by looking at the names of colour spaces in your config.
+
* You can choose the colour spaces used by shader parameters (a linear colour space). It defaults to a special built-in role called "linear_rec709". If it doesn't find this in your OCIO config it tries to guess a suitable colour space by looking at the names of colour spaces in your config.
* You can choose the colour space to interpret 8-bit texture reads (usually sRGB). It defaults to a role called "sRGB_texture". If it doesn't find this in your OCIO config it tries to guess a suitable colour space using the words "sRGB" and "texture".
+
* You can choose the colour space to interpret 8-bit texture reads (usually sRGB). It defaults to a special built-in role called "sRGB_texture". If it doesn't find this in your OCIO config it tries to guess a suitable colour space using the words "sRGB" and "texture".
 
* 3D Preview refreshes when toggling OCIO checkbox or changing colour spaces in Project Settings.
 
* 3D Preview refreshes when toggling OCIO checkbox or changing colour spaces in Project Settings.
 
* Render View refreshes when toggling OCIO checkbox or changing colour spaces in Project Settings.
 
* Render View refreshes when toggling OCIO checkbox or changing colour spaces in Project Settings.
Line 68: Line 77:
 
* Saving to an LDR file format (e.g. TIFF) saves the LDR (display) version of the image.
 
* Saving to an LDR file format (e.g. TIFF) saves the LDR (display) version of the image.
 
* Saving to EXR saves directly from the raw HDR render. Therefore you should interpret EXRs according to whichever "Rendering space" is selected, e.g. "scene_linear (ACES - ACEScg)". We presume this is what you want if you are using Terragen in a multi-app OCIO workflow.
 
* Saving to EXR saves directly from the raw HDR render. Therefore you should interpret EXRs according to whichever "Rendering space" is selected, e.g. "scene_linear (ACES - ACEScg)". We presume this is what you want if you are using Terragen in a multi-app OCIO workflow.
 +
  
 
=== Not Yet Supported ===
 
=== Not Yet Supported ===
Line 79: Line 89:
  
 
The default scene -- particularly the default atmosphere -- has colours which were chosen for a Rec. 709 (sRGB) pipeline. They don't know about your OCIO config. If you're using an ACES configuration, for example, you will find that the sky looks too green. We are going to figure out some new defaults for ACEScg, but you might find the following adjusments useful:
 
The default scene -- particularly the default atmosphere -- has colours which were chosen for a Rec. 709 (sRGB) pipeline. They don't know about your OCIO config. If you're using an ACES configuration, for example, you will find that the sky looks too green. We are going to figure out some new defaults for ACEScg, but you might find the following adjusments useful:
 +
 +
[[File:TG_OCIO_OtherConsiderations_01_DefaultAtmoNoToneMap_NoColMan.jpg|None|867px|Terragen default atmosphere with Terragen tone mapping.  Terragen project Colour Management disabled.]]
 +
 +
[[File:TG_OCIO_OtherConsiderations_02_DefaultAtmoNoToneMap_ColManACES.jpg|None|867px|Terragen default atmosphere without Terragen tone mapping.  Terragen project Colour Management enabled.  Display space is sRGB(ACES).]]
 +
 +
  
 
* '''Bluesky horizon colour''' (on the Main tab): reduce the green channel very slightly so that it's closer to the red value than the blue value. For a less saturated look, simply make it greyscale 0.25 (135, 135, 135).
 
* '''Bluesky horizon colour''' (on the Main tab): reduce the green channel very slightly so that it's closer to the red value than the blue value. For a less saturated look, simply make it greyscale 0.25 (135, 135, 135).
 
** Our latest recommendation is (135, 135, 135)
 
** Our latest recommendation is (135, 135, 135)
 +
 +
[[File:TG_OCIO_Atmosphere_Recommended_Settings.PNG|None|470px|Atmosphere Main tab.]]
 +
[[File:TG_OCIO_Atmosphere_ColorPicker_Recommended_Settings.PNG|None|280px|Colour picker values for Bluesky horizon colour.]]
 +
 +
 
* '''Bluesky density colour''' (on the Tweaks tab): increase the red channel so that it's a little closer to the green value.
 
* '''Bluesky density colour''' (on the Tweaks tab): increase the red channel so that it's a little closer to the green value.
 
** Our latest recommendation is (147, 178, 255)
 
** Our latest recommendation is (147, 178, 255)
 +
 +
[[File:TG_OCIO_Atmosphere_BlueskyDensityColour_Recommended.PNG|None|470px|Atmosphere Tweaks tab.]]
 +
[[File:TG_OCIO_Atmosphere_BlueSkyDensityColourPicker.PNG|None|280px|Colour picker values for Bluesky density colour.]]
 +
 +
 +
Now that the Bluesky adjustments have been made to the atmosphere, we can compare renders of a Terragen project using Colour Management with ACES colour space and a Terragen project with Colour Management disabled.
 +
 +
[[File:TG_OCIO_OtherConsiderations_03_RecommendedAtmo_ColManACES.jpg|None|867px|Terragen recommended atmosphere.  Terragen project Colour Management enabled.  Display space is sRGB(ACES).]]
 +
 +
[[File:TG_OCIO_OtherConsiderations_04_DefaultAtmoToneMap_NoColMan.jpg|None|867px|Terragen default atmosphere with Terragen tone mapping.  Terragen project Colour Management disabled.]]
 +
 +
 +
=== Examples ===
 +
The following example uses Terragen's Colour Management with the Academy Color Encoding System (ACES) config profile.  Special thanks to Bastien Muller for providing the rendered examples.
 +
 +
[[File:TG_OCIO_Comparision_FusionTerragenNuke_v002.jpg|None|867px|Side-by-side comparision of view-ports in Fusion, Terragen, and Nuke using ACES colour space.]]

Latest revision as of 06:21, 23 July 2020

Terragen's Project Settings Colour Management interface

Overview[edit]

OpenColorIO (OCIO) is integrated into Terragen 4.5 Professional. It aims to allow you to work with colour spaces consistently with other applications in your pipeline.


Requirements[edit]

1. Set up OCIO on your computer

If you're working at a company that uses OCIO, this has probably already been done for you.

If you don't have OCIO set up, follow these instructions:

  1. Download the OCIO Configurations from the OCIO website: https://opencolorio.org/configurations/index.html Download on the .zip link on that page.
  2. Extract the contents of the .zip file to your computer.
  3. Decide which configuration you want to use. We recommend the aces_1.0.3 configuration. You should see a file called config.ocio inside each of the configuration folders.
  4. Set an environment variable in your system called OCIO. The OCIO variable should be set to the full path and filename of the config.ocio file you want to use.

2. Restart Terragen after you change environment variables that affect OCIO

3. Enable OCIO in your Terragen project

In Terragen, OCIO is enabled or disabled on a per-project (per-scene) basis. Click on Project Settings at the lower left of the main window, then turn on Use OCIO if it is not already on.


First Tests[edit]

Toggling "Use OCIO" in Project Settings should cause the 3D Preview to refresh. If OCIO is configured correctly on your computer then you should also see the colours change in the 3D Preview. The difference may be subtle, but this depends on the OCIO configuration and the default choices for "Rendering space" and "Display space".

When "Use OCIO" is enabled, rendered images should also look different in the Render View.

When rendering with Path Tracer mode and viewing the 3D Preview in RTP mode, be sure to enable “Enable Path Tracing in the 3D Preview” button, above the 3D Preview pane.

Terragen's 3D Preview pane and Render View pane using OCIO colour management and ACES colour space.


Choosing Colour Spaces[edit]

Rendering space

You can change the "Rendering space" but this should usually be "scene_linear" or "rendering". The former is more likely to be compatible with a wide range of OCIO configurations, and this is what Terragen chooses by default.

Display space

You can change the "Display space", but this should match your monitor. Terragen defaults to whichever display/view the OCIO configuration says is the default. Often this is "sRGB", but if you're unsure what to use then check with the person who set up your OCIO configuration.

Shader params (linear)

This allows you to choose the colour space that is used by the colour parameters in most shaders, with some exceptions. It doesn't apply to atmosphere parameters, and some other shaders have parameters which are locked to a raw colour space. We'll update this document soon with more details.

You should choose a linear colour space for "shader params (linear)". RGB values stored in Terragen scene files have always been linear, and Terragen automatically applies a gamma of 2.2 when editing colours with the colour picker.

By default, Terragen tries to find a colour space in your OCIO configuration which is linear and uses Rec.709 primaries, based on the name. If it finds a colour space that it thinks is suitable, it maps it to a special built-in role called "linear_rec709" which Terragen always add to the list if it doesn't find a role by that name in your OCIO config. By using this built-in role, our goal is for project files to be portable between different OCIO configurations that have this colour space even if there isn't a standardized name for it. If it makes the wrong choice you will need to choose something more appropriate. Please ensure that you choose a linear colour space for the shader params space.

If you want to change this to a colour space other than linear Rec.709, bear in mind that most assets generated by third parties will have been built assuming linear Rec.709.

8-bit textures

This allows you to choose the colour space that is used by Image Map Shaders which have "convert to linear" enabled in their options. It is also used by some of the images in the Default Shader.

By default, Terragen tries to find a colour space in your OCIO configuration which has the words "sRGB" and "texture" in its name. If it finds one it maps it to a special built-in role called "sRGB_texture" which Terragen always add to the list if it doesn't find a role by that name in your OCIO config. By using this built-in role, our goal is for project files to be portable between different OCIO configurations that have this colour space even if there isn't a standardized name for it. If it makes the wrong choice you will need to choose something more appropriate.


What's Supported in v4.5.32[edit]

  • You can choose the rendering/working space from the roles defined in the OCIO config. It defaults to "scene_linear", e.g. "scene_linear (ACES - ACEScg)".
  • You can choose the display/view space from the displays/views defined in the OCIO config. It defaults to whichever display/view the OCIO config says is the default, e.g. "sRGB (ACES)".
  • You can choose the colour spaces used by shader parameters (a linear colour space). It defaults to a special built-in role called "linear_rec709". If it doesn't find this in your OCIO config it tries to guess a suitable colour space by looking at the names of colour spaces in your config.
  • You can choose the colour space to interpret 8-bit texture reads (usually sRGB). It defaults to a special built-in role called "sRGB_texture". If it doesn't find this in your OCIO config it tries to guess a suitable colour space using the words "sRGB" and "texture".
  • 3D Preview refreshes when toggling OCIO checkbox or changing colour spaces in Project Settings.
  • Render View refreshes when toggling OCIO checkbox or changing colour spaces in Project Settings.
  • HDR renders are interpreted using whichever "Rendering space" is selected.
  • LDR (display) version of the render is the result of tonemapping and transforming the HDR image using whichever "Display space" is selected.
  • The Render View displays the LDR (display) version of the rendered image.
  • Saving to an LDR file format (e.g. TIFF) saves the LDR (display) version of the image.
  • Saving to EXR saves directly from the raw HDR render. Therefore you should interpret EXRs according to whichever "Rendering space" is selected, e.g. "scene_linear (ACES - ACEScg)". We presume this is what you want if you are using Terragen in a multi-app OCIO workflow.


Not Yet Supported[edit]

  • Colour space for linear textures. At the moment, when you check "data is linear" it treats the image as raw data (in the rendering space).
  • Choice of colour space per shader or node. In this version, conversion is done the same for all images that have "convert to linear" checked, and individual colour parameters on shaders are predefined to either be convertible or not.
  • Independent choice of colour space for internal rendering and file output. Until we add this option, EXRs are output using the scene linear values that were generated by the renderer.


Other Considerations[edit]

The default scene -- particularly the default atmosphere -- has colours which were chosen for a Rec. 709 (sRGB) pipeline. They don't know about your OCIO config. If you're using an ACES configuration, for example, you will find that the sky looks too green. We are going to figure out some new defaults for ACEScg, but you might find the following adjusments useful:

Terragen default atmosphere with Terragen tone mapping.  Terragen project Colour Management disabled.

Terragen default atmosphere without Terragen tone mapping.  Terragen project Colour Management enabled.  Display space is sRGB(ACES).


  • Bluesky horizon colour (on the Main tab): reduce the green channel very slightly so that it's closer to the red value than the blue value. For a less saturated look, simply make it greyscale 0.25 (135, 135, 135).
    • Our latest recommendation is (135, 135, 135)

Atmosphere Main tab. Colour picker values for Bluesky horizon colour.


  • Bluesky density colour (on the Tweaks tab): increase the red channel so that it's a little closer to the green value.
    • Our latest recommendation is (147, 178, 255)

Atmosphere Tweaks tab. Colour picker values for Bluesky density colour.


Now that the Bluesky adjustments have been made to the atmosphere, we can compare renders of a Terragen project using Colour Management with ACES colour space and a Terragen project with Colour Management disabled.

Terragen recommended atmosphere.  Terragen project Colour Management enabled.  Display space is sRGB(ACES).

Terragen default atmosphere with Terragen tone mapping.  Terragen project Colour Management disabled.


Examples[edit]

The following example uses Terragen's Colour Management with the Academy Color Encoding System (ACES) config profile. Special thanks to Bastien Muller for providing the rendered examples.

Side-by-side comparision of view-ports in Fusion, Terragen, and Nuke using ACES colour space.

A shader is a program or set of instructions used in 3D computer graphics to determine the final surface properties of an object or image. This can include arbitrarily complex descriptions of light absorption and diffusion, texture mapping, reflection and refraction, shadowing, surface displacement and post-processing effects. In Terragen 2 shaders are used to construct and modify almost every element of a scene.

A single object or device in the node network which generates or modifies data and may accept input data or create output data or both, depending on its function. Nodes usually have their own settings which control the data they create or how they modify data passing through them. Nodes are connected together in a network to perform work in a network-based user interface. In Terragen 2 nodes are connected together to describe a scene.