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

[Unity 组件参考手册]组件:图像特效脚本之法线的边缘检测特效

[复制链接]
.    

3797

主题

11

听众

5万

积分

首席设计师

Rank: 8Rank: 8

纳金币
32328
精华
41

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

跳转到指定楼层
楼主
发表于 2013-1-31 21:27:40 |只看该作者 |倒序浏览
This version of the Edge Detect image effect creates outlines around edges by taking the scene geometry into account. Edges are not determined by colour differences but by the surface normals and distance from camera of neighbouring pixels (the surface normal is an "arrow" that indicates the direction the surface is facing at a given pixel position). Generally, where two adjacent pixels have significantly different normals and/or distances from the camera, there is an edge in the scene.该边缘检测的图像特效是通过场景中物体的几何信息来将其轮廓线抽取出来。边缘不仅由颜色的差异来决定,同时也由相邻像素所对应的法线朝向和离相机的距离来决定。一般来说,当两个相邻像素拥有明显不同的法线朝向或距相机距离时,这就是场景中的一个边缘。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。
Scene without edge detection 没有边缘检测效果的场景
The same scene showing the detected edges 同样场景有边缘检测效果 This effect uses the ImageEffectOpaque attribute which enables image effects to be&nbsp***cuted before the transparent render passes. By default, image effects are&nbsp***cuted after both opaque and transparent passes have been fully rendered.该特效使用了ImageEffectOpaque属性,该属性使图像特效在渲染透明物体通道之前执行。默认情况下,图像特效都是在场景中实体和透明物体全部渲染完成后进行的。-------------------------------------------------------------------------------
[Properties 属性]    Mode 模式
    Chose between Thin and Thick. Thick will take more samples into consideration to cons***ct outlines.
    在粗细之间进行选择。粗表示使用更多的采样点来生成轮廓线
    Edge Sensitivity
    边缘敏感度
    Depth 深度
    The minimum difference between the distances of adjacent pixels that will indicate an edge.
    相邻像素的深度最小差异。大于该差异,则认为存在边。
    Normals 法线
    The minimum difference between the normals of adjacent pixels that will indicate an edge.
    相邻像素的最小法线朝向差异。大于该差异,则认为存在边。
    Background options
    背景选项
    Edges only 仅边缘
    Blend the background with a fixed color.
    将一个固定颜色与背景进行混合
    Background 背景
    The color used when Edges only is > 0.
    仅当边大于0时使用这个颜色。-------------------------------------------------------------------------------[Hardware support 硬件支持]This effect requires a graphics card with pixel shaders (2.0) or OpenGL ES 2.0. Additionally, depth texture support is required. PC: NVIDIA cards since 2004 (GeForce 6), AMD cards since 2004 (Radeon 9500), Intel cards since 2006 (GMA X3000); Mobile: OpenGL ES 2.0 with depth texture support; Consoles: Xbox 360, ps3.这个特效需要显卡拥有像素着色器(2.0)或者OpenGL ES 2.0。台式机:2004年以后的NVIDIA显卡(GeForce 6),2004年以后的AMD显卡(Radeon 9500),2006年以后的Intel卡(GMA X3000);移动设备: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-9-20 17:45 , Processed in 0.099773 second(s), 33 queries .

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

© 2008-2019 Narkii Inc.

回顶部