Depth of Field 景深

本文档主要是对Unity官方手册的个人理解与总结(其实以翻译记录为主:>)
仅作为个人学习使用,不得作为商业用途,欢迎转载,并请注明出处。
文章中涉及到的操作都是基于Unity2018.3版本
参考链接:https://github.com/Unity-Technologies/PostProcessing/wiki/Depth-of-Field

Depth of Field is a common post-processing effect that simulates the focus properties of a camera lens. In real life, a camera can only focus sharply on an object at a specific distance; objects nearer or farther from the camera will be somewhat out of focus. The blurring not only gives a visual cue about an object’s distance but also introduces Bokeh which is the term for pleasing visual artifacts that appear around bright areas of the image as they fall out of focus.
景深是模拟摄像机镜头对焦特性的一种常见的后处理效果。在现实生活中,相机只能对特定距离内的物体进行锐利的聚焦;离相机较近或较远的物体会有些失焦。模糊不仅提供了一个关于物体距离的视觉提示,还引入了焦外成像(Bokeh), Bokeh是一个术语,用来描述当物体失去焦点时,在图像明亮区域周围出现的令人愉悦的视觉效果。
Depth of Field 景深 后期处理系列3
Depth of Field 景深 后期处理系列3

Properties

Property Function
Focus Distance Distance to the point of focus.
观察距离 到观察点的距离
Aperture Ratio of the aperture (known as f-stop or f-number). The smaller the value is, the shallower the depth of field is.
孔径 孔径比(称为f-stop或f-number)。数值越小,景深越浅。孔径比数值越小,光圈越大,进光量越多,画面比较亮,焦平面越窄,主体背景虚化越大,景深越浅;
Focal Length Distance between the lens and the film. The larger the value is, the shallower the depth of field is.
焦距 镜头和胶片之间的距离。数值越大,景深越浅。
Max Blur Size Convolution kernel size of the bokeh filter, which determines the maximum radius of bokeh. It also affects the performance (the larger the kernel is, the longer the GPU time is required).
最大模糊大小 卷积核大小的bokeh滤波,这决定了最大半径的bokeh。它还会影响性能(内核越大,所需的GPU时间就越长)。

Performances

The speed of Depth of Field is tied to Max Blur Size. Using a value higher than Medium is only recommended for desktop computers and, depending on the post-processing budget of your game, consoles. Mobile platforms should stick to the lowest value.
景深的速度与最大模糊大小有关。仅建议桌面计算机使用高于中等的值,并根据游戏和主机的后期处理预算而定。移动平台应该坚持最低的值。

Requirements

  • Depth texture
  • Shader Model 3.5

相关文章:

  • 2021-08-09
  • 2022-12-23
  • 2021-06-28
  • 2021-05-22
  • 2021-12-26
  • 2021-07-10
  • 2021-09-27
猜你喜欢
  • 2021-12-27
  • 2021-12-05
  • 2021-05-11
  • 2021-11-08
  • 2021-12-05
相关资源
相似解决方案