Version: 2022.1
言語: 日本語
ライト
Using Lights

ライトのタイプ

ここでは、Light コンポーネントType プロパティの効果について説明します。

Type プロパティを使用して、Light の動作を選択できます。使用可能な値は以下のとおりです。

  • Point Light, a Light that’s located at a point in the Scene and emits light in all directions equally
  • Spot Light, a Light that’s located at a point in the Scene and emits light in a cone shape
  • Directional Light, a Light that’s located infinitely far away and emits light in one direction only
  • Area Light, a Light that’s defined by a rectangle or disc in the Scene, and emits light in all directions uniformly across its surface area but only from one side of the rectangle or disc

Point Lights

A Point Light is located at a point in space and sends light out in all directions equally. The direction of light hitting a surface is the line from the point of contact back to the center of the light object. The intensity diminishes with distance from the light, reaching zero at a specified range. Light intensity is inversely proportional to the square of the distance from the source. This is known as ‘inverse square law’ and is similar to how light behaves in the real world.

ポイントライトは、シーン内のランプや他の局所的な光源をシミュレーションするのに役立ちます。リアリスティックに周囲を照らす火花や爆発を作ったりするのにも役立ちます。

シーンにおけるポイントライトの効果の例
シーンにおけるポイントライトの効果の例

Spot Lights

Like a Point Light, a Spot Light has a specified location and range over which the light falls off. However, a Spot Light is constrained to an angle, resulting in a cone-shaped region of illumination. The center of the cone points in the forward (Z) direction of the light object. Light also diminishes at the edges of a Spot Light’s cone. Widening the angle increases the width of the cone and with it increases the size of this fade, known as the ‘penumbra’.

一般的にスポットライトは、懐中電灯、車のヘッドライト、サーチライトなどといった人工的な光源として使用されます。スクリプトやアニメーションで方向を制御すれば、動きのあるスポットライトでシーン内のごく狭いエリアを照らし、印象的なライティング効果をつくり出すことができます。

シーンにおけるスポットライトの効果の例
シーンにおけるスポットライトの効果の例

Directional Lights

Directional Lights are useful for creating effects such as sunlight in your scenes. Behaving in many ways like the sun, directional lights can be thought of as distant light sources which exist infinitely far away. A Directional Light doesn’t have any identifiable source position and so the light object can be placed anywhere in the scene. All objects in the scene are illuminated as if the light is always from the same direction. The distance of the light from the target object isn’t defined and so the light doesn’t diminish.

ディレクショナルライトは、ゲーム世界の範囲外にある位置から差す、大きな遠い光源です。写実的なシーンでは、太陽や月のシミュレーションに使うこともできます。また、アブストラクトなゲーム世界では、光がどこから差しているか特に明確にすることなく、本物らしい影をオブジェクトに付けることができます。

シーンにおけるディレクショナルライトの効果の例
シーンにおけるディレクショナルライトの効果の例

By default, every new Unity scene contains a Directional Light. This is linked to the procedural sky system defined in the Environment Lighting section of the Lighting Panel (Lighting>Scene>Skybox). You can change this behaviour by deleting the default Directional Light and creating a new light or simply by specifying a different GameObject from the ‘Sun’ parameter (Lighting>Scene>Sun).

デフォルトのディレクショナルライト (つまり ‘Sun’) を回転させると ‘Skybox’ が更新されます。ライトは横の角度、つまり地面に平行になると、日没のような効果になります。さらに、ライトを上に向けると、空が暗くなり、夜のようになります。上方からライトをあてると、空は日中の様子になります。

環境的な条件として Skybox を選択すると、アンビエントライトもその色に対応して変化します。

Area Lights

You can define an Area Light by one of two shapes in space: a rectangle or a disc. An Area Light emits light from one side of that shape. The emitted light spreads uniformly in all directions across that shape’s surface area. The Range property determines the size of that shape. The intensity of the illumination provided by an Area Light diminishes at a rate determined by the inverse square of the distance from the light source (see inverse square law). Because this lighting calculation is quite processor-intensive, Area Lights aren’t available at runtime and can only be baked into lightmaps.

エリアライトは複数の異なる方向から同時にオブジェクトを照らすので、他の種類のライトと比べてシェーディングが柔らかく繊細になります。写実的な街頭や、プレイヤーに近いところに複数並んだライトの表現などに使用できます。小さなエリアライトは小さな光源(家のインテリアのライトなど)をシミュレートでき、ポイントライトよりも写実的な効果を得られます。

エリアライトの表面からライトが放射され、柔らかなシャドウを作る拡散ライトを作成します。
エリアライトの表面からライトが放射され、柔らかなシャドウを作る拡散ライトを作成します。

=======

ライト
Using Lights