- 最后登录
- 2018-12-19
- 注册时间
- 2012-8-20
- 阅读权限
- 90
- 积分
- 54706
- 纳金币
- 32328
- 精华
- 41
|
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/ |
|