[img]https://i.imgur.com/Bf9tWMX.gif[/img] Setting up the lighting for the scene plays a major role in constructing the proper atmosphere for the level. It determines how the shadows work, how the light bounces off various surfaces and a ton of other small details that make up the majority of the game’s look and feel. Today we would like to tell you what kind of tools are available to us in The Riftbreaker when it comes to lighting effects. We will also tell you what settings we can change and what it takes to make the most of our game. [img]https://i.imgur.com/EX5d06R.gif[/img] [b][i]There are many ways to set up the directional light, but some of them are slightly... off. The color picker works instantly and we can fix our mistakes on the fly.[/i][/b] We illuminate the game scene using one powerful light source - directional light. Since the action in The Riftbreaker takes place on the surface of the planet Galatea 37, the light usually tries to simulate the behavior of the Sun. ‘Simulate’ is the key word here, because the directional light is always on (with the exception of the night, obviously). The parameters of the light make all the difference here. We can create and save separate presets for the sunrise, the day, the sunset and the night. Blending them with each other over time gives us [url=https://steamcommunity.com/games/780310/announcements/detail/1619525098773690647]the day and night cycle, that we discussed earlier.[/url] [img]https://i.imgur.com/krR81m5.gif[/img] [b][i]Thanks to fog we can easily change the mood of the scene.[/i][/b] There are several parameters of the directional light that we can change. The most obvious one is the color. We can pick any color available in the RGB palette in order to change the mood of the scene. The light at dusk has to be different than at midday and this is the setting that makes it possible. We can also adjust the look of the scene by changing the parameters of the fog. Fog allows us to better simulate the effects of light dispersal and how it affects the objects on the scene. We can change the fog’s color, density and the distance at which it becomes visible. [img]https://i.imgur.com/P5zjJas.gif[/img] [b][i]We own the sun.[/i][/b] Over the course of the day, the source of directional light travels across the sky, changing its position as if Galatea 37 really revolved around a star. However, in real life, the sun appears to be in various parts of the sky, depending on your geographic position. If we set up just one orbit for all the maps to use, we would get the same results all the time. That is why we have introduced a set of sliders that change the simulated latitude and longitude of the map’s location. Instead of moving the planet around the star, we do it the other way around. In your face, Copernicus! [img]https://i.imgur.com/ZWtJpEZ.gif[/img] [b][i]See how much of a difference the skybox light makes.[/i][/b] Following the trend of trying to copy the way nature works, we also added a skybox that affects the ambient lighting on the scene. A single directional source of light would essentially leave everything on the unlit side in complete darkness, just like a spotlight in a dark room. The skybox simulates how the atmosphere disperses the light and adds some delicate lighting to the whole scene. The nature of that light will depend on the skybox texture itself and 2 parameters that we control - how much light is emitted, and how much is reflected by the props. [img]https://clan.cloudflare.steamstatic.com/images//34659267/9222c06c9fbd5a6451a4ed82c3ce71a6e4c7d581.png[/img] [b][i]Adding dynamic lights makes the night sceneries much more lively.[/i][/b] On top of our main light source, we can also add smaller, dynamic lights to the scene. They come in two flavors - point lights (they emit light in all directions like a lightbulb - our Base Lamp is an example of one) and spotlights, which are cone-shaped. They are highly customizable. We can change their color, intensity and add custom affectors (conditions that change their behavior, such as light fading in under a fire source, simulating the growth of flames). Spotlights can also add shadows, but it comes with a high performance cost, so we decided to use it only on Mr. Riggs’ spotlights. That’s the lighting in The Riftbreaker in a nutshell. Naturally, setting everything up just right requires a lot of trial and error, but when you do something you love it’s not that big of a deal. The end effect makes up for all the hours of work! We hope you enjoyed this article. Leave a comment on what you would like to read about in the future. You can do it either here or on our Discord - www.discord.gg/exorstudios Other social media: www.facebook.com/exorstudios www.twitter.com/exorstudios www.mixer.com/exor_studios www.twitch.tv/exorstudios www.youtube.com/exorstudios