色彩管理

色彩管理对于创建物理上准确且在多个显示设备上看起来很棒的渲染和资源非常重要。它既用于确保管道的所有部分正确解释颜色,也用于进行曝光和颜色分级等艺术变化。

../_images/render_color-management_different-exposures.jpg

同一张渲染图像的不同曝光情况。

Blender's color management is based on the OpenColorIO library. By using the same OpenColorIO configuration in multiple applications, the same color spaces and transforms will be available for consistent results.

工作流程

场景线性色彩空间

For correct results, different Color Spaces are needed for rendering, display and storage of images. Rendering and compositing is best done in scene linear color space, which corresponds more closely to nature, and makes computations more physically accurate.

../_images/render_color-management_linear-workflow.svg

线性工作流程的一个示例。

如果颜色是线性的,则意味着如果实际上我们将光子数加倍,则颜色值也会加倍。换句话说,如果我们有两张照片/渲染器,每张照片/渲染器都有两个灯光中的一个,并将这些图像添加到一起,结果将与两个灯光都打开的渲染/照片相同。由此得出,这种辐射测量线性空间最适合照片级渲染和合成。

然而,这些值并不直接对应于人类感知或显示设备的工作方式。和图像文件通常存储在不同的色彩空间中。所以我们必须小心地进行这种场景线性色彩空间的正确转换。

显示变换

将场景线性颜色转换为显示涉及技术和艺术选择。

正确显示渲染需要转换到显示设备色彩空间。计算机显示器与数字电影放映机或HDTV的工作方式不同,因此需要不同的转换。

还有艺术选择。部分原因是显示设备无法显示全部色彩,只有有限的亮度,因此我们可以挤出颜色以适应设备的色域。除此之外,给渲染器一个特定的外观也是有用的,例如好像它们已经印在真实的相机胶片上。默认的电影转换执行此操作。

../_images/render_color-management_linear-display-space.svg

从线性空间到显示设备空间的转换。

图像色彩空间

在加载和保存媒体格式时,记住色彩管理非常重要。诸如PNG或JPEG之类的文件格式通常将颜色存储在准备显示的色彩空间中,而不是存储在线性空间中。当它们在渲染中用作纹理时,它们需要首先转换为线性,当保存渲染以在Web上显示时,它们也需要转换为显示空间。

对于生产中的中间文件,建议使用OpenEXR文件。它们始终存储在场景线性色彩空间中,不会丢失任何数据。这使它们适合存储以后可以合成,颜色分级并转换为不同输出格式的渲染。

图像还可以包含实际上不是颜色的数据。例如,法线图或位移图仅包含矢量和偏移。此类图像应标记为非彩色数据,以便不会在其上进行色彩空间转换。

渲染设置

参考

编辑器

属性

面板

Render Properties ‣ Color Management

../_images/render_color-management_panel.png

Color Management properties.

These are color management settings that are used across Blender. These color management settings are Scene specific so settings can be customized per Scene. Color management can also be overridden when saving images; this behavior can be set in the Output Color Management Properties.

显示设备

正在查看的图像的设备。

大多数计算机显示器都配置为sRGB色彩空间,因此在计算机上工作时,通常应将此选项保留为默认值。当在连接到计算机的另一个显示设备上查看图像时,或者当写出要在另一个设备上显示的图像文件时,通常会改变它。

sRGB

Used by most displays.

XYZ

Commonly used by digital projectors.

Disables color management.

查看变换

这些是在同一显示设备上查看图像的不同方式。

标准

除了显示设备的转换之外,没有额外的转换。通常用于非照片级真实结果或视频编辑,其中特定外观已经烘焙到输入视频中。

电影

用于逼真的结果和更好地处理高动态范围的颜色。可以通过更改电影视图变换的Look选项来调整对比度。

电影日志

转换为电影日志色彩空间。这可用于导出到颜色分级应用程序,或通过展平非常黑暗和明亮的区域来检查图像。

原始

用于检查图像,但不用于最终输出。Raw在没有任何色彩空间转换的情况下提供图像。

假色彩

显示图像强度的热图,以显示动态范围。

胶片效果

从一组测量的胶片响应数据中选择艺术效果,这些数据大致模拟某些胶片类型的外观。在色彩空间转换之前应用。

曝光

用于控制在色彩空间转换之前应用的图像亮度(停止)。计算方法为: \(output\_value = render\_value × 2^{(exposure)}\)

Gamma

在色彩空间转换后应用额外的伽马校正。请注意,默认显示变换已经执行了适当的转换,因此这主要作为艺术调整的附加效果。

序列容器

The color space that the Sequencer operates in. By default, the Sequencer operates in sRGB space, but it can also be set to work in Linear space like the Compositing nodes, or another color space. Different color spaces will give different results for color correction, crossfades, and other operations.

The list of color spaces depends on the active OCIO config. The default supported color spaces are described in detail here: Default OpenColorIO Configuration

使用曲线

Adjust RGB Curves to control the image colors before the color space conversion. Read more about using the 曲线部件.

图像文件

使用图像文件时,默认色彩空间通常是正确的色彩空间。如果不是这种情况,可以在图像设置中配置图像文件的色彩空间。例如,需要手动更改的常见情况是使用或烘焙法线贴图或置换贴图。这样的地图实际上不存储颜色,只是编码为颜色的数据。这些图像应标记为非彩色数据。

Image data-blocks will always store float buffers in memory in the scene linear color space, while a byte buffer in memory and files in a drive are stored in the specified color space setting.

By default, only renders are displayed and saved with the render View Transformation applied. These images are the "Render Result" and "Viewer" image data-blocks, and the files saved directly to a drive with the Render Animation operator. However, when loading a render saved to an intermediate OpenEXR file, Blender cannot detect automatically that this is a render (it could be e.g. an image texture or displacement map). We need to specify that this is a render and that we want the transformations applied, with these two settings:

预览为渲染结果

使用视图变换,曝光,伽马,RGB曲线显示图像数据块(不仅仅是渲染)。用于查看线性OpenEXR文件中的渲染帧与直接渲染时相同。

另存为渲染图

图像保存操作符中的选项可应用视图变换,曝光,伽玛,RGB曲线。这对于将线性OpenEXR保存为显示空间中的PNG或JPEG文件非常有用。

OpenColorIO配置

Blender comes with a standard OpenColorIO configuration that contains a number of useful display devices and view transforms. The reference linear Color Space used is the linear color space with Rec. 709 chromaticities and D65 white point.

However, OpenColorIO is also designed to give a consistent user experience across multiple applications, and for this, a single shared configuration file can be used. Blender will use the standard OCIO environment variable to read an OpenColorIO configuration other than the default Blender one. More information about how to set up such a workflow can be found on the OpenColorIO website.

Blender目前使用以下色彩空间规则:

scene_linear

用于在内存中渲染,合成和存储所有浮点精度图像的色彩空间。

data

非颜色数据的色彩空间。

aces_interchange

ACES2065-1 color space. Used to derive chromaticities of the scene_linear color space, for effects such as blackbody emission.

color_picking

定义颜色选择器中的颜色分布。预期它在近似上是线性的,具有与场景线性色彩空间相同的色域,在场景线性色彩空间中将0..1值映射到0..1值,以便可预测地编辑材料反照率。

default_sequencer

序列编辑中使用默认的色彩显示空间。如未指定,则为 scene_linear

default_byte

字节精度图像和文件的默认色彩空间,如果未指定,则为 texture_paint

default_float

浮点精度图像和文件的默认色彩空间,如未指定,则为 scene_linear

The standard Blender configuration includes support for saving and loading images in ACES (code and documentation) color spaces. However, the ACES gamut is larger than the Rec. 709 gamut, so for best results, an ACES specific configuration file should be used. OpenColorIO provides an ACES configuration file, though it may need a few more tweaks to be usable in production.

Default OpenColorIO Configuration

Color Spaces

Blender's OCIO configuration file is equipped by default to read/write files in these color spaces:

sRGB

Standard RGB display space using Rec. 709 chromaticities and a D65 white point.

线性

Blender's native linear space meaning there is no gamma mapping, using Linear Rec. 709 chromaticities and a D65 white point.

Linear ACES

Also known as ACES2065-1, which is an ACES color space using the AP0 color primaries, a D60 white point and a linear transfer function. This color space is meant to store and transfer data with the most amount of possible color information.

Linear ACEScg

An ACES color space that is designed to be used for rendering and compositing. It uses the AP1 color primaries, a D60 white point, and a linear transfer function. While similar to ACES2065-1, this color space has a smaller color gamut. The smaller gamut allow it to better represent the colors that fit inside the CIE 1931 chromaticities diagram. Colors that lie outside the CIE 1931 chromaticities are generally not important to rendering and compositing because the human stimulus cannot represent these colors.

XYZ

标准线性XYZ空间。

Non-Color

用于包含非色彩数据的图像的色彩空间 (如法线贴图)。

原始

Does not automatically convert to linear; same as Non-Color.

电影日志

Filmic视图变换的中间日志颜色空间。

Filmic sRGB

Similar to sRGB but uses the Filmic view transform.