天天看點

Emission 自發光 Standard Shader系列13Emission 自發光

Emission 自發光

本文檔主要是對Unity官方手冊的個人了解與總結(其實以翻譯記錄為主:>)

僅作為個人學習使用,不得作為商業用途,歡迎轉載,并請注明出處。

文章中涉及到的操作都是基于Unity2018.3版本

參考連結:https://docs.unity3d.com/Manual/StandardShaderMaterialParameterOcclusionMap.html

Emission 自發光 Standard Shader系列13Emission 自發光

Emission controls the color and intensity of light emitted from the surface. When you use an emissive Material in your Scene, it appears as a visible source of light. The GameObject appears to be self-illuminated.

自發光控制從表面發出的光的顔色和強度。當你在你的場景中使用自發光材質時,它會以可見光的形式出現。遊戲對象似乎是自己發射的光照。

Emissive materials are usually used on GameObjects where some part should appear to be lit up from inside, such as the screen of a monitor, the disc brakes of a car braking at high speed, glowing buttons on a control panel, or a monster’s eyes which are visible in the dark.

自發光的材質通常是用在遊戲對象部分應該從内部亮起來,如螢幕的螢幕,一輛汽車在速度高時制動盤式制動器的發光,在控制台上發光的按鈕,或者一個怪物的眼睛在黑暗中是可見的。

You can define basic emissive materials with a single color and emission level. To enable the Emission property, tick the Emission checkbox. This enables the Color and Global Illumination sub-properties. Click the Color box to open the HDR Color panel. Here you can alter the color of the illumination and the intensity of the emission:

您可以使用單一顔色和自發光級别定義基本自發光材質。若要啟用自發光屬性,請勾選自發光複選框。這将啟用顔色和全局光照兩個子屬性。單擊顔色框打開HDR顔色面闆。這裡你可以改變照明的顔色和自發光的強度:

Emission 自發光 Standard Shader系列13Emission 自發光

A material with an orange emission color, and an emission brightness of 0.5

一種自發光顔色為橙色,自發光亮度為0.5(未發現來源)的材質

GameObjects that use these materials appear to remain bright even in dark areas of your Scene.

使用這些材質的遊戲對象即使在場景的黑暗區域也會保持明亮。

Emission 自發光 Standard Shader系列13Emission 自發光

Red, Green and Blue spheres using emissive materials. Even though they are in a dark Scene, they appear to be lit from an internal light source.

紅色,綠色和藍色球體使用自發光材質。即使它們在一個黑暗的場景中,它們顯得是由内部光源照亮的。

As well as simple control over emission using a flat color and brightness setting, you can assign an emission map to this parameter. As with the other texture map parameters, this gives you much finer control over which areas of your material appear to emit light.

除了使用平面顔色和亮度設定對自發光進行簡單控制外,還可以為該參數指派自發光貼圖。與其他紋理貼圖參數一樣,這使您能夠更好地控制材質的哪些區域似乎在自發光。

If a texture map is assigned, the full color values of the texture are used for the emission color and brightness. You can use the emission value intensity field to boost or reduce the overall emission level of your material.

如果一個紋理貼圖被指派,紋理的顔色值用于自發光顔色和亮度。您可以使用自發光值強度場來提高或降低您的材質的總體自發光水準。

Emission 自發光 Standard Shader系列13Emission 自發光

Shown in the inspector, Left: An emission map for a computer terminal. It has two glowing screens and glowing keys on a keyboard. Right: The emissive material using the emission map. The material has both emissive and non-emissive areas.

在檢查器中顯示,左邊:計算機終端的自發光圖。它有兩個發光的螢幕和一個發光的鍵盤按鍵。右邊:使用自發光圖的自發光材質。這種材質有自發光區和非自發光區。

Emission 自發光 Standard Shader系列13Emission 自發光

In this image, there are areas of high and low levels of light, and shadows falling across the emissive areas which gives a full representation of how emissive materials look under varying light conditions.

在這幅圖像中,有高和低的光照的區域,還有陰影,都落在自發光區域,這提供了在不同的光條件下自發光材質的完整表現。

As well as the emission color and brightness, the Emission parameter has a Global Illumination setting, allowing you to specify how the apparent light emitted from this material affects the contextual lighting of other nearby GameObjects. There are two options

除了自發光顔色和亮度,自發光參數還有全局照明設定,允許您指定從該材質發射的可見光如何影響附近其他遊戲對象的上下文照明。有兩種選擇:

  • Realtime - Unity adds the emissive light from this Material to the

    Realtime Global Illumination calculations for the Scene. This means that this emissive light affects the illumination of nearby

    GameObjects, including ones that are moving.

    實時-Unity 添加從這個材質的自發光到實時全局光照計算。這意味着這個自發光影響附近的遊戲對象的照明,包括移動的對象。

  • Baked - The emissive light from this material is baked into the

    static lightmaps for the Scene, so other nearby static GameObjects appear to be lit by this material, but dynamic GameObjects are affected.

    烘焙-這種材質的自發光被烘焙成靜态光照貼圖,是以其他附近的靜态遊戲對象被這個材質光照,但動态遊戲對象未受到影響(寫法有誤)。

    Emission 自發光 Standard Shader系列13Emission 自發光

    Baked emissive values from the computer terminal’s emission map light up the surrounding areas in this dark Scene

    在這個黑暗的場景中,從計算機終端的自發光圖中烘焙出的自發光值照亮了周圍的區域

繼續閱讀