Unity3D圖像後處理特效——Glow image effect

Glow (sometimes called "Bloom") can dramatically enhance the rendered image by making overbright parts "glow" (e.g. sun, light sources, strong highlights). The Bloom and Lens Flares image effect gives greater control over the bloom but has a higher processing overhead.

輝光(有時稱爲" Bloom "通過讓過渡明亮部分"(例如太陽,光源,強高光)“發光”,可以大大增強渲染圖像的效果。Bloom and Lens Flares圖像特效對於輝光效果具有更大的控制,但也具有更高的處理開銷。

 

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

 

Glow effect applied to the scene

應用到場景的輝光特效

 

Properties           屬性

Glow Intensity

輝光亮度

Total brightness at the brightest spots of the glowing areas

輝光區域最亮點的全部亮度值.

Blur Iterations

模糊迭代次數

Number of times the glow is blurred when being drawn. Each iteration requires processing time.

輝光的模糊次數,每次迭代都需要消耗一定的處理時間

Blur Spread

模糊半徑

The pixel distance over which pixels are combined to produce blurring

產生blur的像素距離.

Glow Tint

輝光提示

Color tint applied to the glow

應用於輝光的顏色提示.

Downsample Shader

下采樣着色器

The shader used for the glow. You generally should not have to change this.

用於輝光效果的着色器,您一般不需要改變它

 

Details       細節

Glow uses the alpha channel of the final image to represent "color brightness". All colors are treated as RGB, multiplied by the alpha channel. You can view the contents of the alpha channel in Scene View.

輝光效果使用最終圖像的alpha通道來表現“顏色的明亮度”,所有的顏色都被當成RGB處理,並與alpha通道的數值相乘,你可以在Scene View中查看alpha通道的內容。

 

All built-in shaders write the following information to alpha:

所有內建着色器都在alpha通道中寫入如下的信息:

       Main texture's alpha multiplied by main color's alpha (not affected by lighting).

       主紋理的alpha值乘以主顏色的alpha值(不受光照影響)

       Specular shaders add specular highlight multiplied by specular color's alpha.

       反射着色器將顏色加上反射高光與反射光顏色的alpha通道相乘後的顏色值

       Transparent shaders do not modify alpha channel at all.

       透明着色器不修改alpha通道的值

       Particle shaders do not modify alpha channel, except for Particles/Multiply which darkens anything that is in alpha. 

       粒子着色器不修改alpha通道的值,除非是調暗alpha通道的Particles/Multiply着色器

       Skybox shaders write alpha of the texture multiplied by tint alpha

       天空盒着色器將色調alpha值與紋理的apha值相乘

 

Most of the time you'll want to do this to get reasonable glow:

大多數情況下你會爲了獲得合理的輝光效果進行如下的操作:

       Set material's main color alpha to zero or use a texture with zero alpha channel. In the latter case, you can put non-zero alpha in the texture to cause these parts to glow.

      將材質的主顏色的alpha值變成0,或者使用一個零alpha通道的紋理。對於後者,你可以在紋理中產生輝光效果的地方設置非零alpha值。

      Set the specular color alpha for Specular shaders to be 100%.

      對於反射着色器,將反射的顏色alpha值設成100%

      Keep in mind what alpha the camera clears to (if it clears to a solid color), or what alpha the skybox material uses.

      切記去掉了哪些alpha值(即變成一個不透明顏色),或者天空盒材質使用了哪些alpha

      Add the Glow image effect to the camera. Tweak Glow Intensity and Blur Iterations values, you can also take a look at the comments in the shader script source.

      將輝光圖像特效加入到照相機上,調整輝光亮度和模糊迭代次數。

      The alpha channel on the Skybox can be used to great effect to add more glow when looking at the sun

      使用天空盒的alpha值,可以讓你在看到太陽時添加更多的光輝。

 

Tips:

提示:

      Use the alpha rendering mode in the scene view toolbar to quickly see which objects output different values to the alpha channel.

      在場景窗口下使用透明度渲染模式,可以快速地看到物體的不同alpha通道。

 

Hardware support        硬件支持

This effect requires a graphics card with pixel shaders (2.0) or OpenGL ES 2.0. PC: NVIDIA cards since 2003 (GeForce FX), AMD cards since 2004 (Radeon 9500), Intel cards since 2005 (GMA 900); Mobile: OpenGL ES 2.0; Consoles: Xbox 360, PS3.

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

 

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

所有圖像特效如果無法在用戶顯卡上運行時將會自動被關閉。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章