What's New?We had to start with the light sources (and for a while, we were hopeful that this will suffice). Each and every light source is now defined with a realistic value gleaned from real-world measurements (we have done a ton of sampling with a
light meter over various daylight and weather settings) and reference tables. In reality as well as in the game world now, tens of thousands of
lux units now brighten day scenes, while at night the ambient brightness approaches just a few lux units. Basing all light source values on reality gives us way more confidence as opposed to the old days when a new light would just fit into the system. It's no longer a question of should it be a 150 or 170 with no actual meaning to the values. Now we know and have tables to pick for a street lamp or a neon light at a gas station. In light computation formulas, we can now go with proper quadratic drop
attenuation, to have lights behave in a physically-correct manner. With the higher precision, we can even go as far as introducing a small random variation in light intensity to otherwise identical light sources, to simulate a street's night feeling better, without having unnaturally-identical lamps.
When all the internal light computations are done, we have to adjust the resulting values for the screen by emulating camera
exposure. Much like a modern camera in your mobile phone, we need to take all the rich values and variety of incoming light - sun or shade, early morning, high noon, dusk, or deep night - and "squish" or "expand" the values into the range appropriate for the screen. Our exposure emulation system has a critical impact on the final look and feel of the game - it's partly physics, but also partly about a subjective artistic feeling too. It has to be adjusted dynamically not just based on incoming light from the game world, but it also has to take into account the difference between the light inside and outside of a vehicle's cabin, to allow dashboard instruments to be legible. The human eye is an incredible creation, able to adjust and adapt to a vast range of light intensities as focus switches between objects. We had to use a lot of smart math when analyzing the light
histogram for each frame and between frames to fit all these values into the screen's inevitably limited dynamic range and
color gamut, in order to make everything that's portrayed both believable and discernible. Some improvements were a cherry on top, like the fact that with the internal range of floating-point buffers of
cube maps, we can have much shinier reflections off of glossy surfaces, such as water bodies, glass, or car paint. We have followed this development path in a small team happily until the realization that while the intermedia results were promising, we won't be able to pull this off without re-balancing ALL the existing materials/textures on all game objects. When a ray of light is cast on the surface of any object, what is reflected or refracted depends not just on the properties of the incoming light, but largely on the properties of the object's surface. Over the many years of development, we have accumulated tens of thousands of textures, some from photographic sources at various settings, some painted by hand, some through the process of
procedural generation in various smart tools. As the years went by, the authoring of these sources has been subject to various schools of thought, or different creation pipelines, but the "old light" system was held together by the proverbial duct tape and was in any case imprecise enough to reveal certain imbalances that were present. The new exposure emulation system is way more sensitive and simply requires physically correct brightness
albedo values. Our concrete surface can no longer be
some sort of grey, and a tree cannot just be
nice and green. And that was when a vast majority of our art team had to be involved for a major overhaul.