查看: 2042|回复: 0
打印 上一主题 下一主题

[Unity 组件参考手册]组件:图像特效脚本之泛光和镜头眩光

[复制链接]
.    

3797

主题

11

听众

5万

积分

首席设计师

Rank: 8Rank: 8

纳金币
32328
精华
41

活跃会员 优秀版主 荣誉管理 论坛元老

跳转到指定楼层
楼主
发表于 2013-1-31 21:10:56 |只看该作者 |倒序浏览
Blooming is the optical effect where light from a bright source (such as a glint) appears to leak into surrounding objects. The Bloom and Lens Flares image effect adds bloom and also automatically generates lens flares in a highly efficient way. Bloom is a very distinctive effect that can make a big difference to a scene and may suggest a magical or dreamlike environment especially when used in conjunction with HDR rendering. Bloom and Lens Flares is actually an enhanced version of the Glow image effect which offers greater control over the bloom at the expense of rendering performance.泛光特效是一种光学效应,它是指在来自于强光源(如闪烁)的光线看起来像是影响到了周围物体。Bloom and Lens Flares图像效果通过一种高效的方式添加了泛光效果,并会自动生成镜头光晕的效果。泛光是一个非常独特的效果,它与HDR渲染方法一起使用时可以很大程度地改变场景的氛围,烘托出神奇、梦幻般的环境。泛光与镜头光晕特效实际上是辉光特效的一个增强版,它可以对泛光效果提供更好的控制,但同时也会带来昂贵的渲染性能开销。
Example showing how Bloom and Lens Flares can give a soft glow using the new Screen blend mode. The new anamorphic lens flare type helps evoke a cinematic feeling.
例子中显示了该特效在使用了新的屏幕混合模式后可以提供一个柔和的辉光效果。新的变形镜头光晕类型有助于烘托出电影的感觉。As with the other image effects, this effect is only available in Unity Pro and you must have the Pro Standard Assets installed before it becomes available.和其他图像特效一样,该特效只能在Unity Pro上进行使用,并且在使用之前必须安装Pro Standard Assets
[Properties 属性]---------------------------------------------------------------------------------Tweak Mode 调整模式
    Choose complex mode for additional options such as lens flares.
    对于额外的选项选择复杂的模式,比如镜头光晕效果。
    Blend mode 混合模式
    The method used to add bloom to the color buffer. The softer Screen mode is better for preserving bright image details but doesn't work with HDR.
    将泛光效果添加到颜色缓存上的方法。更加柔顺的屏幕模式比较适合于保留明亮的图像细节,但这种模式无法跟HDR一起使用。
    HDR 高动态范围
    Whether bloom is using HDR buffers. This will result in a different look as pixel intensities may leave the [0,1] range, see details in tonemapping and HDR.
    决定该特效是否使用HDR缓存。使用HDR将导致一个不同的视觉感受,因为像素亮度将超过[0,1]范围,具体细节可见tonemapping和HDR。
    Cast lens flares 激活镜头眩光
    Enable or disable automatic lens flare generation.
    开启或关闭自动生成的透镜光晕效果。
    Intensity 强度
    The global light intensity of the added light (affects bloom and lens flares).
    附加光(影响到该特效的光源)的全局光强。
    Threshhold 阈值
    Regions of the image brighter than this threshold receive blooming (and potentially lens flares).
    图像中亮度高于该阈值的区域将产生泛光效果(以及潜在的透镜光晕效果)。
    Blur iterations 模糊迭代
    The number of times gaussian blur is applied. More iterations improve smoothness but take extra time to process and hide small frequencies.
    高斯模糊应用的次数。更多的迭代次数会增强画面的柔顺度,但同样需要额外的时间来处理和隐藏小频率的细节。
    Blur spread 模糊扩散
    The max radius of the blur. Does not affect performance.
    模糊的最大半径。不会影响性能。
    Use alpha mask 使用alpha通道
    The degree to which the alpha channel acts as a mask for the bloom effect.
    使用alpha通道作为遮罩,来应用于泛光效果。
    Lens flare mode 镜头眩光模式
    The type of lens flare. The options are Ghosting, Anamorphic or a mix of the two.
    透镜光晕的类型,主要有三种:重影、变形或者两者结合。
    Lens flare mask 镜头眩光蒙版
    Mask used to prevent lens flare artifacts at screen edges.
    防止透镜光晕在屏幕边缘造成误差的遮罩。
    Local intensity 局部强度
    Local intensity used only for lens flares.
    仅用于透镜光晕效果的局部强度。
    Local threshold 局部阈值
    The accumulative light intensity threshold that defines which image parts are candidates for lens flares.
    累积的光源强度阈值,它限定了图像中哪些部分对透镜光晕产生影响。
    Stretch width 拉伸宽度
    The width for anamorphic lens flares.
    透镜光晕的变形宽度。
    Blur iterations 模糊迭代
    The number of times blurring is applied to anamorphic lens flares. More iterations improve smoothness but take more processing time.
    应用于变形透镜光晕的模糊次数。更多的迭代次数会增强画面的柔顺度,但同样会占用更多的处理时间。
    Tint Color 色调颜色
    Color modulation for the anamorphic flare type.
    光晕类型的颜色调制
    1st-4th Color
    颜色类型
    Color modulation for all lens flares when Ghosting or Combined is chosen.
    当重影或合并被选中时,所用的调制颜色。  [Blend Modes: Add and Screen 混合模式:增加模式和屏幕模式]Blend modes determine the way that two images will be combined when overlaid. Each pixel from the base image is combined mathematically with the pixel in the corresponding position in the overlay image. Two blend modes are available for Unity image effects, Add and Screen.混合模式决定了当两张图片重叠式的合并方法。基图像上的每个像素都根据数学公式与重叠图像上的相应像素进行合并。目前Unity支持两种混合模式:增加模式和屏幕模式。
Add Mode 增加模式When the images are blended in Add mode, the values of the color channels (red, green and blue) are simply added together and clamped to the maximum value of 1. The overall effect is that areas of each image that aren't especially bright can easily blend to maximum brightness in the result. The final image tends to lose color and detail and so Add mode is useful when a dazzling "white out" effect is required.当图片是通过增加模式进行混合时,各个颜色通道(红、绿、蓝)的值只需要简单相加即可,同时将最大值限制为1。这样,总体效果就是使每幅图片上本来不是特别明亮的区域在混合结果中会被很容易地达到最大亮度值,以至于最终图片可能会失去颜色和细节信息,所以,增加模式比较适合于生成"泛白"的效果。
Screen Mode 屏幕模式Screen mode is so named because it simulates the effect of projecting the two source images onto a white screen simultaneously. Each color channel is combined separately but identically to the others. Firstly, the channel values of the two source pixels are inverted (ie, subtracted from 1). Then, the two inverted values are multiplied together and the result is inverted. The result is brighter than either of the two source pixels but it will be at maximum brightness only if one of the source colors was also. The overall effect is that more color variation and detail from the source images is preserved, leading to a gentler effect than Add mode.之所以叫屏幕模式是因为它主要是通过将两幅图片同时投影到一个屏幕上来模拟该特效。每个颜色通道各自分别融合,首先,对两个源图片上的像素进行求逆运算(用1来减每个通道的值),然后将两个值相乘,并将结果再次取逆,结果将比两个源像素都要明亮,但只有当其中一个像素为最大亮度时,结果才会达到最大亮度。同时,整体效果也会展现出更多的颜色变化以及保留更多的细节信息。
Hardware support 硬件支持This effect requires a graphics card with pixel shaders (2.0) or OpenGL ES 2.0. PC: NVIDIA cards since 2003 (GeForce FX), AMD cards since 2004 (Radeon 9500), Intel cards since 2005 (GMA 900); Mobile: OpenGL ES 2.0; Consoles: Xbox 360, PS3.这个特效需要显卡拥有像素着色器(2.0)或者OpenGL ES 2.0。台式机:2003年以后的NVIDIA显卡(GeForce FX),2004年以后的AMD显卡(Radeon 9500),2005年以后的Intel卡(GMA 900);移动设备:OpenGL ES 2.0;控制台: Xbox 360、 PS3。All image effects automatically disable themselves when they can not&nbsp***n on end-users graphics card.所有图像特效如果无法在用户显卡上运行时将会自动被关闭。
【来源:互联网】
更多精彩教程,尽在web3D纳金网http://www.narkii.com/college/
分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏1 支持支持0 反对反对0
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

手机版|纳金网 ( 闽ICP备2021016425号-2/3

GMT+8, 2024-11-23 10:10 , Processed in 0.439926 second(s), 33 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部