F1 2015: a new level of realism on PC
- Transfer
F1 2015 is the latest game from the Formula One series. It was released by Codemasters and is based on a special version of their EGO game engine. The game was created almost completely from scratch, the new engine significantly improved both the quality of the picture and the capabilities of artificial intelligence.
EGO is the first Codemasters development to target the eighth generation of game consoles (PS4 and Xbox One) and the PC platform. The architecture of the new engine was designed to work with multi-core processors, which are used in the aforementioned consoles. In addition, the company sought to create a scalable platform that would allow the efficient use of the resources of modern computers.

In November 2015, a fix package was released that added an updated sound subsystem to EGO and better support for the particle system, in the processing of which the microprocessor is involved. As a result, the game was able to use the capabilities of the best gaming computers at full capacity.
In this article, we will talk about how Codemasters improved their game engine and what they managed to achieve.

F1 2015
Modern microprocessors for computers are, to a first approximation, a wide range of clock frequencies and a different number of cores. One of the components of the success of the game is the ability to adapt to various hardware characteristics of the systems.
Games developed in the days when processors with one or two cores were usually used in computers were designed with the expectation that a limited number of threads would be available to them. The same was true for games for early generations of game consoles.
The main threads were allocated for rendering and calculations related to game logic. To solve smaller problems, the remaining system resources were used. On PC, with this design approach, processors with very high single-threaded performance were preferred.
Nowadays, everything has changed. So, the eighth generation consoles, and PS4, and Xbox One, now equipped with processors with eight cores. Each of them is a highly efficient computing unit with relatively low performance. The game uses six to seven of these cores. What remains is intended for the operating system.
With modern computers - the same story. They install processors with the number of cores from two to eight. At the same time, if the kernel, using technology like Intel Hyper-Threading (Intel HT), supports the technology of simultaneous multithreading, it looks like two logical processors for the OS.
2016 RedBull car
This means that a PC game can use up to 16 logical processors, some of which also go to the operating system. Therefore, the old approach is not applicable to new hardware, and if the code for consoles can be optimized for a specific configuration, then games for computers need to be able to adapt to existing resources.
When the release date of the game was nearing July 10, 2015, it became clear that the new engine effectively uses multi-core processors, and that its performance indicators are significantly different from the earlier versions of F1, which were designed for the previous generation of consoles. Here is a comparison of the CPU and GPU workloads for F1 2014 (left) and F1 2015 (right), which are launched with maximum quality settings and an unlimited frame rate.

Analysis of F1 2014 (left) and F1 2015 (right) in GPUView
Images were taken using Microsoft GPUView (this tool is included in the Windows Performance Toolkit as part of the Windows Platform SDK ). It shows how well the work is distributed between the processor and the video core. GPUView, in addition, can be used to find problems with synchronization and insufficient loading of the video card. This can be seen in the upper part of the image, below it is shown in enlarged view.

GPU load in F1 2014 and F1 2015.
Breaks in the violet line in the upper left part of the image indicate interruptions in the GPU in F1 2014. This means that the video card is idle and does nothing useful. At the same time, the performance of F1 2014, on the investigated high-performance systems, does not rest on the GPU capabilities. At 1080p, the game was limited only by processor performance.

2016 Ferrari car The
corresponding line on the right (blue) does not contain gaps. This means that in F1 2015, the GPU is always loaded. In the figure, which shows the full picture of the system load, the lines below the yellow separator indicate the load of the processor threads. In F1 2014 (left), one thread is almost constantly loaded, it limits performance. Take a closer look at this part of the image.

Load balancing on streams The
different colors used to paint the stripes represent the logical processors of the system. A color change of a stream means that it is periodically executed on different logical processors within the same frame.
Another stream loaded with calculations can be seen in the lower part of the left image related to F1 2014. This stream is engaged in processing commands of the graphics driver. At the same time, in the image on the right (for F1 2015), all flows have some downtime, that is, there is no noticeable relationship between the flows.
If we combine the analysis of the CPU and the GPU, we can see that F1 2014 was limited in a critical way through an engine that prepares data for the graphical API, loading one thread. Thus, F1 2014 is a classic example of the use of an engine designed to work on game consoles of previous generations, when the load is optimized for good performance on fast dual-core processors, with some improvements when switching to quad-core ones. But adding more cores does not give tangible benefits, since the limiting factor is the only main rendering stream.
The new engine, on the other hand, significantly reduces the excessive load on the processor associated with the preparation of data for the video card, taking full advantage of Intel HT technology and evenly distributing the load between logical processors.

Analysis of F1 2015 in GPUView at 60 FPS
The company's programmers quickly found that computers are much faster than the consoles for which they performed most of the optimizations. Achieving the usual frame processing speed of 60 FPS (16 ms is spent on calculations) on the consoles took a lot of effort. And when tested on the 4th generation of Intel Core processors (for example, Intel Core i5-4670), it turned out that the processor did all the necessary work in less time than it takes to create a frame. In many cases, faster than 10 ms.
The above figure shows the analysis of the game in the GPUView with a limitation of the screen refresh rate set to 60 Hz. Faster processors, such as the 6th generation Intel Core i7-6900K, make the imbalance even more noticeable.
Here's what the game’s analysis looks like when the frame rate is unlocked on a system with a 5th generation Intel Core i7-5960x processor and an NVIDIA GTX980 graphics card.

A game with an unlocked frame rate running on an Intel Core i7-5960x with 8 cores (16 threads) in a GPUView
Compared to a quad-core processor (the very first picture that matches F1 2014 and 2015), in a system based on Intel Core i7- 5960x with 16 logical processors, the CPU is idle for a considerable part of the time necessary to prepare the frame.
All this means that the new engine benefits not only from increased single-threaded performance, but, most importantly, it can benefit from additional processor cores.
The result shows that the Intel Core i7-5960x with six involved cores can bypass the quad-core i7-6700k, whose clock frequency is higher.
These initial tests, which showed that the GPU was already fully loaded, changed the optimization priorities on the PC. Improvements regarding the video card continued, but instead of spending developers' resources on optimizing the rendering subsystem on the CPU (such as transferring part of the work to the video core), the studio began to explore other ways to optimize the use of the processor to improve the user experience of the game and increase its realism.
The developers had a difficult and interesting task. It was to improve the realism of the game, to make it more attractive, without affecting the game process (due to the requirements for network multi-user mode) and without adding much more work from the GPU. In this regard, changes in artificial intelligence and improving the accuracy of gaming physics were immediately abandoned, since such improvements should be achievable on the hardware of any PC that meets the minimum requirements of the game. This is necessary in order not to put players in an unequal position using different computers in multi-user mode.

Mercedes-Benz F1 W07 Hybrid presented in 2016
Even in single-user mode, any changes in the behavior of cars can be difficult, since they require very careful re-balancing of the machine control system. Instead, Codemasters focused on two areas of increased realism. In particular, these are improvements in the field of sounding the game using the updated sound subsystem and an increase in the number of dynamic visual design elements thanks to the updated particle system. These subsystems were chosen due to the fact that they are already based on the CPU and were previously limited by the capabilities of the consoles. The PC architecture gave developers the opportunity to improve the dive effect using techniques that had to be abandoned initially due to hardware limitations.
Improving game sound was the first direction of optimization. This approach, on the one hand, can be scaled depending on the available hardware, on the other hand, it allows you to improve your gaming experience without affecting the gameplay.
Sound support in F1 2015 is implemented using the intermediate subsystem, which creates its own stream for mixing sound using the processor.
Earlier, Codemasters found that if a given thread is overloaded or its execution is delayed, this will result in noticeable interruptions in the sound. To prevent disruptions to the consoles, a separate core was allocated to the “sound” stream. This allowed us to guarantee uninterrupted sound processing.
On the computer for the sound subsystem, its own logical processor is allocated. Other game tasks use the remaining resources. On consoles, binding to the processor core is used for such threads, and on computers, the SetThreadIdealProcessor () command is used, which helps the operating system in setting priorities.
Even if a separate core or logical processor is allocated to a stream, it is important to mix at a sufficient speed. As a result, the maximum number of sound sources was limited by the amount that can be processed in the worst case scenario, for example, in an accident. Initially, the restriction on sound sources was established as follows: 5 cars, plus a player’s car.
If there is a significantly more powerful processor, with a potentially large number of processor cores, for processing mixing tasks, the operating system is unlikely to try to schedule some additional tasks to be performed on the logical processor assigned to the audio processing stream. Accordingly, it was possible to add support for high-quality sound to the PC version of the game. Namely, we are talking about the following improvements.
Another improvement to the game was an updated particle system. The previous version of this system was limited by the available resources of the CPU and GPU of the game consoles. The visual component was built on the basis of these limitations. The particle system was already based on the CPU. Here's what Andrew Wright, a graphics programmer at Codemasters, talks about.
“We assumed (and, it must be said correctly) that we will be more limited by the resources of the GPU than the CPU, therefore, we have always approached the development of a particle system in terms of its efficient parallel processing on the CPU.”
This means that the team of programmers began work with improving the system, which can be scaled depending on the amount of available processor resources. Moreover, they could do this so that improvements, at the same time, would not necessarily lead to an increase in the load on the video core. The fact that the processor system is entrusted with the particle system has other advantages that Andrew described:
“The CPU-based system is highly flexible. It handles collisions with the track for individual types of particles that are specifically designed for this — mostly something like gravel and grass. This also works for particles that are not visible, that is, a quick movement of the camera will show previously invisible particles in a certain intermediate phase of motion. Collisions can cause sound effects. This part of the work is very difficult to implement on the GPU. ”
The first part of the task was to increase the number of created particles with small and almost imperceptible changes in their graphic design. In particular, the particle size was reduced, and their density per unit space increased. These changes give the same visible effect at some distance, but near the picture becomes much more detailed. This was done for various effects created by the interaction of car tires with the road (both on the paved road and beyond). Here is how it looks.

Improved effect on gravel off-road
Similarly, the effect of smoking tires was improved. Here, particles of relatively large sizes were replaced by much smaller ones, which made it possible to better convey the shape of a cloud of smoke. This made it possible to improve the volumetric lighting used for smoke, since smaller particles provide a better mathematical representation of how light passes through a smoky space. Here is how it looks.

Improved performance of smoking tires
Although the improvements to the particle system described above are significant, they are visible only for short periods, for example, when a player or artificial intelligence loses control of the car and it flies off the track.
The developers quickly realized that the updated particle system could be used to significantly improve the simulation of weather conditions, namely, rain. The weather does not depend on the player’s ability to keep track, therefore, improved visual effects can be observed not only at special moments of the game.
One of the main improvements to the game, which Codemasters places particular emphasis on in advertising materials, is the improvement in driving. In particular, the behavior of cars on wet roads has been significantly improved. Riding in the rain is an important part of real Formula 1 racing. Many tracks are known for extreme weather conditions that affect the race. The table shows the probability of precipitation during the race in the Champion and Pro game modes. On average, during 34% of game races it rains, at least less than a certain part of the race lasts up to four hours.
Chance of precipitation
The transition to smaller particles, denser located in space, means that the behavior of water droplets can be modeled with much higher accuracy. The particle system processes non-linear changes in the characteristics of particles during their existence for such properties as color, transparency, violation of surface smoothness, angular resistance, linear resistance, and gravity. All this, in addition, is consistent with the wind modeling system, which is used to simulate rain.
Car MP4-31 McLaren 2016
In the figures below you can see the debugging images showing the behavior of small splashes of water from the wheels of the car and their interaction with the air that passes through the skin. The resulting effect is to create spiral-like swirls emanating from the rear of the machine.

Swirls debug image showing water spray movement

Debug image of turbulence, rear view
The use of smaller particles also means that the existing lighting model works much better with water drops. Light from light sources, for example, from certain parts of automobiles, can be modeled much more accurately on small particles than on large particles representing large volumes of droplets. The image below shows the illumination of water spray marks.

Improving lighting
Another area where improvements have been made is the interaction of the car with water on the surface of the road. This and the water vortices behind the car, which capture water from the ground, and spray from the wheels on the road, flooded with rain. All this allows you to improve the visual connection of the car with the road, to achieve the same effect that is achieved thanks to the shadows on a sunny day.
Here's what wet riding looks like before and after improvements.

Interaction with water on the road.
And here are the drops of water that form the track behind the passing car in the game (left) and when debugging in Intel INDE Graphics Performance Analyzer for DirectX .

Water droplet
The latest improvement was an improved rain simulation. Initially, the game used a simple algorithm using the resources of a video card, which displayed several thousand particles of rain in each frame, applying gravity to each drop, which caused them to fall. In the new rain simulation, most of the updated subsystem has moved to the processor, which allowed to establish its interaction with data on air flows used in other parts of the game. The number of raindrops was increased tenfold, and individual drops were reduced so that the pixel coverage was approximately the same. The figure below shows the debug images of rain taken from the same position. In the lower image - 217 thousand drops, in the upper representing the previous version of the game, only 21 thousand. Despite the increased number of primitives,

Debugging rain simulations
By increasing the number of raindrops and water dust, the developers set up the transparency used in the particle system so that the resulting fogging effect visible at a distance is the same as before. This is necessary so that the graphic settings do not change the gameplay.
Usually the limiting factor in PC performance for F1 2015 was the video card. The load was especially high on low-cost devices. The most important part of developing and implementing new effects was to ensure that additional particles do not increase the load on the GPU. A second important factor regarding computing resources was the achievement of a good distribution of the computations performed on the processor. The correct load balancing was needed between the available CPU resources, while it was impossible to allow the load growth in the sequence of engine operations responsible for rendering.
GPU load control is achieved through two approaches.
The first is that vertex processing has been moved from the vertex shader to the CPU. This reduced the amount of work performed on the vertices on the video card. This approach did not completely remove the load from the video core, but it was halved. Thus, processing ten times as many particles meant a fivefold increase in the cost of operations with vertices.
The second significant change was to reduce the cost of filling the frame, for example, when rendering rain. The number of drops increased tenfold, but the number of pixels that it affected increased only 1.65 times. In the case of swirls of water dust that remain behind the machine, the changes were even more significant. So, an increase in the number of vertices from 3 thousand to 70, in fact, led to a decrease in the number of processed pixels from 5,800 thousand to 2,500 thousand, that is, the pixel fill rate required to implement this effect was halved. As a result, the effect, to create which uses 20 times more particles, did not require a serious increase in the load on the video card when displaying the image.
The load balancing on the CPU was performed due to the distribution of particle-related computations between as many available logical processors as possible. The figure below shows the load distribution on systems with four and six cores (both in the first and second cases with Intel HT technology enabled). The purple and red blocks show particle processing systems and weather simulations during very heavy rain on a six-core processor (12 logical processors). On such a processor, 6 out of 12 processors are involved in calculations for a particle system. Five out of eight are involved in the quad-core, respectively, but their resources have to be shared with other tasks in the engine.

CPU load balancing for the 6-core system (left) and 4-core (right)
The game engine used in F1 2015 uses a task-based system for load balancing. In this case, there are presets for 2, 4, 8, 12 and 16 logical processors. The system tries to plan tasks so as to reduce any dependencies and not overload one of the processors.
The figure below shows a comparison of the original (left) and significantly improved (right) particle system. Pay attention to the fact that in the second case, water dust is more clearly attached to the car that raises it into the air.

Water vortices that cause cars
Improvements in spray handling that cars lift off the road and lose their grip are shown in the image below. At the same time, individual drops are noticeable against the background of the F1 2015 logo at high quality settings. In addition, you can see improvements in the interaction of tires with the track.

Skidding
F1 2015 has a built-in performance test that uses the current graphics settings and can be configured to run in various weather conditions. The figure shows the data obtained when performing the built-in test in a system with Intel Core i7-5960x, with a frequency fixed at 3.0 GHz (this is its base frequency), and an NVIDIA TitanX video card. There you can see a list of used settings. The data shown here is the average number of frames per second obtained after the test was completed.

Performance scaling on multi-core systems The
number of physical processor cores was configured through the BIOS. The remaining parameters of the system remained unchanged. Tests were conducted with and without Intel HT technology.

Test settings
On a system in which only 2 cores were turned on, with Intel HT technology turned off, the game did not start, since such a configuration does not meet the minimum system requirements. In general, ceteris paribus, the inclusion of Intel HT increased performance approximately the same as when connecting two additional cores. A comparison of performance in a configuration with two cores and Intel HT enabled, and in a configuration with Intel HT and four cores, resulted in an increase in frame rate of 79%. The transition to a 6-core configuration added another 17%. Using the 8-core configuration with Intel HT enabled resulted in a 27% increase in performance compared to the 4-core configuration and Intel HT. Here it must be taken into account that the results obtained cannot be regarded as some absolute values. We can only say
Considering that the same system was used in all tests, the performance gain is an expression of how well the load created by the game is decomposed into available threads, and how well the system configures tasks depending on the number of available logical processors.
In all tests, the game had access to a large cache of 20 MB in size, even in scenarios with a reduced number of working cores. The obtained performance values cannot be automatically distributed to systems with 4-core processors of the same architecture. It's all about a different clock speed and a different cache size. In fact, the large size of the Intel Core i7-5960x cache allows the game to show better performance on it than on a processor with 4 cores, with a similar clock speed, but with a smaller cache size.
F1 2015 is an advanced gaming project that demonstrates how to use the capabilities of modern processors to improve sound and graphic design. Redistributing the load between the CPU and GPU can make the game more attractive without the need for a more powerful video card. Thanks to the presence of a particle system, the calculations for which are carried out on the processor, Codemasters were able to improve the image quality of F1 2015. At the same time, the control of cars was improved, especially in bad weather. A simulation of visual effects using game physics was established.
By allowing the game engine to fully utilize the capabilities of Intel HT technology and all available processor cores, Codemasters were able to achieve a significant increase in the performance of gaming subsystems. This made it possible to achieve fast game operation even with the use of complex graphic design.
EGO is the first Codemasters development to target the eighth generation of game consoles (PS4 and Xbox One) and the PC platform. The architecture of the new engine was designed to work with multi-core processors, which are used in the aforementioned consoles. In addition, the company sought to create a scalable platform that would allow the efficient use of the resources of modern computers.

In November 2015, a fix package was released that added an updated sound subsystem to EGO and better support for the particle system, in the processing of which the microprocessor is involved. As a result, the game was able to use the capabilities of the best gaming computers at full capacity.
In this article, we will talk about how Codemasters improved their game engine and what they managed to achieve.

F1 2015
Adapting to PC hardware
Modern microprocessors for computers are, to a first approximation, a wide range of clock frequencies and a different number of cores. One of the components of the success of the game is the ability to adapt to various hardware characteristics of the systems.
Games developed in the days when processors with one or two cores were usually used in computers were designed with the expectation that a limited number of threads would be available to them. The same was true for games for early generations of game consoles.
The main threads were allocated for rendering and calculations related to game logic. To solve smaller problems, the remaining system resources were used. On PC, with this design approach, processors with very high single-threaded performance were preferred.
Nowadays, everything has changed. So, the eighth generation consoles, and PS4, and Xbox One, now equipped with processors with eight cores. Each of them is a highly efficient computing unit with relatively low performance. The game uses six to seven of these cores. What remains is intended for the operating system.
With modern computers - the same story. They install processors with the number of cores from two to eight. At the same time, if the kernel, using technology like Intel Hyper-Threading (Intel HT), supports the technology of simultaneous multithreading, it looks like two logical processors for the OS.

This means that a PC game can use up to 16 logical processors, some of which also go to the operating system. Therefore, the old approach is not applicable to new hardware, and if the code for consoles can be optimized for a specific configuration, then games for computers need to be able to adapt to existing resources.
First PC tests
When the release date of the game was nearing July 10, 2015, it became clear that the new engine effectively uses multi-core processors, and that its performance indicators are significantly different from the earlier versions of F1, which were designed for the previous generation of consoles. Here is a comparison of the CPU and GPU workloads for F1 2014 (left) and F1 2015 (right), which are launched with maximum quality settings and an unlimited frame rate.

Analysis of F1 2014 (left) and F1 2015 (right) in GPUView
Images were taken using Microsoft GPUView (this tool is included in the Windows Performance Toolkit as part of the Windows Platform SDK ). It shows how well the work is distributed between the processor and the video core. GPUView, in addition, can be used to find problems with synchronization and insufficient loading of the video card. This can be seen in the upper part of the image, below it is shown in enlarged view.

GPU load in F1 2014 and F1 2015.
Breaks in the violet line in the upper left part of the image indicate interruptions in the GPU in F1 2014. This means that the video card is idle and does nothing useful. At the same time, the performance of F1 2014, on the investigated high-performance systems, does not rest on the GPU capabilities. At 1080p, the game was limited only by processor performance.

2016 Ferrari car The
corresponding line on the right (blue) does not contain gaps. This means that in F1 2015, the GPU is always loaded. In the figure, which shows the full picture of the system load, the lines below the yellow separator indicate the load of the processor threads. In F1 2014 (left), one thread is almost constantly loaded, it limits performance. Take a closer look at this part of the image.

Load balancing on streams The
different colors used to paint the stripes represent the logical processors of the system. A color change of a stream means that it is periodically executed on different logical processors within the same frame.
Another stream loaded with calculations can be seen in the lower part of the left image related to F1 2014. This stream is engaged in processing commands of the graphics driver. At the same time, in the image on the right (for F1 2015), all flows have some downtime, that is, there is no noticeable relationship between the flows.
If we combine the analysis of the CPU and the GPU, we can see that F1 2014 was limited in a critical way through an engine that prepares data for the graphical API, loading one thread. Thus, F1 2014 is a classic example of the use of an engine designed to work on game consoles of previous generations, when the load is optimized for good performance on fast dual-core processors, with some improvements when switching to quad-core ones. But adding more cores does not give tangible benefits, since the limiting factor is the only main rendering stream.
The new engine, on the other hand, significantly reduces the excessive load on the processor associated with the preparation of data for the video card, taking full advantage of Intel HT technology and evenly distributing the load between logical processors.

Analysis of F1 2015 in GPUView at 60 FPS
The company's programmers quickly found that computers are much faster than the consoles for which they performed most of the optimizations. Achieving the usual frame processing speed of 60 FPS (16 ms is spent on calculations) on the consoles took a lot of effort. And when tested on the 4th generation of Intel Core processors (for example, Intel Core i5-4670), it turned out that the processor did all the necessary work in less time than it takes to create a frame. In many cases, faster than 10 ms.
The above figure shows the analysis of the game in the GPUView with a limitation of the screen refresh rate set to 60 Hz. Faster processors, such as the 6th generation Intel Core i7-6900K, make the imbalance even more noticeable.
Here's what the game’s analysis looks like when the frame rate is unlocked on a system with a 5th generation Intel Core i7-5960x processor and an NVIDIA GTX980 graphics card.

A game with an unlocked frame rate running on an Intel Core i7-5960x with 8 cores (16 threads) in a GPUView
Compared to a quad-core processor (the very first picture that matches F1 2014 and 2015), in a system based on Intel Core i7- 5960x with 16 logical processors, the CPU is idle for a considerable part of the time necessary to prepare the frame.
All this means that the new engine benefits not only from increased single-threaded performance, but, most importantly, it can benefit from additional processor cores.
The result shows that the Intel Core i7-5960x with six involved cores can bypass the quad-core i7-6700k, whose clock frequency is higher.
These initial tests, which showed that the GPU was already fully loaded, changed the optimization priorities on the PC. Improvements regarding the video card continued, but instead of spending developers' resources on optimizing the rendering subsystem on the CPU (such as transferring part of the work to the video core), the studio began to explore other ways to optimize the use of the processor to improve the user experience of the game and increase its realism.
Realism Improvement
The developers had a difficult and interesting task. It was to improve the realism of the game, to make it more attractive, without affecting the game process (due to the requirements for network multi-user mode) and without adding much more work from the GPU. In this regard, changes in artificial intelligence and improving the accuracy of gaming physics were immediately abandoned, since such improvements should be achievable on the hardware of any PC that meets the minimum requirements of the game. This is necessary in order not to put players in an unequal position using different computers in multi-user mode.

Mercedes-Benz F1 W07 Hybrid presented in 2016
Even in single-user mode, any changes in the behavior of cars can be difficult, since they require very careful re-balancing of the machine control system. Instead, Codemasters focused on two areas of increased realism. In particular, these are improvements in the field of sounding the game using the updated sound subsystem and an increase in the number of dynamic visual design elements thanks to the updated particle system. These subsystems were chosen due to the fact that they are already based on the CPU and were previously limited by the capabilities of the consoles. The PC architecture gave developers the opportunity to improve the dive effect using techniques that had to be abandoned initially due to hardware limitations.
Scoring the game
Improving game sound was the first direction of optimization. This approach, on the one hand, can be scaled depending on the available hardware, on the other hand, it allows you to improve your gaming experience without affecting the gameplay.
Sound support in F1 2015 is implemented using the intermediate subsystem, which creates its own stream for mixing sound using the processor.
Earlier, Codemasters found that if a given thread is overloaded or its execution is delayed, this will result in noticeable interruptions in the sound. To prevent disruptions to the consoles, a separate core was allocated to the “sound” stream. This allowed us to guarantee uninterrupted sound processing.
On the computer for the sound subsystem, its own logical processor is allocated. Other game tasks use the remaining resources. On consoles, binding to the processor core is used for such threads, and on computers, the SetThreadIdealProcessor () command is used, which helps the operating system in setting priorities.
Even if a separate core or logical processor is allocated to a stream, it is important to mix at a sufficient speed. As a result, the maximum number of sound sources was limited by the amount that can be processed in the worst case scenario, for example, in an accident. Initially, the restriction on sound sources was established as follows: 5 cars, plus a player’s car.
If there is a significantly more powerful processor, with a potentially large number of processor cores, for processing mixing tasks, the operating system is unlikely to try to schedule some additional tasks to be performed on the logical processor assigned to the audio processing stream. Accordingly, it was possible to add support for high-quality sound to the PC version of the game. Namely, we are talking about the following improvements.
- An increase in the number of cars contributing to the sound picture folding around the player. Namely, from 6 (5 cars controlled by artificial intelligence and one player’s machine) to 11 (10 opponents and one player, respectively).
- Removing some restrictions on the number of objects, as a result, more sound sources are reproduced during the transition from one object to another, which avoids sudden “breaks” in sound.
- Replacing some reverb effects from the used audio processing subsystem with more advanced ones. Using more complex algorithms, processing more reflections of sounds. Using pre-created pulse files for reliable simulation of various environmental conditions. For example, this is driving around the stands, moving along bridges, tunnels. In addition, barriers around the track and passing cars contribute to the sound picture.
Particle System and Weather Simulation
Another improvement to the game was an updated particle system. The previous version of this system was limited by the available resources of the CPU and GPU of the game consoles. The visual component was built on the basis of these limitations. The particle system was already based on the CPU. Here's what Andrew Wright, a graphics programmer at Codemasters, talks about.
“We assumed (and, it must be said correctly) that we will be more limited by the resources of the GPU than the CPU, therefore, we have always approached the development of a particle system in terms of its efficient parallel processing on the CPU.”
This means that the team of programmers began work with improving the system, which can be scaled depending on the amount of available processor resources. Moreover, they could do this so that improvements, at the same time, would not necessarily lead to an increase in the load on the video core. The fact that the processor system is entrusted with the particle system has other advantages that Andrew described:
“The CPU-based system is highly flexible. It handles collisions with the track for individual types of particles that are specifically designed for this — mostly something like gravel and grass. This also works for particles that are not visible, that is, a quick movement of the camera will show previously invisible particles in a certain intermediate phase of motion. Collisions can cause sound effects. This part of the work is very difficult to implement on the GPU. ”
The first part of the task was to increase the number of created particles with small and almost imperceptible changes in their graphic design. In particular, the particle size was reduced, and their density per unit space increased. These changes give the same visible effect at some distance, but near the picture becomes much more detailed. This was done for various effects created by the interaction of car tires with the road (both on the paved road and beyond). Here is how it looks.

Improved effect on gravel off-road
Similarly, the effect of smoking tires was improved. Here, particles of relatively large sizes were replaced by much smaller ones, which made it possible to better convey the shape of a cloud of smoke. This made it possible to improve the volumetric lighting used for smoke, since smaller particles provide a better mathematical representation of how light passes through a smoky space. Here is how it looks.

Improved performance of smoking tires
Although the improvements to the particle system described above are significant, they are visible only for short periods, for example, when a player or artificial intelligence loses control of the car and it flies off the track.
The developers quickly realized that the updated particle system could be used to significantly improve the simulation of weather conditions, namely, rain. The weather does not depend on the player’s ability to keep track, therefore, improved visual effects can be observed not only at special moments of the game.
One of the main improvements to the game, which Codemasters places particular emphasis on in advertising materials, is the improvement in driving. In particular, the behavior of cars on wet roads has been significantly improved. Riding in the rain is an important part of real Formula 1 racing. Many tracks are known for extreme weather conditions that affect the race. The table shows the probability of precipitation during the race in the Champion and Pro game modes. On average, during 34% of game races it rains, at least less than a certain part of the race lasts up to four hours.
Chance of precipitation
| Australia (Melbourne) | Malaysia (Kuala Lumpur) | Bahrain (Sahir) | China (Shanghai) | Spain (Catalonia) | Monaco (Monte Carlo) | Canada (Montreal) | Japan (Suzuka) | Russia (Sochi) | USA (Austin) |
| 26.00% | 55.00% | 0.00% | 48.00% | 36.00% | 38.00% | 53.00% | 33.00% | 34.00% | 24.00% |
| Austria (Red Bull Ring) | Great Britain (Silverstone) | Germany (Hockenheim) | Hungary (Budapest) | Belgium (Spa Francorchamps) | Italy (Monza) | Singapore | Brazil (Sao Paulo) | Abu Dhabi (Yas Marina) | Mexico |
| 43.00% | 31.00% | 37.00% | 39.00% | 47.00% | 26.00% | 39.00% | 40.00% | 3.00% | 28.00% |
The transition to smaller particles, denser located in space, means that the behavior of water droplets can be modeled with much higher accuracy. The particle system processes non-linear changes in the characteristics of particles during their existence for such properties as color, transparency, violation of surface smoothness, angular resistance, linear resistance, and gravity. All this, in addition, is consistent with the wind modeling system, which is used to simulate rain.
Car MP4-31 McLaren 2016In the figures below you can see the debugging images showing the behavior of small splashes of water from the wheels of the car and their interaction with the air that passes through the skin. The resulting effect is to create spiral-like swirls emanating from the rear of the machine.

Swirls debug image showing water spray movement

Debug image of turbulence, rear view
The use of smaller particles also means that the existing lighting model works much better with water drops. Light from light sources, for example, from certain parts of automobiles, can be modeled much more accurately on small particles than on large particles representing large volumes of droplets. The image below shows the illumination of water spray marks.

Improving lighting
Another area where improvements have been made is the interaction of the car with water on the surface of the road. This and the water vortices behind the car, which capture water from the ground, and spray from the wheels on the road, flooded with rain. All this allows you to improve the visual connection of the car with the road, to achieve the same effect that is achieved thanks to the shadows on a sunny day.
Here's what wet riding looks like before and after improvements.

Interaction with water on the road.
And here are the drops of water that form the track behind the passing car in the game (left) and when debugging in Intel INDE Graphics Performance Analyzer for DirectX .

Water droplet
The latest improvement was an improved rain simulation. Initially, the game used a simple algorithm using the resources of a video card, which displayed several thousand particles of rain in each frame, applying gravity to each drop, which caused them to fall. In the new rain simulation, most of the updated subsystem has moved to the processor, which allowed to establish its interaction with data on air flows used in other parts of the game. The number of raindrops was increased tenfold, and individual drops were reduced so that the pixel coverage was approximately the same. The figure below shows the debug images of rain taken from the same position. In the lower image - 217 thousand drops, in the upper representing the previous version of the game, only 21 thousand. Despite the increased number of primitives,

Debugging rain simulations
By increasing the number of raindrops and water dust, the developers set up the transparency used in the particle system so that the resulting fogging effect visible at a distance is the same as before. This is necessary so that the graphic settings do not change the gameplay.
CPU load balancing in the new environment
Usually the limiting factor in PC performance for F1 2015 was the video card. The load was especially high on low-cost devices. The most important part of developing and implementing new effects was to ensure that additional particles do not increase the load on the GPU. A second important factor regarding computing resources was the achievement of a good distribution of the computations performed on the processor. The correct load balancing was needed between the available CPU resources, while it was impossible to allow the load growth in the sequence of engine operations responsible for rendering.
GPU load control is achieved through two approaches.
The first is that vertex processing has been moved from the vertex shader to the CPU. This reduced the amount of work performed on the vertices on the video card. This approach did not completely remove the load from the video core, but it was halved. Thus, processing ten times as many particles meant a fivefold increase in the cost of operations with vertices.
The second significant change was to reduce the cost of filling the frame, for example, when rendering rain. The number of drops increased tenfold, but the number of pixels that it affected increased only 1.65 times. In the case of swirls of water dust that remain behind the machine, the changes were even more significant. So, an increase in the number of vertices from 3 thousand to 70, in fact, led to a decrease in the number of processed pixels from 5,800 thousand to 2,500 thousand, that is, the pixel fill rate required to implement this effect was halved. As a result, the effect, to create which uses 20 times more particles, did not require a serious increase in the load on the video card when displaying the image.
The load balancing on the CPU was performed due to the distribution of particle-related computations between as many available logical processors as possible. The figure below shows the load distribution on systems with four and six cores (both in the first and second cases with Intel HT technology enabled). The purple and red blocks show particle processing systems and weather simulations during very heavy rain on a six-core processor (12 logical processors). On such a processor, 6 out of 12 processors are involved in calculations for a particle system. Five out of eight are involved in the quad-core, respectively, but their resources have to be shared with other tasks in the engine.

CPU load balancing for the 6-core system (left) and 4-core (right)
The game engine used in F1 2015 uses a task-based system for load balancing. In this case, there are presets for 2, 4, 8, 12 and 16 logical processors. The system tries to plan tasks so as to reduce any dependencies and not overload one of the processors.
How the appearance of the game has changed
The figure below shows a comparison of the original (left) and significantly improved (right) particle system. Pay attention to the fact that in the second case, water dust is more clearly attached to the car that raises it into the air.

Water vortices that cause cars
Improvements in spray handling that cars lift off the road and lose their grip are shown in the image below. At the same time, individual drops are noticeable against the background of the F1 2015 logo at high quality settings. In addition, you can see improvements in the interaction of tires with the track.

Skidding
Performance scaling
F1 2015 has a built-in performance test that uses the current graphics settings and can be configured to run in various weather conditions. The figure shows the data obtained when performing the built-in test in a system with Intel Core i7-5960x, with a frequency fixed at 3.0 GHz (this is its base frequency), and an NVIDIA TitanX video card. There you can see a list of used settings. The data shown here is the average number of frames per second obtained after the test was completed.

Performance scaling on multi-core systems The
number of physical processor cores was configured through the BIOS. The remaining parameters of the system remained unchanged. Tests were conducted with and without Intel HT technology.

Test settings
On a system in which only 2 cores were turned on, with Intel HT technology turned off, the game did not start, since such a configuration does not meet the minimum system requirements. In general, ceteris paribus, the inclusion of Intel HT increased performance approximately the same as when connecting two additional cores. A comparison of performance in a configuration with two cores and Intel HT enabled, and in a configuration with Intel HT and four cores, resulted in an increase in frame rate of 79%. The transition to a 6-core configuration added another 17%. Using the 8-core configuration with Intel HT enabled resulted in a 27% increase in performance compared to the 4-core configuration and Intel HT. Here it must be taken into account that the results obtained cannot be regarded as some absolute values. We can only say
Considering that the same system was used in all tests, the performance gain is an expression of how well the load created by the game is decomposed into available threads, and how well the system configures tasks depending on the number of available logical processors.
In all tests, the game had access to a large cache of 20 MB in size, even in scenarios with a reduced number of working cores. The obtained performance values cannot be automatically distributed to systems with 4-core processors of the same architecture. It's all about a different clock speed and a different cache size. In fact, the large size of the Intel Core i7-5960x cache allows the game to show better performance on it than on a processor with 4 cores, with a similar clock speed, but with a smaller cache size.
conclusions
F1 2015 is an advanced gaming project that demonstrates how to use the capabilities of modern processors to improve sound and graphic design. Redistributing the load between the CPU and GPU can make the game more attractive without the need for a more powerful video card. Thanks to the presence of a particle system, the calculations for which are carried out on the processor, Codemasters were able to improve the image quality of F1 2015. At the same time, the control of cars was improved, especially in bad weather. A simulation of visual effects using game physics was established.
By allowing the game engine to fully utilize the capabilities of Intel HT technology and all available processor cores, Codemasters were able to achieve a significant increase in the performance of gaming subsystems. This made it possible to achieve fast game operation even with the use of complex graphic design.