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

[Unity 组件参考手册]组件:图像特效脚本之对比度拉伸图像特效

[复制链接]
.    

3797

主题

11

听众

5万

积分

首席设计师

Rank: 8Rank: 8

纳金币
32328
精华
41

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

跳转到指定楼层
楼主
发表于 2013-1-31 21:41:44 |只看该作者 |倒序浏览
Contrast Stretch dynamically adjusts the contrast of the image according to the range of brightness levels it contains. The adjustment takes place gradually over a period of time, so the player can be briefly dazzled by bright outdoor light when emerging from a dark tunnel, say. Equally, when moving from a bright scene to a dark one, the "eye" takes some time to adapt.对比度拉伸特效根据亮度级别的范围来动态地调整图像的对比度。调整是逐渐变化的,并且会持续一段时间,就好像是当玩家黑暗的隧道出来时,会对明亮的室外光线产生目眩的感觉。同样,当从明亮的画面进入到黑暗的一面,"眼睛"也要花一些时间来适应。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。
Understanding Contrast Stretch 对比度拉伸特效的理解The clarity of detail in an image is largely determined by the range of different brightness values it contains. It is difficult for the eye to distinguish between two brightness levels that differ by less than about 2% and above that, the greater the difference, the stronger the detail. The overall separation between the lightest and darkest values in an image is referred to as the contrast of that image.图像中的细节的清晰度很大程度上取决于它所包含的不同亮度值的范围。我们很难区分差异小于2%的两个亮度级别,亮度差异越大,所表现的细节也就越明显。在图像中最亮和最暗的值之间的整体分离程度被称为该图像的对比度。It is common for an image to use less than the full range of available brightness values. One way to increase the contrast is to redistribute the pixels' values so as to make better use of the range. The darkest level in the original image is remapped to a even darker level, the brightest to a brighter level and all the levels in between are moved farther apart in proportion. The distribution of levels is then "stretched" out farther across the available range and thus this effect is known as contrast stretch.一般来说,一张普通的图像的亮度范围仅为可用亮度范围的一部分,所以增加对比度的一种方法是对像素的亮度值进行重新分配,以更好地利用可用的亮度范围。原始图像中的最暗的级别会重新映射到一个更黑暗的水平,而最亮的级别则被映射到更亮的级别上,两者之间各级的间距也成正比地拉伸。这样,亮度级别的分布就相当于在可用范围内进行了拉伸,我们将此效果称为对比度拉伸。Contrast stretching is evocative of the way the eye adapts to different light conditions. When walking from an outdoor area to a dimly lit building, the view will briefly appear indistinct until the contrast is stretched to reveal the detail. When emerging from the building, the contrast stretch will have the effect of making the outdoor scene appear dazzling bright until the "eye" of the player adjusts.对比度拉伸特效可以体现眼睛在适应不同光照条件下的调节情况。当从室外走进昏暗的建筑后,视图将明显地变得模糊,直到对比度被拉伸后才能看清细节信息。同样当从大楼出来时,对比度拉伸会让户外场景更加明亮,造成目眩的效果,这种效果一直持续到玩家的"眼睛"适应了为止。
No Contrast Stretch applied. 没有应用对比度拉伸特效。
Contrast stretch applied with a dark skybox. Note that buildings get brighter.
在一个较暗的天空盒中使用对比度拉伸特效。注意建筑物变得更加明亮。
Contrast stretch applied with a very bright skybox. Note that buildings get darker.
在一个非常明亮的天空盒中使用对比度拉伸特效。注意建筑物变得更加灰暗。
[Properties 属性]    Adaptation Speed 适应速度
    The speed of the transition. The lower this number, the slower the transition
    变换速度,该值越低,变换的越慢
    Limit Minimum 受限最小值
    The darkest level in the image after adjustment.
    调整过后图像的最暗亮度级别
    Limit Maximum 受限最大值
    The brightest level in the image after adjustment.
    调整过后图像的最亮亮度级别  [Tips: 提示]    Since Constrast Stretch is applied over a period of time, the full effect is only visible in Play mode.
    因为对比度拉伸特效需要持续一段时间,所以该效果只能在运行模式下可见。 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 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

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

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

GMT+8, 2024-11-10 20:55 , Processed in 3.334610 second(s), 31 queries .

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

© 2008-2019 Narkii Inc.

回顶部