光源模擬器 可以在本地模擬從燈、火燒、聚光燈和電視屏幕等對象處理出的現實照明。 使用 Lighting 服務,而不是只是通過 GlobalLighting 服務提供的一般全球照明,您可以創建像網路遊戲城市、傳統照明節、氣氛濃

光類型
光類型包括 點光源 、 聚光燈 和 表面光源 。每個分享從 2>Class.Light2> 類別,包括 5>Class.Light.Color|Color5> 、 8>Class.Light.Brightness|Brightness8> 和 <
點光源
Class.PointLight 發出光從單個點陣發射。這個對象適合像燈泡、 非方向 燈、火球等非方向燈。
Class.PointLight.Range|Range 屬性定義了點光的照明範圍,以 stud 測量單位測量光的位置。


要在 Studio 中建立 PointLight:
- 在 Explorer 窗口中,將鼠標指针移動至 一個 Class.附加物 或 Class.BasePart 並點擊按鈕 ⊕ (建議為點積點光發射點)。1>
- 從選單中插入 PointLight 。
聚光燈
Class.SpotLight 發出的光是圓錐狀,具有圓形基地。這個物體非常適合方向燈、手電筒和車頭燈。
聚光燈的 Face 屬性決定哪個面/軸光發射,如從下列街燈發光部分所示:


聚光燈的 Angle 屬性定義了錐筒頂端的光發射角度。最大值為 180 ,發光半球從頂端延伸到一半。


要在 Studio 中建立 SpotLight:
地面燈
Class.SurfaceLight 發出光從 BasePart 的面。這個對象適合用於從電視或電腦螢幕、看板和發光板上發光。
Class.SurfaceLight.Face|Face 表面燈的屬性決定了燈發射的面。 注意燈發射的表面,而不是僅發射在表面上的一個點。


Class.SurfaceLight.Angle|Angle 表面燈的角度定義了從零件表面發射的光角。 0 表示光從表面直接離開,而角度 180 表示光從表面橫向離開。


要在 Studio 中建立 SurfaceLight:
- 從選單中插入 SurfaceLight 。
- 設定燈光 Face 屬性,指定燈光發射的表面。
共用屬性
所有燈光源擁有來自 Light 類別的各種屬性,包括 顏色 、光澤 和 1>陰影1> 。
顏色
Class.Light.Color|Color 屬性設定發射的光的 Color3 值。



光澤
Class.Light.Brightness|Brightness 屬性設定了燈光的亮度,以最大效果在燈光中央。注意,Brightness 仍然是燈光的定義範圍,因此更高的 Brightness 值不會照亮更大的區域。



暗影
Class.Light.Shadows|Shadows 屬性項目會在陰影中顯示閱取光線的障礙。

