Light

The light is a key component in Unity to provides users with realistic lighting environment. In Unity, it provides with different types of light source to be used in different environments, including point light, spotlight, area light, and directional light. The scene would be dark if there is no light.

In Unity, it is easy to add a light component by clicking GameObject, Light, and choose the desired light type. You can change the light attributes on the Inspector view.

Point Light

A light that gets emitted from a single point in all directions. You can change the location of the point light to get the desired lighting effects. The point light is common source inside the house, such as the candle.

You can also change the Light attributes on the Inspector view.

  • Type : It is the type of the light source, including Point, Spot, Directional, and Area. You can directly transform it into another type of the light source.
  • Range : Set the range of the emitted light. Only both types of Spot and Point light can change the lighting range.

range of the point light

  • Color : Set the lighting color.

color of the point light

  • Mode : Set the lighting mode, including Realtime, Mixed, and Baked. Different lighting mode cause different lighting result on the area. The Realtime mode would reflect the directly lighting result at the run time, the Baked mode would precompute the lighting result, and the Mixed mode would combine the above both. The following is the youtube vedio demostrated by Hj Zo. It is a very good demostration among lighting mode changes.

Unity 5.6 Light Mode Comparison

light reference

  • Intensity : Set the strength of the light source.

intensity of point light

  • Indirect Multiplier : Set the value to vary the intensity of indirect light. The Indirect Multiplier defines the brightness of bounced light calculated by the global illumination (GI) system.

indirect multiplier

  • Shadow Type : Set the object's shadow type generated by the light source. There are three types, No Shadows, Soft Shadows, and Hard Shadows. The Hard Shadows produces shadows with a sharp edge, and it is looked more realistic than Soft Shadows.
  • Draw Halo : It is the switch for drawing the halo of the point light.

Draw Halo

  • Flare : Set the flare of the light source.

Flare

  • Render Mode : Set the mode for rendering lighting to the scene. If it is set to No Important, there is no emitted light to the scene.

render mode

Spotlight

Spotlight emits the cone like light, and it is commonly used as the flashlight, searchlight, or car lamp.

The light attributes are similar with the point light.

  • Parameter settings, including Type, Range, Color, Mode, Intensity, Indirect Multiplier, Shadow Type, Draw Halo, Flare, and Render Mode, are similar with the point light.
  • Spot Angle : Set the spotlight emitting angle range from 0 to 360 degree.

spotlight angle

  • Cookie : The Cookie is the lighting texture, for example flashlight, etc. It is also easy to use different textures to simulate the object shadow, for example, flowers, etc.

cookie of spotlight

  • Culling Mask : The culling mask makes the lighted object is culled or is masked.

Directional Light

The Directional Light is commonly used as the sun light. The light attributes are similar with the above both light sources.

shadows from direcional light

Light Mapping

In Unity, it also supports Light mapping. The Light mapping is the baked result to precompute the lighting result, and that is good for gaming performance. But it can't be a good solution for dynamic lighting, for example, location moving, color changing, or lighting strength, etc.

  • It is easy to bake the object by transforming it into the Static mode. In Inspector view, you can set the parameters for Lightmap Settings.

bake the object

  • Choose the light, set the light mode to Baked, and set the Shadow Type to Hard or Soft Shadows.
  • Set the environment parameters by clicking Window, Lightening, Settings on the toolbar.
    • On the Environement Lighting, set the following parameter. Set the Ambient Mode to Baked.
    • On the Lightmapping Settings, set the following parameter. Set Indirect Resolution, Lightmap Resolution, Lightmap Padding, Lightmap Size, Compress Lightmaps, and Ambient Occlusion, etc.

Light Plugin

You can also download the lighting tool plugin and install it into the Unity, for example, Lighting Box 2, etc.

results matching ""

    No results matching ""