Unity3D图像后处理特效——Depth of Field 3.4
Depth of Field 3.4 is a common postprocessing effect that simulates the properties of a camera lens. The name refers to the fact that the effect has had significant performance and feature improvements in Unity 3.4.
景深3.4特效是一种常见的模拟相机透镜的后处理特效。它的名字反映了在Unity3.4中该特效有了重要特性增强以及性能增强。
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)效果,这种效果是由图片中明亮失焦物体而产生的。
An example of the new Depth of Field effect can be seen in the following images, displaying the results of a defocused foreground and a defocused background. Notice how the foreground blur overlaps with the rest while the background doesn't.
新的景深效果显示如下面的图片,一个显示前景散焦效果,另一个显示背景散焦的效果。可以看到前景的模糊区域会蔓延,并与其他部分重叠,而背景模糊则不会。

只是附近的管道是在聚焦区域

景深效果中的前景模糊与背景模糊
You might also consider using theTilt Shift effect for a more straightforward but less sophisticated depth-of-field effect.
As with the otherimage effects, this effect is only available in Unity Pro and you must have the Pro Standard Assets installed before it becomes available.
您还可能会考虑使用Tilt Shift效果来得到更加直接但简单的景深效果。和其他图像特效一样,该特效只能在Unity Pro上进行使用,并且在使用之前必须安装Pro Standard Assets。
Properties 属性
|
General Settings 一般设置 |
|
|
Resolution 分辨率 |
Determines the internal render target sizes. A lower resolution will result in faster rendering and lower memory requirements. 确定内部渲染目标的大小。较低的分辨率将导致更快地渲染效率和较低的内存要求 |
|
Quality 质量 |
The quality level. Choose between the faster OnlyBackground or the higher-quality BackgroundAndForeground which calculates the depth-of-field defocus for both areas separately. 质量级别。在OnlyBackground和BackgroundAndForeground之间进行选择。前者更快,后者质量更高。 |
|
Simple tweak 简单调整 |
Switches to a simpler focal model. 调整到简单的聚焦模型 |
|
Visualize focus 可视焦点 |
This shows the focal plane in the game view to assist learning and debugging. 在游戏中显示当前的聚焦平面,从而来帮助学习和调试。 |
|
Enable bokeh 开启散景 |
This will generate more realistic lens blurs where very bright parts are scaled and overlap. 这将生成更真实的透镜模糊效果,对很明亮的地方进行缩放与区域重叠。 |
|
Focal Settings 聚焦设置 |
|
|
Focal distance 聚焦距离 |
The distance to the focal plane from the camera position in world space. 在世界空间中焦平面到相机的距离 |
|
Object Focus 物体聚焦 |
Determine the focal distance using a target object in the scene. 使用场景中的目标物体来决定的聚焦距离 |
|
Smoothness 光滑度 |
The smoothness when transitioning from out-of-focus to in-focus areas. 从失焦区域到聚焦区域的光滑度 |
|
Focal size 聚焦尺寸 |
The size of the in-focus area. 聚焦区域的尺寸 |
|
Blur 模糊 |
|
|
Blurriness 模糊次数 |
How many iterations are used when blurring the various buffers (each iteration requires processing time). 模糊各种缓存的迭代次数(每次迭代都需要一定的处理时间) |
|
Blur spread 模糊半径 |
The blur radius. This is resolution-independent, so you may need to readjust the value for each required resolution. 模糊半径,这是与分辨率相关的,所以您需要对于每个特定的分辨率重新设定该值。 |
|
Bokeh Settings 散景设定 |
|
|
Destination 目标 |
Enabling foreground and background blur increases rendering time but gives more realistic results. 开启前景和背景模糊,虽然会增加渲染时间,但会得到更加真实的效果。 |
|
Intensity 亮度 |
Blend intensity used as bokeh shapes are being accumulated. This is a critical value that always needs to be carefully adjusted. 使用模拟的散景形状来混合亮度。这是一个很关键的数值,需要谨慎调整。 |
|
Min luminance 最小亮度 |
The luminance threshold below which pixels will not have bokeh artifacts applied. 亮度阈值,小于该值的像素将不产生散景效果。 |
|
Min contrast 最小对比度 |
The contrast threshold below which pixels will not have bokeh artifacts applied. The significance of this is that you usually only need bokeh shapes in areas of high frequency (ie, cluttered or "noisy" areas of image) since they are otherwise nearly invisible. Performance will be improved if you use this parameter to avoid generating unnecessary bokeh artifacts. 对比度阈值,小于该值的像素将不产生散景效果。该值的重要意义在于你通常只想场景中一些高频率地方(即图片中的噪声区域)产生散景效果,否则他们将几乎无法看见。如果您使用该值,将提升渲染性能,因为这样做可以避免生成一些不必要的散景效果。 |
|
Downsample 下采样 |
The size of the internal render target used for accumulating bokeh shapes. 模拟散景形状的内部渲染目标的尺寸 |
|
Size 尺寸 |
The maximum bokeh size. Will be modulated by the amount of defocus (Circle of Confusion). 最大的散景效果尺寸。可以通过散焦程度来进行调整(模糊圈) |
|
Bokeh Texture 散景纹理 |
The texture defining the bokeh shapes. 定义散景形状的纹理 |
Note that since the bokeh effect is created by drawing triangles per pixel, it can drastically affect your framerate, especially if it's not adjusted optimally. Adjust theSize, Min luminance, Min contrast,Downsample and Resolution to improve performance. Also, since the screen is darkened before the bokeh shapes are applied, you should use an appropriateBlurriness level to remove possible artefacts.
请注意由于散景效果的创建是通过在每个像素上渲染三角形,所以会大幅度地影响您的帧速率,特别是在没有进行优化调整的时候。您可以调整大小、最小亮度、最小对比度、下采样和分辨率来提高性能。此外,由于在使用散景形状之前场景会变暗,所以您应该使用合适的模糊级别来去除可能产生的瑕疵。
Hardware support 硬件支持
This effect requires a graphics card with pixel shaders (3.0) or OpenGL ES 2.0. Additionally, depth texture support is required. PC: NVIDIA cards since 2004 (GeForce 6), AMD cards since 2005 (Radeon X1300), Intel cards since 2006 (GMA X3000); Mobile: OpenGL ES 2.0 with depth texture support; Consoles: Xbox 360, PS3.
这个特效需要显卡拥有像素着色器(3.0)或者OpenGL ES 2.0,同时需要支持深度纹理。台式机:2004年以后的NVIDIA显卡(GeForce6),2005年以后的AMD显卡(Radeon X1300),2006年以后的Intel卡(GMA X3000);移动设备:OpenGL ES 2.0并支持深度纹理;控制台: Xbox 360、 PS3。
All image effects automatically disable themselves when they can not run on end-users graphics card.
所有图像特效如果无法在用户显卡上运行时将会自动被关闭。
Unity3D图像后处理特效——Depth of Field 3.4的更多相关文章
- 景深(Depth of Field)
http://www.cnblogs.com/cxrs/archive/2013/03/22/DepthOfFeild.html 景深(Depth of Field) 什么是景深? 所谓景深,就是当焦 ...
- 基于光线追踪的渲染中景深(Depth of field)效果的实现
图形学离线渲染中常用的透视摄像机模型时根据小孔成像的原理建立的,其实现通常是从向成像平面上发射ray,并把trace这条ray的结果作为成像平面上对应交点的采样结果.即: 图片来自<Fundam ...
- Win8 Metro(C#)数字图像处理--2.73一种背景图像融合特效
原文:Win8 Metro(C#)数字图像处理--2.73一种背景图像融合特效 /// <summary> /// Image merge process. /// </summar ...
- 虚幻UE4的后处理特效介绍 http://www.52vr.com/thread-31215-1-1.html
转载 虚幻UE4提供了后处理特效的功能,可以实现景深,光溢出,色调调整,饱和度等等.要使用虚幻4的后处理,就一定要用到PostProcessVolumn,这是一种特殊的体积,可以放置在场景中的任何位置 ...
- opencv滤镜-使用opencv实现各种图像滤镜特效
图像处理-滤镜 链接:https://mangoroom.cn/opencv/image-processing-filter.html opencv滤镜-实现晕影vignetting效果 链接:htt ...
- [ZZ] 景深效果(Depth of Field) , Pass1 将场景渲染到一个RenderTarget,做为清晰版, Pass2: BluredRT , Pass3: WDepth = Depth / Far_Z_Clip
http://blog.csdn.net/xoyojank/article/details/1883520 什么是景深效果? 景深效果,简称DOF,在人眼跟光学摄像设备上很常见.如下图: 简单地来 ...
- yebis error ---depth of field
前几天在墙外无法登陆cnblogs...导致很多blogs就没写了 有几篇比较值得记下来的,但是我已经不记得了,应该和sao有关scalable ambient obscurance 我似乎回忆起一点 ...
- unity3d 摄像机抖动特效
摄像机抖动特效 在须要的地方调用CameraShake.Shake()方法就能够
- DragSelectRecyclerView 长按滑动多选图像android特效
高仿Google相册多选效果,长按某一item后然后滑动选择到任意item,效果很不错,适合相册页面多选部分效果. 本例子主要是自定义DragSelectRecyclerView通过如下展示gridv ...
随机推荐
- cp -rf 操作时依然会提示覆盖
在linux上经常会使用cp -rf命令,该命令就是强制覆盖指定目录下的文件,但有时使用该命令依然会提示是否覆盖,cp命令的参数有如下一些: 参数说明: -a:此选项通常在复制目录时使用,它保留链接. ...
- spring 定时器知识点
一.各域说明 字段域 秒 分 时 日 月 星期(7为周六) 年(可选) 取值范围 0-59 0-59 0-23 1-31 1-12或JAN–DEC 1-7或SUN–SAT 1970–2099 可用字符 ...
- http转换为https
1.下载ssl 证数 百度ssl 证数都有 其中以便宜ssl为例子 注册登陆 选择免费版 可以使用3个月: 申请过程中需要检测该域名是否为本人所有 ,所以邮箱检测或者域名配置 很简单检测就好了: 验证 ...
- Ng的数组绑定
tip:数据的定义需要在对应ts中进行,调用在html中 定义数组: ts中 public arr =["111","222","333"] ...
- for循环用腻了,试试列表生成式。
在编写程序或者查看别人的程序时,经常会遇到列表生成式,这个使用起来并不复杂,但是非常有用,使我们的代码更加简洁灵活.很多python使用者并不太会使用它.今天,就给大家详细讲解列表生成式和生成器表达式 ...
- Node.js入门教程 第三篇 (模块及路由)
Node.js的模块 Node.js的模块与传统面向对象的类(class)不完全相同.Node.js认为文件即模块,即一个文件是一个模块.单一文件一般只专注做一件事情,保证了代码的简洁性. 创建模块: ...
- 02-21 决策树ID3算法
目录 决策树ID3算法 一.决策树ID3算法学习目标 二.决策树引入 三.决策树ID3算法详解 3.1 if-else和决策树 3.2 信息增益 四.决策树ID3算法流程 4.1 输入 4.2 输出 ...
- markdown下载、安装、破解、汉化与常用语法
markdown是一种纯文本格式的标记语言.通过简单的标记语法,它可以使普通文本内容具有一定的格式. 一.markdown下载 markdown破解版下载地址: http://www.pc6.com/ ...
- 章节十七章、2- 给执行失败的case截图
一.案例演示 1.首先我们把截图的方法单独进行封装方便以后调用. package utilities; import java.io.File; import java.io.IOException; ...
- 直线扫描转换-DDA算法
直线扫描转换-DDA算法 直线段的扫描转换算法 已知两个点,求直线. 为了在光栅显示器上用这些离散的像素点逼近这条直线,需要知道这些像素点的x,y坐标. 求出过P0,P1的直线段方程: y=kx+b ...