朱峰社區(qū)首頁 朱峰社區(qū)

搜索資源 注冊|登陸

等待

返回 展開菜單
按功能 按軟件

繪制真實照片

繪制真實照片

包含9節(jié)視頻教程

這是臨摹的終極表現(xiàn)!在臨摹領(lǐng)域達到真實照片的級別,讓你的繪畫讓別人驚呼吧!這不是照片,真的是繪畫出來的。我們一起來學習吧!

關(guān)閉

Unity組件:顏色校正曲線

關(guān)注:580 留言:0 樓主:DAFA 發(fā)帖時間:15年11月16日

DAFA

普通會員

DAFA

社區(qū)宗師:8級

四星作品2副五星作品0副

關(guān)注3011人

  • 積分

    998

  • 登陸

    1

  • 發(fā)帖

    3

  • 作品

    3

間隔線


Color Correction Curves
make color adjustments using curves for each color channel. Depth based adjustments allow you to vary the color adjustment according to a pixel's distance from the camera. For example, objects on a landscape typically get more desaturated with distance due to the effect of particles in the atmosphere scattering.

色彩校正曲線使用曲線調(diào)整每一個顏色通道;"深度"的調(diào)整允許我們根據(jù)攝像機與目標物的像素距離調(diào)整其顏色。例如,由于大氣散射的存在,遠處的物體通常飽和度更低。

Selective adjustments can also be applied, so you can swap a target color in the scene for another color of your own choosing.

也可以選擇性的對場景中的一個目標顏色進行調(diào)整,將其換成你想要的顏色。

Lastly, Saturation is an easy way to adjust all color saturation or desaturation (until image turns black & white) which is an effect that is not achievable with curves only.

最后,飽和度是很容易的方法來調(diào)節(jié)所有顏色的飽和度或降低飽和度(直到圖像變?yōu)楹诎祝┻@是僅曲線無法達到的效果。

See also the new Color Correction Lut effect for lookup texture based color grading.

參見新的Color Correction Lut effect是基于顏色分級。

The following images demonstrate how by simply enhancing the saturation slider and the blue channel curve can make a scene drastically different

下面的圖像演示了怎樣通過簡單增加飽和度滑塊和藍色通道曲線來制作顯著不同的場景。

As with the other image effects, this effect is only available in Unity Pro and you must have the Pro Standard Assets installed before it becomes available.

跟其他圖像處理特效一樣,該特效目前只在Unity Pro版本中有效,而且在使用之前必須要安裝Pro Standard Assets。

Properties 屬性
  • Mode 模式
    Chose between advanced or simple configuration modes.
    在高級或簡單配置模式之間切換
  • Saturation 飽和度
    Saturation level (0 creates a black & white image).
    飽和度級別(0為黑白圖像)
  • Red 紅色
    The red channel curve. 紅色通道曲線
  • Green 綠色
    The green channel curve.綠色通道曲線
  • Blue 藍色
    The blue channel curve. 藍色通道曲線
  • Red (Depth) 紅(深度)
    The red channel curve for depth based correction.
    基于深度調(diào)整的紅色通道曲線
  • Green (Depth) 綠(深度)
    The green channel curve for depth based correction.
    基于深度調(diào)整的綠色通道曲線
  • Blue (Depth) 藍(深度)
    The blue channel curve for depth based correction.
    基于深度調(diào)整的藍色通道曲線
  • Blend Curve 混合曲線
    Defines how blending between the foreground and background color correction is performed.
    決定前景和背景顏色校正之間的如何混合
  • Selective Color Correction
    選擇性顏色校正
  • Enable 啟用
    Enables the optional selective color correction.
    啟用可選選擇性顏色校正
  • Key 關(guān)鍵色
    The key color for selective color correction.
    選擇性顏色校正關(guān)鍵色
  • Target 目標色
    The target color for selective color correction.
    選擇性顏色校正目標色
Understanding Curves 理解曲線

Curves offer a powerful way to enhance an image and can be used to increase or decrease contrast, add a tint or create psychedelic color effects. Curves work on each of the red, green and blue color channels separately and are based around the idea of mapping each input brightness level (ie, the original brightness value of a pixel) to an output level of your choosing. The relationship between the input and output levels can be shown on a simple graph:-

曲線是改善圖像的有力工具,它可被用來降低或升高對比度、加入染色,或者創(chuàng)造出一種迷幻色彩。曲線調(diào)整對紅綠藍三個顏色通道獨立起作用,其基本思想是將每一個輸入的亮度值(比如,原始的像素亮度值)映射到你最終選擇的那個值上。這張簡單的圖顯示了輸出值和輸入值之間的關(guān)系

The horizontal axis represents the input level and the vertical represents the output level. Any point on the line specifies the output value that a given input is mapped to during processing. When the "curve" is the default straight line running from bottom-left to top-right, the input value is mapped to an identical output value, which will leave the pixel unchanged. However, the curve can be redrawn to re-map the brightness levels as required. A simple example is when the line goes diagonally from top-left to bottom-right:-

X軸顯示輸入值,Y軸顯示輸出值,線上的任意一個點都表示實時的輸出輸入對應關(guān)系。當曲線是默認的一條從左下角到右上角的直線時,意味著輸入的值被映射到相同的輸出值,像素值將保持不變。當然,曲線可以改變,以重新映射所需的亮度級。比如這樣一個簡單的例子,曲線沿對角線從左上角到右下角。

In this case, the pixel's brightness will be inverted; 0% will map to 100%, 25% to 75% and vice versa. If this is applied to all color channels then the image will be like a photographic negative of the original.

在這種情況下,像素的亮度將被反轉(zhuǎn),0%將映射到100%,25%至75%,反之亦然。如果這是對所有顏色通道的操作,圖像會像照相底片一樣反轉(zhuǎn)。

Contrast 對比度

Most of the detail in an image is conveyed by the difference in brightness levels between pixels, regardless of their colour. Pixels that differ by less than about 2% brightness are likely to be indistinguishable but above this, the greater the difference, the greater the impression of detail. The spread of brightness values in the image is referred to as its contrast.

圖像中的大部分細節(jié)都通過像素之間的亮度差來表現(xiàn),而不是它們的顏色。像素之間的亮度差小于約2%時可能無法區(qū)分,但在此之上,差別越大,就意味著更多的細節(jié)表現(xiàn)。圖像中的亮度值的傳播因此被稱為對比度。

If a shallow slope is used for the curve, rather than the corner-to-corner diagonal then the full range of input values will be squeezed into a narrower range of output values:-

如果使用一條斜率較小的曲線,而不是角對角的對角線,輸入值將被擠壓到一個較窄范圍的輸出值。

This has the effect of reducing the contrast, since the differences between pixel values in the output are necessarily smaller than those in the input (indeed, two slightly different input values may actually get mapped to the same output value). Note that since the image no longer spans the full range of output values, it is possible to slide the curve up and down the range, resulting in an image which is brighter or darker overall (the average brightness is sometimes called the "sit" point and is the parameter adjusted by the brightness control on a TV set). Reduced contrast can give the impression of gloom, fog or a dazzling light source in a scene, depending on the overall brightness.

這具有減小對比度的效果,因為在輸出像素值之間的差異是必然小于輸入(事實上,兩個略微不同的輸入值實際上可能映射到相同的輸出值)。需要注意的是,由于圖像不再包含在完整的輸出值范圍內(nèi),如果我們上下調(diào)整曲線,將使圖像整體上更亮或更暗(平均亮度有時也被稱為"sit"點,這個點的調(diào)整就像我們在電視機上調(diào)亮度旋鈕)。在一個場景中,在總亮度確定的情況下降低對比度給人一種的陰霾,霧或發(fā)出耀眼的光源的感覺。

It is not necessary to reduce the contrast across the whole range of brightness levels. The curve's slope can vary along its length, with the shallower parts corresponding to ranges of reduced contrast. In between the shallow parts, the slope may be steeper than the default, and the contrast will actually increase in these ranges. Changing the curve like this gives a useful way to increase contrast in some parts of the image while reducing it in areas where the detail is less important:-

我們不必要在整個亮度范圍內(nèi)降低對比度,曲線的斜率可以根據(jù)它的長度改變。平坦的部分代表更低的對比度,而在兩個平坦曲線之間也可以有陡峭的部分,這個陡峭的部分可以比常規(guī)的更加劇烈,從而升高這一部分的對比度。調(diào)整曲線像下面這張圖這樣,可以讓物體的某個重要的部分對比度增高,來降低那些不太重要的部分。

Colour Effects 顏色效果

If the curves are set identically for each color channel (red, green and blue) then the changes will mainly affect the brightness of pixels while their colors remain relatively unchanged. However, if the curves are set differently for each channel then the colors can change dramatically. Many complex interactions between the color channels are possible but some basic insight can be gained from the following diagram:-

如果曲線同時作用于三個顏色通道(紅綠藍),曲線將只影響到亮度,顏色將不會改變。曲線設(shè)定在任何單獨的顏色通道將使這種顏色劇烈改變。有很多顏色通道相互作用的例子但是下面這張圖顯示了通道之間作用的基本方式。

As explained in the section above, a reduction of contrast can accompany an increase or reduction in the overall brightness. If, say, the red channel is brightened then a red tint will be visible in the image. If it is darkened then the image will be tinted towards cyan (since this color is obtained by combining the other two primaries, green and blue).

正如前面解釋的,對比度的降低將同時降低總體亮度。這樣,如果我們提高紅色通道,圖像將顯現(xiàn)額外的紅色;反之,圖像將呈現(xiàn)更多的青色(青色由另外兩種基本色混合而成:綠+藍)

Depth-Based Color Correction 基于深度顏色校正

Colors often appear slightly different when viewed at a distance. For example, in a landscape scene, colors tend to get desaturated by atmospheric light scattering. This kind of effect can be created using depth-based color correction. When this is enabled, two sets of color curves become available, one for the camera's near clipping plane and the other for the far clipping plane. The actual correction applied to an object depends on its distance from the camera; the normalized distance between the two clipping planes is used as an interpolation parameter between the two sets of color curves. The exact type of interpolation is specified by an additional blending curve, which maps the normalised distance to an interpolation value in much the same way that a color curve maps an input to an output. By default, this curve is a straight diagonal which results in linear interpolation between the two color corrections. However, it can be modified to bias the correction according to distance.

當我們從遠處看一個物體時顏色經(jīng)常有輕微的變化。由于大氣散射的存在,我們看風景時物體顏色的飽和度會略微降低。這種效果可以通過Depth-Based Color Correction來模擬。當這個選項被激活時,我們可以同時調(diào)整兩條曲線,一個作用在攝像機的近點,另一個是遠點平面。物體依據(jù)它與攝像機之間的距離進行顏色調(diào)整。近、遠點之間的部分用兩個曲線的插補參數(shù)決定。具體的插補方式遵照于一個額外的混合曲線,這條曲線將距離投射到一個插補值,就像我們前面提到的顏色校正曲線將輸入值投射到輸出值那樣。這條曲線默認是一條對角線,在兩種顏色校正系統(tǒng)中提供一個線性插補。當然,我們可以調(diào)整它,使根據(jù)距離的調(diào)整更為優(yōu)先。

Selective Color Correction 選擇性色彩校正

Using this setting, it is possible to replace a particular color in the original image (referred to as the "key") and replace it with a chosen target color. Using a single exact color for the key would tend to introduce visual artifacts and so a range is used instead. The resulting color is an interpolation between the key and target colors, depending on how close the original image pixel is to the specified key color.

這個功能可以用一個選擇的顏色來取代源圖像上的某個特定顏色(稱為 "key")。用一個單色這么做的時候圖像看起來感覺很假,因此我們用一個顏色范圍代替單色。最終結(jié)果介于兩種顏色之間。取決于原始圖像的像素顏色和我們選擇的顏色之間的相似度。

Editing Curves 編輯曲線

Clicking on one of the curves in the inspector will open an editing window:-

在inspector視圖中點擊任何一個curve將會打開編輯窗口:

At the bottom of the window are a number of presets for common curves. However, you can also alter the curve by manipulating the key points. Right clicking on the curve line will add a new key point which can be dragged around with the mouse. If you right click on one of the points, you will see a contextual menu that gives several options for editing the curve. As well as allowing you to delete the key, there are four options that determine how it will affect the shape of the curve:-

窗口底部列出了常見的curve類型,你可以調(diào)節(jié)控制點改變曲線。右擊曲線加入新的控制點,左鍵可以拖動它,如果你右擊控制點,你將會看見一個菜單,里面列出了編輯曲線的可用操作。你也可以刪除控制點,選擇四種選項之一決定刪除操作影響到曲線的方式。

  • Auto: the curve will pass through the point and its shape will be adjusted to keep the curvature smooth between neighbouring points.
    自動:曲線仍舊通過這個點,曲線形狀根據(jù)相鄰的兩個點自動調(diào)節(jié)并保持曲線平滑
  • Free Smooth: the tangent of the curve can be edited using handles attached to the key point.
    自由平滑:曲線的切線可以通過key point上的控制柄調(diào)節(jié)
  • Flat: Free Smooth mode is enabled and the tangent is set horizontally.
    平滑:模式可用,曲線切線將變水平
  • Broken: The key point has tangent handles as with Free Smooth mode but the handles on the left and right of the curve can be moved separately to create a sharp break rather than a smooth curve.
    折斷:控制點有像Free Smooth 模式那樣的控制柄,但是它的兩條控制柄可以分別調(diào)整,這樣可以調(diào)節(jié)出劇烈變化的曲線形式。

Below these options are a few settings that control how a point's tangent handles behave:-

在這些選項之下還有一些選項用來調(diào)整控制柄調(diào)整曲線切線的方式:

  • Free: Broken mode is enabled for the curve at the specified tangent.
    自由:在特定的切線上Broken模式被激活。
  • Linear: The curve between the key point and its neighbour is set to a straight line.
    線性:關(guān)鍵點和它相鄰點之間的曲線變成直線
  • Constant: A flat horizontal line is drawn from the curve to its neighbour and the vertical displacement occurs as a sharp step.
    常數(shù):相鄰點之間的曲線部分變成垂直。
Hardware support 硬件支持

This effect requires a graphics card with pixel shaders (2.0) or OpenGL ES 2.0. Additionally, depth texture support is required. PC: NVIDIA cards since 2004 (GeForce 6), AMD cards since 2004 (Radeon 9500), Intel cards since 2006 (GMA X3000); Mobile: OpenGL ES 2.0 with depth texture support; Consoles: Xbox 360, PS3.

這個特效需要顯卡擁有像素著色器(2.0)或者OpenGL ES 2.0。臺式機:2003年以后的NVIDIA顯卡(GeForce FX),2004年以后的AMD顯卡(Radeon 9500),2005年以后的Intel卡(GMA 900);移動設(shè)備:OpenGL ES 2.0;控制臺: Xbox 360、 PS3。

All image effects automatically disable themselves when they can not run on end-users graphics card.

所有圖像特效如果無法在用戶顯卡上運行時將會自動被關(guān)閉。

贊0 踩0

未知用戶

2005-2024 朱峰社區(qū) 版權(quán)所有 遼ICP備2021001865號-1
2005-2024 ZhuFeng Community All Rights Reserved

VIP

朱峰社區(qū)微信公眾號

回頂部

1.復制文本發(fā)給您的QQ好友或群、微信等;好友點擊鏈接以后,轉(zhuǎn)發(fā)就成功了。 2.如朋友點擊您的鏈接,您需要需刷新一下才行;同一個好友僅能點擊一次。
購買VIP,觀看所有收費教程!