Zh/Color Correction
- 对于调色(色彩校正)实体,详见color_correction, color_correction_volume, and
fog_volume.
Color correction是改变色彩色调平衡以获取效果的概念,手段。它主要是可以传达情绪基调和重要信息。
- 蓝色或者灰色的冷色调,可以感受到孤单与冷酷。(e.g. Wiki:少数派报告).
- 较亮,较高饱和的色彩例如红色黄色会产生相反的效果,从而加剧情感。 (Wiki:Hero,英雄).
- 调色同样可以复制来自其他介质的情感基调。(Wiki:电影罪恶之城Sin City).
在游戏中,调色具有独特的动态好处。它可以反映地图或者玩家状态,也可以指定位置与对象。
使用工具
起源的调色调用在'lookup tables'键值上,96KB的.raw
文件。由游戏的内置工具来创建它们,并通过实体 color_correction (point运用到游戏内(有衰减?) 以及color_correction_volume (brush).。调色是非常便宜的。
使用调色器:
- 在您的地图创建至少一个color_correction或者color_correction_volume实体,但是请勿给其lookup table,and, in the case of color_correction, disable falloff. You must be in range of the entity before the correction tools have any visible effect.
- Ensure that correction is enabled in Video options > Advanced (or set
mat_colorcorrection 1
). - If you are working in a multiplayer game, enable
sv_cheats
. - Type
colorcorrectionui
into the console.



sv_lan
must be set to 1 before loading a map to preview color correction.In the window that appears, correction filters can be:
- Created and managed with the buttons in the bottom of the layers window.
- Enabled or disabled by clicking their circular icon.
- Made stronger or weaker with the Blend slider.
- Duplicated with Alt + Double-click.
There is also a layers window for managing filters and a 'Lookup View' for previewing their effect on a grid of colored pixels.
The filters
- Curves - Search for tutorials
- Works in exactly the same way as a curves tool in an image editor. The horizontal axis represents a color value in the original image; the vertical axis represents its brightness in the final image. Click and drag to manipulate the line. Black is in the bottom left and white is in the top right.
错误:Points cannot be deleted. [todo tested in ?]
错误:Drag release is only registered when the cursor is over the graph area. This makes placing points very close to its edge difficult. [todo tested in ?]
- Levels - Search for tutorials
- Again, this filter is directly analogous to levels tools in image editors. Both sliders control the range of colors in the image: the top slider 'cuts off' values outside its range to pure black (left) or white (right), while the bottom slider compresses the image's range to fit inside it. The top slider's middle pip weights the image's range (i.e. adjusts gamma).
错误:If two pips come to overlap, separating them can be impossible. [todo tested in ?]
- Selected HSV
- This is the most complex filter. The image is a real-time thumbnail of the current scene in which colors currently selected are highlighted red. It can be clicked to select a color, or the Select button can be pressed to select a color directly from the scene (hit Esc afterwards). Hold Ctrl to select multiple colors in either situation.
- Tolerance and Fuzziness allow the selection to be tweaked; Hue, Saturation and Value (i.e. HSV) allow effects to be applied to it. Colorize causes the hue slider to replace instead of adjust.
提示:The drop-down menu contains many different algorithms, not all of which require clicking to pick color(s).
错误:There are several situations where the preview thumbnail can lock up. The only known solution is to restart the engine. [todo tested in ?]
- Lookup
- Loads a pre-existing lookup table.
错误:Folder view starts in the root of the underlying game, not the current mod. [todo tested in ?]
- Balance - Search for tutorials
- Another tool identical to its desktop brethren. It biases color channels across bright, middling and/or dark areas of the scene.
Color intensity (fix)
In some cases, a .raw file you've made will appear much more intense when loading it in-game than it did in the editor when it was created. If this happens, consider the following steps:
- Create a neutral .raw file (i.e. delete all .raw files, open your map, open the color correction ui and click save without creating filters)
- Create your desired color correction and save it.
- Open both .raw files in Photoshop, paste your .raw over the neutral one, set the layer opacity to 50% for your color correction and then save it as a .raw with the appropriate filename (i.e. the one your map will be looking for)
注意:If Photoshop prompts import options, use: Width 32px, Height 1024px, 3 Channels, Interleaved, 8 Bits, and 0 header size.
Alternatively, you can set the 'Blend' of each filter to half (127) before saving in the color correction tools, which will result in essentially the same thing.
Console commands
- colorcorrectionui
- mat_colcorrection_disableentities 0/1
- mat_colorcorrection 0/1
- sv_allow_color_correction 0/1 (Allow or disallow clients to use color correction on this server)
.RAW File Format
The file serves as a look up table for RGB values. Each entry is a 3 byte RGB value, first byte being the red value. The table is 3 dimensional 32x32x32, taking an RGB value as a coordinate and looking up the output RGB value. Each subsequent entry indicates an increase in the R byte by a value of 4 (since 256 intensities divided by 32 entries equates to a step of 4). At the entry where the R value would be 256, the value wraps to zero and increases the G byte by a value of 4. The same occurs with the green value wrapping at 256, and increasing the B byte by 4. The index of the entry can be determined as such, where R, G, and B are integer values from 0 to 255.
//note that integer division is used, and any decimal values are truncated before the next operation int EntryIndex = (R \ 4) + ((G \ 4) + (B \ 4) * 32) * 32
When used in game, the values from the 32x32x32 table are interpolated to fit the 256x256x256 color space.
Color_correction Working on sv_pure server (fix)
Sometimes Color_correction will not work on a sv_pure server. Add this code to your whitelist
whitelist { //MATERIALS materials\colorcorrection\correction_file_name_here.raw from_steam //Refers to a single file materials\colorcorrection\*.* from_steam //Allow custom color correction on this server. }
See also
- Color theory (level_design)
- Wikipedia:Color correction
- color_correction
- color_correction_volume
fog_volume