How lighting affects game design and gaming experience





In anticipation of the PS5 and Project Scarlett, which will support ray tracing, I thought about lighting in games. I found material where the author explains what light is, how it affects design, changes gameplay, aesthetics and experience. All with examples and screenshots. During the game, you don’t immediately pay attention to this.



Introduction



Lighting is necessary not only so that the player can make out the scene (although this is very important). Light affects emotions. Many lighting techniques in theater, cinema and architecture are used to enhance the emotional component. Why not borrow these principles from game designers? The connection between the picture and the emotional response provides another powerful tool that helps you work with the character, narrative, sound, game mechanics, and so on. In this case, the interaction of light with the surface allows you to affect the brightness, color, contrast, shadow and other effects. All this translates into a base that every designer should master.



The purpose of this material is to determine how lighting design affects game aesthetics and user experience. We will analyze the nature of light and how it is used in other areas of art to analyze its role in video games.





Swan Lake, Alexander Ekman



I - The nature of light



“Space, light and order. These are the things that people need as much as they need a piece of bread or an overnight stay, ”- Le Corbusier.



Natural light guides and accompanies us from the moment of birth. It is necessary; it sets our natural rhythm. Light controls the processes of our body and affects the biological clock. We will understand what luminous flux, light intensity, color and focal points are. And then we will understand what light consists of and how it behaves.



1 - What the human eye sees



Light is part of the electromagnetic spectrum perceived by the eye. In this section, the wavelengths are in the range from 380 to 780 nm. During the day, we distinguish colors thanks to cones, and at night the eye uses sticks, and we see only gradations of gray.



The main properties of visible light are direction, intensity, frequency and polarization. Its speed in vacuum is 300,000,000 m / s, and this is one of the fundamental physical constants.





Visible electromagnetic spectrum



2 - Direction of distribution



There is no substance in a vacuum, and light travels directly. However, it behaves differently when exposed to water, air, and other substances. Upon contact with the substance, part of the light is absorbed and converted into thermal energy. In a collision with a transparent material, part of the light is also absorbed, but the rest passes through. From smooth objects such as a mirror, light is reflected. If the surface of the object is uneven, the light is scattered.





Light direction



3 - Basic Features



Light flow. The amount of light emitted by the light source.

Unit of measurement: lm (lumen).







The power of light. The amount of light carried in a particular direction.

Unit of measurement: cd (candela).







Illumination. The amount of luminous flux incident on the surface.

Illumination = luminous flux (lm) / area (m2).



Unit of measurement: lux (lux).







Brightness. This is the only basic characteristic of light that the human eye perceives. On the one hand, it takes into account the brightness of the light source, on the other hand, the surface, which means that it strongly depends on the degree of reflection (on color and surface).

Unit of measurement: cd / m2.







4 - Color temperature



Color temperature is measured in Kelvin and displays the color of a particular light source. British physicist William Kelvin heated a lump of coal. He glowed, shimmering in different colors that corresponded to different temperatures. At first, the charcoal glowed dark red, but as it warmed up, the color changed to bright yellow. At maximum temperature, the emitted light turned blue-white.





Natural light, 24 hours, Simon Lakey



II - Light Design Techniques



In this section, we will analyze which lighting patterns can be used to influence the expressiveness of the content / visual range. To do this, we will identify the similarities and differences in lighting techniques used by lighting artists and designers.



1 - Chiaroscuro and Shadebism



Chiaroscuro is one of the concepts of the theory of art, which relates to the distribution of illumination. Use it to display tone transitions to convey volume and mood. Georges de Latour is known for his work with night chiaroscuro and scenes lit by candlelight. None of his predecessor artists worked through such transitions so expertly. Light and shadow play a crucial role in his works and are part of the composition in the most varied and often alternative variations. The study of paintings by de Latour helps to understand the use of light and its properties.





Georges de Latour "The Penitent Mary Magdalene", 1638-1643



a - High contrast



In this picture, a bright face and clothes stand out against a dark background. Due to the high contrast of tones, the viewer's attention is focused on this part of the image. In reality, there would be no such contrast. The distance between the face and the candle is greater than between the candle and hands. However, comparing with the face, we see that the tone and contrast on the hands are muffled. Georges de Latour uses different contrasts to attract the attention of an observer.







b - Contour and rhythm of light



Due to the high difference in tones, contours appear in some areas around the edges of the figure. Even in the dark parts of the picture, the artist liked to use different tones to emphasize the boundaries of the object. Light is not concentrated in one area, it glides down: from the face to the legs.







c - Light source



In most works, Georges de Latour uses candles or lamps as a light source. The picture shows a burning candle, but we already know that chiaroscuro does not depend on it. Georges de Latour set his face against a dark background and set a candle to create a sharp transition between tones. For high contrast, light tones are adjacent to dark, achieving the optimal effect.







d - Chiaroscuro as a composition of geometric shapes



If we simplify the light and shadow in this work, we will see the basic geometric shapes. The unity of light and dark tones forms a simple composition. It indirectly sets the feeling of space in which the position of objects and figures shows the foreground and background, creating tension and energy.







2 - Basic cinematic lighting techniques



2.1 - Lighting from three points



One of the most popular and successful ways of highlighting any object is lighting from three points, a classic Hollywood scheme. This technique allows you to convey the volume of an item.



Drawing light (Key Lighting, i.e. the main light source)

This is usually the most powerful light in every scene. It can come from anywhere, its source can be from the side or behind the object (Jeremy Byrne Digital Lighting and Rendering).







Fill Lighting (Fill Lighting, i.e. light to control contrasts)

From the name it’s obvious that it is used to “fill in” and remove the dark areas that the painting light creates. The fill light is noticeably less intense and is located at an angle to the main light source.







Background light (Backlighting, i.e. background separator)

It is used to convey the volume of the scene. It separates the object from the background. Like fill light, the background is less intense and covers a large area of ​​the object.







2.2 - Bottom



Due to the movement of the sun, we are used to seeing people illuminated from any angle, but not from below. This method looks very unusual.





Frankenstein, James Whale, 1931



2.3 - Back



The object is located between the light source and the viewer. Because of this, a glow appears around the object, and the rest of its parts remain in the shade.





“Alien,” Steven Spielberg, 1982



2.4 - Side



Such lighting is used to illuminate the scene from the side. It creates a clear contrast, displaying textures and emphasizing the contours of the object. This method is close to the chiaroscuro technique.





Blade Runner, Ridley Scott, 1982



2.5 - Practical lighting



This is real lighting in the scene, that is - lamps, candles, TV screen and others. Such additional light can be used to enhance the light intensity.





Barry Lyndon, Stanley Kubrick, 1975



2.6 - Reflected Light



Light from a powerful source is scattered by a reflector or surface, such as a wall or ceiling. Thus, light covers a large area and lays more evenly.





The Dark Knight: The Rebirth of the Legend, Christopher Nolan, 2012



2.7 - Hard and soft light



The main difference between hard and soft light is the size of the light source relative to the object. The sun is the largest light source in the solar system. However, it is 90 million kilometers away from us, which means it is a small source of light. It creates hard shadows and, accordingly, hard light. If clouds appear, the whole sky becomes a huge source of light, and shadows are more difficult to distinguish. This means that soft light arises.





3D examples from LEGO, Juan Prada, 2017



2.8 - High and low key



High key lighting is used to create very vivid scenes. It is often close to overexposed exposure. All light sources are approximately equal in power.

Unlike high key lighting, with low key the scene is very dark and there can be a powerful light source. The main role is given to shadows, not light, to convey a sense of suspense or drama.





THX 1138, George Lucas, 1971



2.9 - Motivated Lighting



Such lighting imitates natural light - solar, moonlight, street lights and so on. It is used to enhance practical lighting. Special techniques help make motivated lighting natural, for example, filters (gobos) to create the effect of curtained windows.





Drive, Nicholas Winding Refn, 2011



2.10 - Outdoor light



It can be sunlight, moonlight or street lights that are visible in the scene.





“Very strange things. Season 3, the Duffer Brothers, 2019



III - Rendering Basics



Level designers recognize the importance of lighting and use it to achieve a certain perception of the scene. In order to highlight the level and achieve their desired visual goals, they need to determine the static light sources, their propagation angles and colors. They set a certain atmosphere and the necessary overview. But everything is not so simple, because the lighting depends on such technical characteristics - for example, on the power of the processor. Therefore, there are two types of lighting: pre-calculated lighting and real-time rendering.



1 - Precomputed lighting



Designers use static lighting to set lighting characteristics for each source — including its position, angle, and color. As a rule, real-time global lighting is not possible due to performance.



Pre-calculated static global lighting can be used in most engines, including Unreal Engine and Unity. The engine “bakes” such lighting into a special texture, the so-called “lighting map” (lightmap, lightmap). These lightmaps are stored along with other map files, and the engine accesses them when rendering the scene.





The same scene: without lighting (left), only with direct lighting (in the middle) and with indirect global lighting (right). Artwork with Unity Learn



In addition to lightmaps, there are shadow cards, which, respectively, are used to create shadows. First, everything is drawn taking into account the light source - it produces a shadow that reflects the pixel depth of the scene. The resulting pixel depth map is called a shadow map. It contains information about the distance between the light source and the objects closest to it for each pixel. Then, rendering is performed, where each pixel on the surface is checked against a shadow map. If the distance between the pixel and the light source is greater than that recorded in the shadow map, then the pixel is in the shadow.





The algorithm for applying the shadow map. Illustration with OpenGl-tutorial



2 - Real-time rendering



One of the classic models of lighting for real time is called the Lambert model (in honor of the Swiss mathematician Johann Heinrich Lambert). In real-time rendering, the GPU usually sends objects one at a time. This method uses the display of an object (its position, rotation angle and scale) to determine which of its surfaces needs to be drawn.



In the case of Lambert lighting, light emanates from every point on the surface in all directions. This does not take into account some subtleties, for example, reflection (article by Chandler Prall). To make the scene look more realistic, additional effects are superimposed on the Lambert model - glare, for example.





Lambert shading on the example of a sphere. Illustration from the materials of Peter Dyachikhin



Most modern engines (Unity, Unreal Engine, Frostbite and others) use physically correct rendering (Physically Based Rendering, PBR) and shading (article by Lucas Orsvarn). PBR shading offers more intuitive and convenient methods and parameters for describing the surface. In Unreal Engine, PBR materials have the following parameters:







Without PBR (left), PBR (right). Artwork with Meta 3D studio



However, there is another approach to rendering - ray tracing. This technology has not previously been considered due to performance and optimization issues. It was used only in the film and television industries. But the release of a new generation of graphics cards made it possible for the first time to use this approach in video games.



Ray tracing is a rendering technology that creates more realistic lighting effects. She repeats the principles of light propagation in a real environment. Rays emitted by a light source behave in the same way as photons. They are reflected from surfaces in an arbitrary direction. At the same time, getting into the camera, reflected or direct rays transmit visual information about the surface from which they are reflected (for example, communicate its color). Many projects with E3 2019 will support this technology.



3 - Types of light sources



3.1 - Point light



It emits light in all directions, like a normal light bulb in real life.





Unreal Engine Documentation



3.2 - Spotlight



It emits light from one point, while the light spreads like a cone. Real-life example: a flashlight.





Unreal Engine Documentation



3.3 - Area light



It emits direct light from a specific path (such as a rectangle or circle). Such light loads the processor heavily, because the computer calculates all the points that emit light.





Unity Documentation



3.4 - Directional light



Simulates the sun or other distant light source. All rays move in one direction and can be considered parallel.





Unity Documentation



3.5 - Emissive light



The emitting light source or emitting materials (Emissive Materials in UE4) easily and efficiently create the illusion that the material emits light. There is a blur effect of light - it is visible if you look at a very bright object.





Unreal Engine Documentation



3.6 - Ambient Light



The scene from Doom 3 is lit by lamps on the walls, the engine creates shadows. If the surface is in shadow, he paints it in black. In real life, light particles (photons) can be reflected off surfaces. In more advanced rendering systems, light is baked into textures or calculated in real time (global lighting). Older game engines - like ID Tech 3 (Doom) - used up too many resources to calculate indirect lighting. To solve the problem with the lack of indirect lighting, scattered light was used. And all surfaces were at least slightly lit.





Doom 3 engine (IdTech 4 engine)



3.7 - Global illumination



Global lighting is an attempt to calculate the reflection of light from one object to another. This process loads the processor much more than diffused light.





Unreal Engine Documentation



IV - Light Design in Video Games



The visual composition (the position of the light, its angles, colors, field of view, movement) has a great influence on how users perceive the gaming environment.



Designer Will Wright at GDC talked about the features of visual composition in a gaming environment. In particular, it directs the player’s attention to important elements - this happens by adjusting the saturation, brightness and color of objects at a level.

All this affects the gameplay.



The right atmosphere emotionally involves the player. Designers must take care of this while creating visual integrity.



Maggie Safe El-Nasr conducted several experiments - she invited users who are not familiar with FPS shooters to play in the Unreal Tournament. Due to poor lighting design, players spotted enemies too late and died quickly. They were upset and in most cases abandoned the game.



Light creates effects, but in video games it can be used differently than in theater, cinema and architecture. From a design point of view, seven categories can be identified that describe lighting patterns. And here we must not forget about emotions.





Level Art Design Elements by Jeremy Price



1 - Manual



Uncharted 4

In The 100 Things Every Designer Needs to Know About People book, Susan Wayshenk explores the significance of central and peripheral vision.



Since central vision is the first thing we see, critical elements must fall into it, which the player must necessarily see according to the designer's idea. Peripheral vision provides context and reinforces central vision.



Uncharted games are a good example of this - light enters the central field of view and directs the player. But if the elements falling into the peripheral vision contradict the central one, the connection between the designer and the player breaks down.







Until dawn

Lighting in it is used to direct the player. Creative director of the studio Will Byles said: “The most difficult thing for us was to create an atmosphere of fear without taking everything into the dark. Unfortunately, when the picture gets too dark, the game engine tries to make it brighter, and vice versa. We had to invent new techniques to deal with this problem. ”



As you can see in the illustration below, warm light stands out against a blue background, attracting the attention of the player.







2 - Lighting / Crop



Resident evil 2 remake



Light in RE2 Remake can change the frame. When you walk through the dark corridors of Raccoon City Police Station, the player’s main light is the flashlight. Such lighting is powerful mechanics. The changed perspective rivets the player’s gaze to the illuminated area and cuts off everything else due to the strong contrast.







Dark souls i



Crypt of the Giants (Tomb of the Giants) - one of the very dark locations of the game with a bunch of dangerous cliffs. It can be passed if you follow the luminous stones and move carefully so as not to fall. You should also beware of bright white eyes, because this is the enemy.



The radius of illumination from the player is greatly reduced, visibility in the dark is limited. Taking the flashlight in his left hand, the player increases both the illumination and his field of vision. At the same time, the flashlight greatly reduces the damage done, and you have to choose: a review or protection.







3 - Narration



Prey



Since the station where the action takes place is in orbit, the game has a special light cycle. It determines the direction of light and, accordingly, greatly affects the gameplay. In this game, it is more difficult to find objects and locations than usual. In distant sections, the player can solve problems by looking at them at one angle from the inside of the station and at another angle from the outside.







Alien isolation



In Alien, light is used to guide the player and create a sense of fear. The user is in constant tension - somewhere in the dark there is a xenomorph hiding.







4 - Disguise



Splinter Cell: Blacklist



The light in it not only directs the user, but is also used as a game mechanic.



In many locations, players use shadows in order not to stray from a safe course and not to collide with enemies. In Splinter Cell, the role of the “visibility meter” is played by the light on the character’s equipment - the stronger the player is hidden, the brighter the light is.







Mark of the ninja



In Mark of the Ninja, light and darkness are completely opposed to each other. Game lead designer Nels Andersen said, “The way the character looks, shows whether you are visible or not. If you are hidden, you are dressed in black, only some details are highlighted in red, in the light you are completely painted ”(article of Mark of the Ninja's five stealth design rules).







5 - Fight / Defense



Alan wake



The flashlight in Alan Wake is a weapon. Without it, it is impossible to eliminate the enemies. It is necessary to direct light on them and hold it for a certain time - so they become vulnerable, and they can be killed. When light falls on the enemy, a halo arises, then it decreases and the object begins to glow. At this point, the player can shoot the enemy.



Also, to eliminate opponents, you can use flares and stun grenades.







A plague tale: innocence



In a project from Asobo Studio, you can use rats against humans. For example, if you break the enemy’s lantern, he will instantly plunge into the darkness, which does not restrain the hordes of rats.







6 - Alert / Feedback



Deus Ex: Mankind Divided



At Deus Ex, surveillance cameras monitor what happens in their field of view, which is limited by a cone of light. The light is green when they are neutral. Having found the enemy, the camera changes the light to yellow, beeps and monitors the target for several seconds, or until the enemy escapes from its field of vision. After a few seconds, the light turns red and the camera emits an alarm. Thus, with the help of light, interaction with the player is realized.







Hollow knight



Team Cherry's metroidvania changes lighting more often than the player notices.



For example, every time you take damage, the picture freezes for a moment, and next to the hero there is the effect of broken glass. The general lighting is dimmed, but the light sources closest to the hero (lamps and fireflies) do not go out. This helps to emphasize the significance and strength of each strike received.







7 - Separation



Assassin's creed odyssey



The cycle of day and night changes is central to the Odyssey. There are fewer patrols at night, and the player is more likely to go unnoticed.



The time of day can be changed at any time - this is provided for in the game. At night, the vision of enemies is weakened, and many of them go to bed. It becomes easier to avoid and attack opponents.



The change of day and night here is a special system, and the rules of the game radically change depending on the time of day.







Don't starve



Don't Starve survival simulator does not spare newcomers at night - here walks in the dark are fatal. After five seconds, the player is attacked and he takes damage. A light source is needed for survival.



Mobs fall asleep as soon as night falls, and wake up with sunrise. Some creatures that sleep during the day may wake up. Plants do not grow. The meat does not dry. The cycle of changing the day and night sets the system, dividing the rules of the game into two categories.







V - Conclusion



Many lighting techniques that we see in art, cinema and architecture are used in game dev to complement the aesthetics of virtual space and improve the player’s experience. Nevertheless, games are very different from cinema or theater - the environment in them is dynamic and unpredictable. In addition to static lighting, dynamic light sources are used. They add interactivity and the right emotions.



Light is a whole range of tools. It gives artists and designers ample opportunity to engage the player even more strongly.



The development of technology has also influenced this. — , .



Bibliography



  1. Seif El-Nasr, M., Miron, K. and Zupko, J. (2005). Intelligent Lighting for a Better Gaming Experience. Proceedings of the Computer-Human Interaction 2005, Portland, Oregon.
  2. Seif El-Nasr, M. (2005). Intelligent Lighting for Game Environments. Journal of Game Development, 1(2),
  3. Birn, J. (Ed.) (2000). Digital Lighting & Rendering. New Riders, Indianapolis.
  4. Calahan, S. (1996). Storytelling through lighting: a computer graphics perspective. Siggraph Course Notes.
  5. Seif El-Nasr, M. and Rao, C. (2004). Visually Directing User's Attention in Interactive 3D Environments. Siggraph Poster Session.
  6. Reid, F. (1992). The Stage Lighting Handbook. A&C Black, London.
  7. Reid, F. (1995). Lighting the Stage. Focal Press, Boston.
  8. Petr Dyachikhin (2017), Modern Videogame Technology: Trends and Innovations, Bachelor's thesis, Savonia university of applied sciences
  9. Adorama learning center (2018), Basic Cinematography Lighting Techniques, from (https://www.adorama.com/alc/basic-cinematography-lighting-techniques)
  10. Seif El-Nasr, M., Niendenthal, S. Knez, I., Almeida, P. and Zupko, J. (2007), Dynamic Lighting for Tension in Games, the international journal of computer game research
  11. Yakup Mohd Rafee, Ph.D. (2015), Exploring Georges de la Tour's painting based on Chiaroscuro and tenebrism theory, University Malaysia Sarawak
  12. Sophie-Louise Millington (2016), In-Game Lighting: Does Lighting Influence Player Interaction and Emotion in an Environment?, University of Derby
  13. Prof. Stephen A. Nelson (2014), Properties of Light and Examination of Isotropic Substances, Tulane University
  14. Creative Commons Attribution-ShareAlike License (2019), The Dark Mod, from (https://en.wikipedia.org/wiki/The_Dark_Mod)



All Articles