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

[Unity 组件参考手册]组件:图像特效脚本之颜色校正图像特效

[复制链接]
.    

3797

主题

11

听众

5万

积分

首席设计师

Rank: 8Rank: 8

纳金币
32328
精华
41

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

跳转到指定楼层
楼主
发表于 2013-1-31 21:39:11 |只看该作者 |倒序浏览
Color Correction allows you apply arbitrary color correction to your scene as a postprocessing effect (just like the Curves tool in photoshop or Gimp). This page explains how to setup color correction in Photoshop and then apply exactly the same color correction at&nbsp***ntime in Unity.颜色校正作为一种后处理特效允许您将任意的校正颜色应用于你的场景(就像 Photoshop 或 Gimp 中的曲线工具)。本页说明如何在 Photoshop 中设置颜色校正,然后在Unity中如何在程序运行时应用完全相同颜色校正。Like all image effects, Color Correction is only available in Pro version of Unity. Make sure to have the Pro Standard Assets installed.和其他图像特效一样,该特效只能在Unity Pro上进行使用,并且在使用之前必须安装Pro Standard Assets。
Color correction applied to the scene. Color ramp used (magnified) is shown at the right.
应用于场景的颜色校正特效。所用的颜色渐变图可见右方。
Color ramp used for the image above.
上面图片所用的颜色渐变图。
Getting color correction from Photoshop into Unity
从PhotoShop中得到颜色渐变图并应用于Unity    Take a screenshot of a typical scene in your game
    在游戏中取一张典型场景的截图
    Open it in Photoshop and color correct using the Image->Adjustments->Curves
    在PhotoShop中打开它,并使用Image->Adjustments->Curves进行颜色校正
    Save the .acv file file from the dialog using Save...
    使用Save...保存.acv文件
    Open Pro Standard Assets->Image Based->color correction ramp.png in Photoshop
    在Photoshop中打开Pro Standard Assets->Image Based->color correction ramp.png
    Now apply color correction to the ramp image: open Image->Adjustments->Curves again and load your saved .acv file
    现在在渐变图像中进行颜色渐变处理:再次打开Image->Adjustments->Curves,并导入你保存的.acv文件
    Select your camera in Unity and select Component->Image Effects->Color Correction to add color correction effect. Select your modified color ramp.
    在Unity中选择你的照相机,选择选项Component->Image Effects->Color Correction来加入颜色校正特效。选择你修改过的渐变颜色。
    Hit Play to see the effect in action!
    点击Play来看效果。 Details 细节Color correction works by remapping the original image colors through the color ramp image (sized 256x1):颜色校正特效是将颜色渐变图像映射到原始图像上所得到的效果:    result.red = pixel's red value in ramp image at (original.red + RampOffsetR) index
    result.red =渐变图像上索引为(original.red + RampOffsetR)的像素红色通道值
    result.green = pixel's green value in ramp image at (original.green + RampOffsetG) index
    result.green =渐变图像上索引为(original. green + RampOffsetG)的像素绿色通道值
    result.blue = pixel's blue value in ramp image at (original.blue + RampOffsetB) index
    result.blue =渐变图像上索引为(original. blue + RampOffsetB)的像素蓝色通道值 So for example, to invert the colors in the image you only need to flip the original color ramp horizontally (so that it goes from white to black instead of from black to white).例如,要反相图像中的颜色你只需要水平地翻转颜色渐变曲线(以便它从白色变为黑色而不是从黑色到白色)。A simpler version of color remapping that only remaps based on luminance can be achieved with Grayscale image effect.一个只基于亮度的颜色重映射的简单版本通过结合灰度图像特效结果来达到。
Tips: 提示    The color correction ramp image should not have mip-maps. Turn them off in Import Settings. It should also be set to Clamp mode.
    颜色校正渐变图像不应该拥有mip-map。在Import Settings中将其关闭,同时它应该是Clamp模式。 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-27 09:12 , Processed in 0.089984 second(s), 33 queries .

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

© 2008-2019 Narkii Inc.

回顶部