【Art】Unity提高画质的方式
来源参考Brackey的Youtube视频:
Lighting in Unity https://www.youtube.com/watch?v=VnG2gOKV9dw&t=178s
Real-time Lighting https://www.youtube.com/watch?v=wwm98VdzD8s
How to Get Good Graphics in Unity https://www.youtube.com/watch?v=owZneI02YOU
Lighting in Unity:
基本概念
全局光照(Global Illumination):
光撞击到物体产生变化,分别为tranmission reflection refraction diffraction absorption scattering 根据不同形状以及material
- direct bouncing 光反射之后直接进入眼睛
- indirect bouncing:bouncing off 多个表面,理论上会一直bouncing 直到完全吸收,但我们可以设置次数
Enlighten = realtime:场景有许多移动的光源
Baking 节省性能:将光照转为Texture, progressive light mapper = baked path tracing light mapper 从camera射出raycaset 可以在editor中进行实时的显示。
静态光源处理方式
- 删除室外的直射光(directional light)
- emissive的物件作为光源
- 将物件全部设置为static
- 确保model有lighting uv,没有的话可以进行generated lighting UV
- remove lighting - skybox, ambient color
- 取消realtime-global illumination
- lightmapper设置为progressive 取消auto generated, clear data之后重新勾选
- 选中emissive的光源,将global illumination修改为baked
- 选中物件中的stitch seams
- 提高lightmap size,选择是否要compression lightmaps,出现bleeding(lightmap重叠)的话,调整resolution与lightmap padding(可以将resolution的调整放在最后),direct 与 indirect samples也是一样,采样就是ray,bouncing同理;
- AO Ambient Occlusion 可以调整filter, 在 raw lightmap上变化
- 太暗可以调整 indirect intensity,或者albedo boast
要增加辉光效果的话:
Post-processing - bloom - color grading
Real-Time Lighting
- Project Setting - Player 用Linear color space而不是gamma
- camera- HDR Setting, rendering path = deferred
- quality setting - pixel light count +=20, resolution shadow,
- post-processing: tone mapper 在color grading中选择ACES电影风,加上post-exposure
- 通过skybox自动生成光照:asset store:free hdr sky, intensity modifier x
- Light Emitter:
- directional light : 只与角度有关,选择shadow type,用一个main light(暖色+1-intensity),一个rim light辅助光(从后方,冷色+0.5)
- point light
- 用material emissive(可以看到光线本身),用bloom与point light 去fake光线
- 在post-processing中增加AO光
HOW TO GET GOOD GRAPHIC IN UNITY
gamma-linear / 用skybox生成光照 / graphic选中ultra / 取消anti-aliasing(在post-processing中)/ rendering path-deferred(适合多光源的pc端,front适合vr以及手游,区别是一个按照lighting pixels是固定performe cost无论加多少光)/ 打开hdr,关闭hsaa /
post-processing:
- tone mapping用于调色hdr色调颜色,与ue4一样使用asus
- eye adaption
- motion blur
- ambient occlusion
- bloom 减少radius
- 用antialising 进行抗锯齿,修改defautl为temporal
其他方式:
- reflection probe
- emission maps+blooms
- uber shader + pbr材质