色彩管理

Color management is important to create renders and assets that are physically accurate and look great on multiple display devices. It is used both to ensure all parts of the pipeline interpret colors correctly, and to make artistics changes like exposure and color grading.

../_images/render_post-process_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.

Workflow

场景线性色彩空间

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_post-process_color-management_linear-workflow.svg

线性工作流示例

线性色彩实际上意味着当我们加倍全局光的数量,那么颜色值也将加倍。换句话说,如果我们有两张图片/渲染图,分别有一或两束光打在上面,然后将这些图像拼接在一起,结果将是一张图像/渲染图拥有双方的光源。因此,根据辐射度来测量线性空间,可以实现图像般逼真的渲染和合成效果。

However, these values do not directly correspond to human perception or the way display devices work. and image files are often stored in different color spaces. So we have to take care to do the right conversion into and out of this scene linear color space.

Display Transforms

Transforming scene linear colors to display involves both technical and artistic choices.

Correct display of renders requires a conversion to the display device color space. A computer monitor works differently from a digital cinema projector or HDTV, and so needs a different conversion.

There is also an artistic choice to be made. Partially that is because display devices cannot display the full spectrum of colors and only have limited brightness, so we can squeeze the colors to fit in the gamut of the device. Besides that, it can also be useful to give the renders a particular look, e.g. as if they have been printed on real camera film. The default Filmic transform does this.

../_images/render_post-process_color-management_linear-display-space.svg

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

Image Color Spaces

When loading and saving media formats it is important to have color management in mind. File formats such as PNG or JPEG will typically store colors in a color space ready for display, not in a linear space. When they are used as textures in renders, they need to be converted to linear first, and when saving renders for display on the web, they also need to be converted to a display space.

For intermediate files in production, it is recommended to use OpenEXR files. These are always stored in scene linear color spaces, without any data loss. That makes them suitable to store renders that can later be composited, color graded and converted to different output formats.

Images can also contain data that is not actually a color. For example normal or displacement maps merely contain vectors and offsets. Such images should be marked as Non-Color Data so that no color space conversion happens on them.

设置

指引

面板:Properties editor ‣ Render ‣ Color Management

显示

显示设备

正在查看的图像的设备。

大多数显示器配置为 sRGB色彩空间,所以在电脑上作业时,此选项通常为默认值。除非有另外的显示设备连接到这台电脑去查看图像,又或是将图像文件输出到另一台设备上显示时,则这块的选项需要改变设置。

Rec709 通常用于高清电视,XYZ 和 DCI P3 是常见的数字投影仪。

设置为空时,色彩管理不可用。

渲染

视图

将图像转换到色彩空间时的效果,在同个显示设备上可以有多种不同的视图。

Standard
Does no extra conversion besides the conversion for the display device. Often used for non-photorealistic results or video editing where a specific look is already baked into the input video.
Filmic
For photorealistic results and better handling of high dynamic range colors. The contrast can be adjusted by changing the Look option for the Filmic view transform.
Filmic Log
Converts to Filmic log colorspace. This can be used for export to color grading applications, or to inspect the image by flattening out very dark and light areas.
Raw
用于检查图像而不是用于最终输出。RAW给出的图像不作任何色彩空间转换。
False Color
Shows a heat map of image intensities, to visualize the dynamic range.
曝光度
用于控制色彩空间转换前的图像亮度(in stops),计算公式为 \(output\_value = render\_value × 2^{(exposure)}\)
伽玛
Extra gamma correction applied after color space conversion. Note that the default display transforms already perform the appropriate conversion, so this mainly acts as an additional effect for artistic tweaks.
效果
在色彩空间转换之前,可以从一组标准的电影响应数据中选择一种艺术效果,这些数据大致模拟某些类型的影片的效果。
使用曲线
在色彩空间转换之前调整RGB曲线来控制图像颜色。阅读更多关于使用 曲线部件

序列编辑器

色彩空间
序列编辑中的色彩显示空间:默认情况下,序列编辑在色彩显示空间中的sRGB空间运行,但它也可以被设置在线性空间中运行,譬如合成节点又或者是另一个色彩空间运行。不同的色彩空间将产生不同的效果,例如颜色校正、交叉渐变等操作效果。

图像文件

When working with image files, the default color space is usually the right one. If this is not the case, the color space of the image file can be configured in the image settings. A common situation where manual changes are needed is when working with or baking normal maps or displacement maps, for example. Such maps do not actually store colors, just data encoded as colors. Those images should be marked as Non-Color Data.

线性色彩显示空间场景中,图像数据块将始终以浮动缓存的方式在内存中存储,而内存中的字节缓存和驱动器中的文件都存储在指定的色彩显示空间中,设置如下:

色彩空间
驱动器上的图像文件的色彩显示空间。取决于文件的格式,比如PNG或JPEG图像通常存储在sRGB,而OpenEXR图像存储在线性色彩显示空间。一些图像,如法线,凹凸或模板贴图不完全包含 '颜色' 信息,这种情况下没有进行色彩显示空间转换。因此对于这些图像,色彩显示空间应设置为

默认情况下只有显示和保存时渲染视图需要用到转换。这些渲染结果、查看器图像数据块以及文件被直接保存到渲染动画操作的驱动器上。然而,当加载一个已存储在中间OpenEXR文件的渲染对象,Blander不能自动检测出这是一个渲染(如图像纹理或位移图)。我们需要指定这是一个渲染对象,且希望应用转换操作,则设置这两个:

预览为渲染结果
显示图像数据块(不仅是渲染)情况如视图转换,曝光,伽玛,RGB曲线应用。和直接渲染一样,常用于查看在线性OpenEXR文件中渲染完成的帧。
另存为渲染图
图像的选项免除了用户的操作设置如视图变换,曝光,伽玛,RGB曲线。常用于在显示空间储存线性OpenEXR如PNG或JPEG文件。

OpenColorIO配置

Blender中OpenColorIO的标准配置,包含一系列常用的设置,例如显示设备和视图变换。参考用于 Rec. 709色度以及 D65白点的 线性色彩显示空间的 色彩空间

然而,OpenColorIO也被设计用来提供一致的用户体验,通过 多重应用 方式,共享的配置文件即可使用。Blender将使用标准的 OCIO环境变量读取OpenColorIO配置。更多关于如何建立这样一个工作流的信息可以在 OpenColorIO 网站 中查看。

目前使用的色彩显示空间规则如下:

场景线性色彩显示空间
用于渲染、合成以及在内存中存储所有浮点精度图像的色彩空间。
data
Color space for non-color data.
XYZ
Standard linear XYZ color space. Used for effects such as blackbody emission to convert from physical units to the scene_linear color space.
color_picking
Defines the distribution of colors in color pickers. It is expected to be approximately perceptually linear, have the same gamut as the scene_linear color space, map 0..1 values to 0..1 values in the scene linear color space for predictable editing of material albedos.
默认序列编辑设置
如果没有指定 线性场景 ,则在序列编辑中使用默认的色彩显示空间。
默认字节设置
字节精度的图像和文件的默认色彩显示空间,如果没有指定*纹理涂料*,则字节精度图像和文件使用默认的色彩显示空间。
默认浮度
如果没有指定 线性场景 ,浮动精度的图像和文件则使用默认的色彩显示。

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.