向材质添加发光可使材质在场景中显示为可见光源。材质发光属性用于控制材质表面发光的颜色和强度。
如果希望游戏对象的某个部位看起来从内部照亮(例如显示器的屏幕、高速制动的汽车的盘式制动器、控制面板上的发光按钮),发光很有用。使用发光材质的游戏对象即使在场景的暗区也会保持明亮。
可使用单个颜色和发光级别来定义基本发光材质。选中 Emission 复选框可使材质发光。此时将显示 Color 和 Global Illumination 属性。
属性 | 描述 |
---|---|
Color | 指定发光的颜色和强度。单击 Color 框可打开 HDR Color 拾色器。在此处可以更改光照的颜色和发光的强度 (Intensity)。要指定材质的哪些区域发光,可以向该属性分配一个发光贴图。如果您执行此操作,Unity 会使用贴图的全色值来控制发光颜色和亮度。还可以使用 HDR 拾色器对贴图着色和改变发光强度。 |
Global Illumination | 指定此材质发出的光如何影响附近其他游戏对象的环境光照。有三个选项: • Realtime:Unity 将此材质的自发光添加到场景的 Realtime Global Illumination(实时全局光照)计算中。这意味着此自发光会影响附近游戏对象(包括正在移动的游戏对象)的光照。 • Baked:Unity 将此材质的自发光烘焙到场景的静态全局光照中。此材质会影响附近静态游戏对象的光照,但不会影响动态游戏对象的光照。但是,光照探针仍然会影响动态游戏对象的光照。 • None:此材质的自发光不会影响场景中的实时光照贴图、烘焙光照贴图或光照探针。此自发光不会照亮或影响其他游戏对象。材质本身具有发光颜色。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.