Traditional Culture Encyclopedia - Weather forecast - Detailed explanation of the changes of lighting system in the version of "European Truck Simulation 2"1.40 and comparison of in-game effects.

Detailed explanation of the changes of lighting system in the version of "European Truck Simulation 2"1.40 and comparison of in-game effects.

At present, the European truck simulator 2 has released the version of 1.40, and the lighting system is one of the most important changes in the new version. Let's take a look at the detailed description of the changes in the lighting system in the European Truck Simulator 21.40 version.

Detailed explanation of lighting system changes in European truck simulation version 2 1.40

There must be light!

The 3D engine that we use to present the lighting and colors in different scenes and to render the buffer that will eventually be displayed on the screen was actually built more than 10 years ago. At that time, the most advanced technology was to present all RGB values in the range of 0-255 in order to accommodate one byte of information. All values are defined in this way, whether it is the texture elements of the material map (the "skin" of 3D objects, such as trees, vehicles and weather boxes, have different surface materials), or the coding of light intensity (from the taillights of vehicles, street lamps and even the intensity of sunlight), and all elements are combined into a single pixel in the rendering stage. The contents in the display buffer will be displayed on the screen, and each basic color has only 256 chromaticity changes.

In recent years, with the sharp increase of available memory of 3D accelerator, the improvement of hardware performance and the higher flexibility of coloring language used to program the operation of graphics card segments, it is now possible to store and process color and illumination values with higher precision and wider range when using floating-point numbers. Compared with the simple operation of superimposed color filters, that is, all the skills we only have in the 8-bit color era, the game engine can truly present the light source in a realistic numerical range and proportion, which is a qualitative leap. In the real world, the brightness of light bulb is many orders of magnitude different from that of sunlight. If we can correctly store the brightness values of different light sources, and more importantly, run the calculation program of illumination and object surface within an appropriate numerical range without losing too much accuracy, then we can realize real high dynamic range (HDR) lighting effects through the current graphics engine. About 18 months ago, we began to test this new technology and achieved initial results. At that time, we had no way out, because we knew that this was what we wanted to achieve for this engine.

Current lighting system

New lighting system

Current lighting system

New lighting system

Is there anything new?

We must start with the light source (at first, we hope this will be enough). Now, each light source is based on the measured values carefully collected from the real world (we use the exposure meter to collect a large number of sample data under various lighting and weather conditions) and the reference numerical table to define the real illumination value. Whether in the real world or in the present game world, tens of thousands of lux units light up the sky, while at night, the light intensity of the surrounding environment is only close to several lux units. With all the realistic light source values, we are more confident in the idea of giving up the old lighting effect, because now the new lighting can be well integrated into the whole system. It is no longer a problem to define whether the illumination value of a light source should be 150 or 170. Now we know and have a light intensity list to help us determine the corresponding light value of street lamps or neon lights at gas stations. In the light calculation formula, we can now make the light intensity decay with distance according to inverse square law, so that the light conforms to the real natural law. If the accuracy is higher, we can even add the effect of random slight change of light intensity, avoid completely consistent light sources, and make street lamps feel more natural at night, not just having the same street lamp brightness.

Current lighting system

New lighting system

Current lighting system

New lighting system

Current lighting system

New lighting system

After calculating all the internal illuminance, we must also simulate the camera exposure to achieve the final display result on the screen. This is very similar to the camera in a mobile phone. We need to collect all the numerical values of incident light and its rich changing states-sunshine or shadow, early morning, noon, dusk or late night-and then "squeeze" or "expand" the corresponding light intensity within a proper numerical range to get the results of each pixel displayed on the screen. Our exposure simulation system has a great influence on the final picture effect and feel of the game-it not only conforms to the physical laws to a certain extent, but also partially adds the subjective visual experience effect. This system must also realize dynamic adjustment, not only based on the incident light in the game world, but also taking into account the different factors of indoor and outdoor lighting intensity of the vehicle driver to ensure that the dashboard is still clearly visible. The human eye is very wonderful, it can adjust and adapt to a wide range of brightness changes when switching the focus object. In this respect, we must use a lot of fine operations to analyze the brightness histogram of each frame and between frames, so as to match the related values of the dynamic range and color gamut which are inevitably limited in the display screen, so that all the contents can be presented reliably and clearly. Some of these improvements are actually icing on the cake. For example, mapping the internal range of floating-point buffer with cube can make smooth surfaces such as water, glass and car paint have more dazzling reflective effects. The small team in charge of this part is progressing very smoothly in this development direction, and the overall effect begins to appear, until we realize that this new lighting system cannot be launched without rebalancing all existing materials/textures of all objects in the game. When a beam of light shines on the surface of any object, how it is reflected or refracted depends not only on the incident light, but also on the surface of the corresponding object to a great extent. In the years of development, we have accumulated tens of thousands of materials, some of which are photos with different settings; Some are handmade; Others are generated by programs through various intelligent tools. With the passage of time, these material assets are influenced by many ideas or different production processes. The "old lighting" system can basically be said to be made of super tape, but it is not enough to expose the specific lighting imbalance problem in any case. However, the new exposure simulation system is more sensitive and needs true and correct brightness albedo values. Our concrete surface can no longer be just a mass of gray, and trees can no longer just look good and green. By this time, most members of our design team must devote themselves to this important "overhaul" work.

Current lighting system

New lighting system

Current lighting system

New lighting system

Current lighting system

New lighting system

Current lighting system

New lighting system

What must be changed?

Once our earliest interdisciplinary team modified the core CPU code and GPU shader, and it took several months to experiment, so we had to invest more manpower. First of all, we must readjust all the light sources and headlights in the game world to adapt to the new lighting logic. In some cases, we only made minor adjustments to some figures on the list; Sometimes, this may require the map designer to re-examine the corresponding area and adjust it manually; But more often, this means that the objects in the game (such as the whole factory or freight yard with predefined light sources) must be re-expanded, adjusted and re-exported in 3D tools such as Maya. We have made thousands of such adjustments. Sometimes we don't just use dozens of "numbers" to define lighting, but make large-scale modifications to the lighting map of an object, which is caused by the false shadows and messy parts of lighting effects used in the old lighting system. Most people in our team will stop any development work related to new projects in the future, return to the existing objects, vegetation, vehicles and effects of the game, rebalance different contents and repeat them many times, and everything should be synchronized with the albedo table approved by * * *. We should also review the basic principles of many subsystems, of which it is very noteworthy that we have iterated and improved the headlights and bulbs many times to ensure that they have good effects under different sunshine conditions. We have a new set of weather boxes with higher resolution, and we think we can add more good content in future version updates. In the end, there was no stone left, and we evaluated and adjusted every element in the game.

Current lighting system

New lighting system

Current lighting system

New lighting system

What does all this mean?

The new lighting system and the beginning of our new physical lighting model are the key steps to realize a complete and better physical model in the whole map world of our game. Although we haven't achieved real physics-based rendering, the update of 1.40 is an important milestone on our development path. Cleaning up the old design assets, as well as all the lighting intensity and calculation programs set based on basic physical principles, will finally make it possible to do systematic work in this field in the future. Many contents are still in the long-term development stage, and this step is only a small step forward, and it is only a milestone for us to move towards a bigger vision.

New lighting system

New lighting system

From the perspective of graphic designers (but this is also related to the author of MOD), we are introducing a new concept, that is, to make all design assets in the game "controllable" and keep balance with other assets. Photo-based materials are often used as design assets in games, and must be carefully handled before application, otherwise they may become too dark or too bright, thus affecting the exposure and visual experience of the whole scene. Usually, it is worth exploring another method of making materials, such as implementing high-resolution programs to generate textures in SubstanceDesigner. Now, the rendering system of the game engine has higher credibility. Compared with the false and imperceptible shadows and lighting effects on the model, in addition to the new lighting system and SSAO, our shader code now plays a more important role in generating the final picture. In this way, designers are no longer required to have a high sense of responsibility and maneuverability, and some workload may be reduced. This may or may not be a good thing, and ultimately it depends on the results to be achieved in each specific situation.

New lighting system

New lighting system

Every major change will bring many new problems and return from many "dead corners". So far, our investment in this area has exceeded the expectation of a year ago. We still have a slightly longer public test before us, and we need to continue to deal with some final questions. But even now, we can be very confident that these changes are completely worthwhile. When you drive along the Italian coast in the early morning, or on a sunny evening in Sweden, or at a hot noon in Spain, you will experience the wonders of the new lighting system at night. There is no doubt that we have taken a big step forward in this regard and there is still a long way to go. During the whole modification process, try to avoid increasing the load of CPU and GPU. Except for some new special effects that require a little higher performance, on the whole, we think these changes have reached a very good balance, or a reasonable trade-off, so as to ensure the acceptable performance of the game. We certainly don't want to lose players and fans who don't have the latest hardware because the graphics effect is improved too much. We look forward to bringing you more improvements and new functions. Please hold your steering wheel tightly!

Maybe you are still a fan of "Update Content"? Come and have a look:

Major internal changes

The game scene is illuminated by the light intensity of the real world (for example, there are tens of thousands of lux during the day and only a few tens of lux at night).

Light ratio effect-the sunrise light is stronger than street lamps and truck headlights. This means that we must adjust all the light sources in the game and readjust each luminescent material.

We added a new display mapping function to get better control effects (exposure, contrast, dark parts, highlights).

We need to make these real light intensities appear on the computer screen with an effect similar to camera exposure.

Improved more accurate exposure selection histogram.

This is because the actual exposure of each scene selection is different, and it will also change due to different light levels and current weather conditions.

Replace the light source (street lamp, car lamp)

We realize that according to the law of reality, the brightness of a light source decreases with distance ("inverse square law").

We are in the conversion stage based on the actual unit configuration value, which reduces the speculative definition value.

At the same time, there are many subtle visual adjustments.

Re-illumination reflection

The reflection of smooth surfaces such as shop windows matches the time and weather conditions.

Improve the reflection effect

Reflected in truck paint, shop windows and general glass surfaces.

Sun horizon shadow

Visible at sunrise and sunset

In addition, there are many other minor adjustments, repairs and changes.