最新的post processing stack v2版本(2021/4/14)
使用流程:
1.新建物體命名為PPVHandler,layer指定為effect01,掛載post processing volume組件,勾選global可始終顯示效果
2.camera添加post processing layer組件 ,volume blending->Layer選為effect01
3.assets文件夾creat post processing profile文件,並添加想要的后處理效果
4.將profile文件拖拽到PPVHandler->volume組件上
tips總結:
1.camera要有post processing layer組件,需要指定好layer,可以選擇多個layer,一個layer就是一個游戲物體(PPVHandler),也就等於包含一個volume組件,也就是一種effect,多個volume組件的effect相互混合得到最終effect
2.post processing profile文件要掛在post processing volume組件上,volume組件掛在游戲物體上,游戲物體要有指定layer
3.一個post processing profile里面可以增加多個effect,所以一個volume組件上也可以有多個effect
4.volume組件如果設置為global:volume里的effect對場景里的所有camera都有效,local:需要給volume組件的物體添加collider,在camera的layer組件下設置trigger,默認為camera本身,也就是當camera進入collider范圍內時觸發volume內的效果。
postProcessing 效果(標粗的幾個效果簡單且效果很棒)
1.ambient occlusion:UNITY有兩種實現ao效果的方法,開baked global illumination,烘焙出ao貼圖到light map中,二是通過post processing 實現realtime ao,消耗較大,且需要HDRP。游戲apex英雄里有該選項,關閉可大幅提高幀率
ao關:
ao開:
模式:Scalable Ambient Obscurance,高耗能不要在移動端使用,推薦使用Multi-scale Volumetric Occlusion模式
2.auto exposure自動曝光,模擬人眼從暗處例如隧道出來看到陽光那種耀眼的感覺
3.anti-aliasing,camera自帶msaa抗鋸齒需要先關閉,再啟用post processing的FXAA(推薦)
4.bloom:使得光源更加真實
添加dirty貼圖后的效果更逼真:
貼圖資源:https://github.com/sonicether/SE-Natural-Bloom-Dirty-Lens
5. Depth of Field 景深效果
6.Grain給畫面鋪噪點,有點老電影的感覺
7.motion blur 動態模糊,單機游戲還是要有的。fps就算了
8.vignette,這效果我一般玩游戲都不開,對游戲體驗提升不大。
9.ColorGrading,對顏色做調整,我理解為游戲的濾鏡效果,參數太多了給美術玩的。
10.其他的幾個不支持urp不寫了