查看: 3087|回复: 1
打印 上一主题 下一主题

如何制作聚光灯投影遮罩?

[复制链接]
.    

3797

主题

11

听众

5万

积分

首席设计师

Rank: 8Rank: 8

纳金币
32328
精华
41

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

跳转到指定楼层
楼主
发表于 2013-2-5 15:26:51 |只看该作者 |倒序浏览
Unity ships with a few Light Cookies in the Standard Assets. When the Standard Assets are imported to your project, they can be found in Standard Assets->Light Cookies. This page shows you how to create your own.Unity的 Standard Assets 包中有几个Light Cookies。当导入资源包,你可以在Standard Assets->Light Cookies下面找到。本节告诉你怎么自己创建。A great way to add a lot of visual detail to your scenes is to use cookies - grayscale textures you use to control the precise look of in-game lighting. This is fantastic for making moving clouds and giving an impression of dense foilage. The Light Component Reference page has more info on all this, but the main thing is that for textures to be usable for cookies, the following properties need to be set:使用cookie(投影遮罩)给场景添加更多视觉细节很好的方法-你使用灰度图准确的控制游戏灯光。在灯光组件参考页面有更多信息,但是,主要的方式是用纹理来制作一个可用的cookie,需要设置以下属性:To create a light cookie for a spot light:给聚光灯创建cookie(投影遮罩):    Paint a cookie texture in photoshop. The image should be greyscale. White pixels means full lighting intensity, black pixels mean no lighting. The borders of the texture need to be completely black, otherwise the light will appear to leak outside of the spotlight.
    在Photoshop中绘制一张cookie纹理,图像需要是灰度图。白色像素代表完全的光照,黑色像素代表没有光照。纹理的边缘需要完全黑色,否则会出现灯光泄露到聚光灯范围之外。
    In the Texture Inspector change the Repeat Wrap mode to Clamp
    在纹理检视面板修改循环模式为Clamp
    Select the Texture and edit the following Import Settings in the Inspector.
    选择纹理,在检视面板编辑导入设置。
    Enable Border Mipmaps
    打开Border Mipmaps
    Enable Alpha From Grayscale (this way you can make a grayscale cookie and Unity converts it to an alpha map automatically)
    打开 Alpha From Grayscale (这样你可以通过Unity自动将灰度图转成Alpha)
    Set the Texture Format to Alpha 8 Bit
    设置纹理格式为Alpha 8 Bit 【来源:互联网】
更多精彩教程,尽在web3D纳金网http://www.narkii.com/college/
分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

nts    

3

主题

1

听众

743

积分

初级设计师

Rank: 3Rank: 3

纳金币
7
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

沙发
发表于 2013-10-20 11:36:59 |只看该作者
聚光灯投影遮罩
回复

使用道具 举报

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

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

GMT+8, 2024-9-21 17:46 , Processed in 0.099517 second(s), 31 queries .

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

© 2008-2019 Narkii Inc.

回顶部