2013年9月8日 星期日

Unity3D 教學 ﹥15 Unity 影像效果

http://www.cg.com.tw/Unity/htm/Unity_015.asp

影像效果 ( Image Effects ) 是 Unity 內建的影像處理功能,遊戲執行時可以在畫面加入多種效果,達到提升遊戲畫面品質或是創造特殊的遊戲氣氛。影像效果是 Unity Pro 版本才支援的功能,使用的方法是將 Image Effect 套用到攝影機,您可以在遊戲的執行時看到影像效果,而在編輯時並不會顯示於 Scene 場景視窗。
從專案面板的 Image Effects (Pro Only) 尋找您想使用的影像效果,拖曳到攝影機即可。
提示:若建立專案時未匯入資源包,請自行匯入。
雖然也可以將 Image Effects 套用到一般遊戲物件,不過 Unity 會在該物件加上 Camera 元件,這麼一來可能會取代原本在遊戲中使用的攝影機,因此實際上很少採用這種方式。


Antialiasing As Post Effect 反鋸齒效果
http://docs.unity3d.com/Documentation/Components/script-AntialiasingAsPostEffect.html

3D 遊戲畫面的鋸齒現象,會降低遊戲畫面的真實度,使用 Antialiasing As Post Effect 影像效果,可以將幾何圖形的邊緣的鋸齒瑕疵即時處理掉,帶來更優異的遊戲畫質。
  • AA Technique
  • FXAA2 ( Fast Approximate Anti-Aliasing )
  • FXAA1PresetA
  • FXAA1PresetB
  • NFAA ( Normal Filter Anti-Aliasing )
  • SSAA 超級採樣反鋸齒,將整個畫面放大後,混合圖形的鄰近像素產生相近顏色,屬於早期遊戲使用的反鋸齒技術。
  • DLAA
FXAA ( Fast Approximate Anti-Aliasing ) 快速反鋸齒技術,處理速度比傳統的 MSAA 多重採樣反鋸齒技術更快,降低 GPU 負載,FXAA 可相容於 NVIDIA 與 ATI 顯示卡,即使入門等級的顯示卡也能得到不錯的效果。
開啟反鋸齒效果需要支援 pixel shader (3.0) 或是 OpenGL ES 2.0 的顯示卡,例如 NVIDIA GeForce 6 系列、AMD Radeon X1300 系列、Intel GMA X3000 系列以後的顯示卡。若是玩家使用的顯示卡不支援,此效果將會自動關閉。
反鋸齒效果的相關技術可參閱:
維基百科(英文) http://en.wikipedia.org/wiki/Spatial_anti-aliasing
維基百科(中文) http://zh.wikipedia.org/wiki/反鋸齒

Bloom And LensFlares 鏡頭光斑效果
HDR 高動態範圍影像,沙漠的幻覺
Tweak mode
Blend Mode 混合模式
HDR
Intensity 強度
Threshold 臨界值
Blur iterations
Blur spread


Blur Effect 模糊效果
讓整個遊戲畫面呈現模糊而不清晰的效果。
http://docs.unity3d.com/Documentation/Components/script-BlurEffect.html


Color Correction 色彩校正效果


Contrast Enhance 對比強化效果
預設值



Depth Of Field 34 景深效果
http://docs.unity3d.com/Documentation/Components/script-DepthOfField34.html

模擬相機使用大光圈鏡頭拍攝的淺景深效果,讓玩家的視覺焦點集中在特定的範圍。
Resolution
Quality = BackgroundAndForeground
Simple tweak
Visualize focus
Enable Bokeh
Focal Distance
Object Focus
Smoothness
Focal size

FocalDistance = 3


Depth Of Field Scatter

Visualize Focus 使用類似 Photoshop 的快速遮片設定景深範圍。


Edge Detection image effect
http://docs.unity3d.com/Documentation/Components/script-EdgeDetectEffect.html
Color

Geometry


Fisheye 魚眼效果
http://docs.unity3d.com/Documentation/Components/script-Fisheye.html
在攝影機加上魚眼效果。
Strength X(預設值 0.05)
Strength Y(預設值 0.05)
Fish Eye Shader 魚眼效果著色器(Hidden / FisheyeShader 通常維持預設值)


Glow Effect 光暈效果
http://docs.unity3d.com/Documentation/Components/script-GlowEffect.html


Grayscale Effect 灰階效果



Noise Effect 雜訊效果
http://docs.unity3d.com/Documentation/Components/script-NoiseEffect.html
可在遊戲畫面加上動態的雜訊,類似相機採用高感光度拍攝的雜訊效果。
Monochrome 勾選時為單色雜訊,未勾選則為彩色雜訊。
Grain Intensity Min 最小顆粒強度
Grain Intensity Max 最大顆粒強度
Grain Size 顆粒大小
Scratch Intensity Min
Scratch Intensity Max
Scratch FPS
Scratch Jitter
Grain Texture 顆粒紋理
Scratch Texture
Shader RGB
Shader YUV


Sepia Tone Effect 懷舊風格效果
http://docs.unity3d.com/Documentation/Components/script-SepiaToneEffect.html

Sepia Tone Effect 懷舊風格效果 + Vignetting 暗角效果


Screen Space Ambient Occlusion (SSAO) 環境遮擋影像效果
http://docs.unity3d.com/Documentation/Components/script-SSAOEffect.html
物件的邊緣加上陰影效果,可讓遊戲畫面的層次感更豐富。


Sunshafts
http://docs.unity3d.com/Documentation/Components/script-SunShafts.html
Blend mode = Add



Tilt Shift 效果
http://docs.unity3d.com/Documentation/Components/script-TiltShift.html


Vignetting 暗角效果
http://docs.unity3d.com/Documentation/Components/script-Vignetting.html

Intensity = 5

Vignetting Chromatic Aberration = 10 廉價鏡頭的色散效果



Twirl image effect 影像效果
http://docs.unity3d.com/Documentation/Components/script-TwirlEffect.html


Vortex image effect 影像效果
http://docs.unity3d.com/Documentation/Components/script-VortexEffect.html