Light
Manual     Reference     Scripting   
Reference Manual > Components > Rendering Components > Light

このドキュメントは有志により翻訳されたもので、オフィシャルではありません。オリジナルのページはこちら
This document is unofficially translated by users.Please see the original document here.

翻訳に関する修正など、ご連絡はこちらまで。
Please send e-mail to here, when you have any question about the translation.

Light

Lights will bring personality and flavor to your game. You use lights to illuminate the scenes and objects to create the perfect visual mood. Lights can be used to simulate the sun, burning match light, flashlights, gun-fire, or explosions, just to name a few.


The Light Inspector

There are three types of lights in Unity:

Lights can also cast Shadows. Shadows are a Pro-only feature. Shadow properties can be adjusted on a per-light basis.

Properties

TypeThe current type of light object:
DirectionalA light placed infinitely far away. It affects everything in the scene and can not attenuate.
PointA light that shines equally in all directions from its location, affecting all objects within its Range.
SpotA light that shines everywhere within a cone (the Spot Angle), and a Range. Only objects within this region are affected by the light.
ColorThe color of the light emitted.
AttenuateDoes the light diminish with increasing distance? If disabled, objects' brightness will "pop" as they enter and exit the light's region of influence. It can be useful to turn off when you want to do some special effects. If the light is directional, this property is ignored.
IntensityBrightness of the light. Default value for Spot/Point lights is 1. Default value for Directional lights is 0.5
RangeHow far light is emitted from the center of the object.
Spot AngleIf the light is a Spot light, this determines the angle of the cone in degrees.
Shadows (Pro only)Options for shadows that will be cast by this light.
TypeHard or Soft shadows. Soft shadows are more expensive.
ResolutionDetail level of the shadows.
StrengthThe darkness of the shadows. Values are between 0 and 1.
ProjectionProjection type for Directional light shadows.
Constant BiasBias in world units used for shadows. This value is currently ignored for Point Light shadows.
Object Size BiasBias applied per shadow caster depending on it's size. Default value is 1% of caster's size. This value is currently ignored for Point Light shadows.
CookieYou can assign a texture to a light. The alpha channel of this texture is used as a mask that determines how bright the light is at different places. If the light is a Spot or a Directional light, this must be a 2D texture. If the light is a Point light, it must be a Cubemap.
Draw HaloIf checked, a spherical halo of light will be drawn with a radius equal to Range.
FlareOptional reference to the Flare that will be rendered at the light's position.
Render ModeChoose whether this light is rendered as a vertex light, pixel light, or determined automatically. For a detailed description of this tradoff, see Performance Considerations below. Options include:
AutoThe rendering method is determined at runtime depending on the brightness of nearby lightsOptimizing Graphics Performance page for more information.

Creating Cookies

For more information on creating cookies, please see the tutorial on how to create a Spot Light cookie here.

Hints

  • Spot lights with cookies can be extremely effective for making light coming in from windows. In this case, disable attenuation, and set the range to just reach the floor.
  • Low-intensity point lights are good for providing depth to a scene.
  • For maximum performance, use a VertexLit shader. This shader only does per-vertex lighting, giving a much higher throughput on low-end cards.