Directional Light in Unity

Notes:

Directional Light in Unity:

2. Directional light: Far light
- Directional light emits an infinite light in a specified direction
- The emitted light will not get diminish
- Is used to mimic Sunlight, moonlight, etc.

Note:
- Directional light position does not matter; we can place it wherever we want
- We can have multiple directional lights in the scene if required

Creating directional light:
GameObject Menu - Light - Directional light

Directional light properties:
Type
indicates type of light (Directional, Spot, Point, Area)
Color
indicates the color of the emitted light
Mode
indicates the mode of light, whether this light is real time, backed or mixed
Intensity
indicates the brightness of the emitted light
Indirect multiplier
indicates the brightness of the light that has bounced from one object to another
Shadow type
indicates whether the light casts hard or soft shadows or no shadows
Strength:
indicates opacity of shadows casted
Resolution:
indicates resolution of shadows casted
Bias:
indicates distance at which shadows casted are pushed away to control false artifacts
Normal Bias:
indicates how much shadows casted spread or shrunk to control false artifacts
Shadow Near Plane: works for range based lights
indicates shadows casted clipping in unit

Cookie
indicates the texture mask for a light
EX: patterned illumination of lights

Applying Cookie:
Import star_cookie texture
Texture Type - Cookie
Light Type - Directional
Alpha Source - From Gray scale
Wrap mode - Clamp / Repeat
Apply
Drag star_cookie to Cookie property of light

Cookie Size
indicates the size of texture mask applied to light

Draw halo
Draws a spherical halo at the light's position equal to light range value

Flare
Draws a Flare light at the light's position (Sun)
Note: Import Light Flares effects from standard assets

Render mode
Affects the degree of exactness & performance of lighting
Auto: Rendering mode is determined at run time,
important: rendered at per pixel basis
not important :rendered at per vertex basis

Culling mask
Select the layer which should not be affected by this light