Lighting Up Your World


Adding lighting systems to your game in the Unity editor is as simple as adding objects to the scene. You can create different types of light sources from the GameObject menu. The different types essentially emulate common real-world light sources such as the sun, light bulbs, and headlights. Of course these core types can in be refined, manipulated, and combined in various ways to fit your specific needs.

For each individual light object in the scene you have the option of enabling or disabling the shadows it creates as well as adjusting the character of those shadows.

Directional light acts like the sun and is extremely helpful, though it can be a little tricky to grasp initially. This is because, unlike the other light types, its position does not affect the lighting. Instead, its rotation (the direction it’s pointing) emulates its perceived position in the sky. When pointed directly downwards the light source appears to be directly overhead. As you angle to more of a horizontal position it will appear that the Sun is going down, the scene becomes darker and shadows become longer.

directional_light

For nighttime game scenes, directional light can also be adjusted to act as moonlight, or simply to provide an overall higher brightness level to the scene.

Various settings, such as range and intensity, can be easily adjusted from the inspector menu. As well, the full spectrum of colors is available to choose from for each light object. And remember that light objects can be used for more than simply lighting up a scene.

Some very interesting effects can be created when attaching lights to game objects. For instance, to draw attention to a particular special item, like a crystal, you could add to it a short-range Point Light and change the hue to purple, giving the crystal a sort of magical glow.

The possibilities are extensive in working with light objects, and these are very simple to create and manipulate in the Unity Editor.

-Eric

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.