War Thunder – Dagor Engine 5.0: Lighting FX

Today’s edition of our devblog will discuss how the updated Dagor Engine 5.0 render will add volume to the War Thunder world. It’s all about light and shade!

https://static.warthunder.com/upload/image/!%202018/02%20February/Dagor5/GI/ENG2_bf95a2a03d868ffa41f041abc6942031.jpg

https://static.warthunder.com/upload/image/!%202018/02%20February/Dagor5/GI/ENG1_186cbec5de002df238af49d34eecf1c8.jpg

https://static.warthunder.com/upload/image/!%202018/02%20February/Dagor5/GI/ENG0_c202dfbf76f0f3a4cc4dbfa60afdbe9d.jpg

Global Illumination

Several lighting and shading algorithms are used when rendering each frame in War Thunder. In the updated Dagor Engine 5.0 render, we are improving the lighting model with Realtime Global Illumination. Global Illumination is the common term for lighting algorithms, this includes not only direct illumination, but also reflected and scattered light from surfaces and area lights (such as sky and clouds). Our game will have shadows that objects cast from ambient illumination and the sky making the visuals more volumetric and detailed in shadows. Global Illumination will also introduce light reflected from other objects and the environment. All of it will be implemented in real time for large scale locations (the average WT location is 32×32 km) for destructible and dynamic objects

Like other upgrades to the game’s visuals, Global Illumination will be available as an option in the graphic settings menu and will be enabled by default for high graphical settings.

Global Illumination – is a complex mix of algorithms, a very difficult and high-technology task. It’s enough to say that at the moment there is no game or game engine that has a fully fledged dynamic GI for large-scale locations. Algorithms where the objects are supposed to be static or require preliminary calculations won’t work in War Thunder: dozens of large-scale location will require excessive memory and hard drive space while destructible environment affects the whole geometry very significantly. That is why some of algorithms and improvements will, perhaps, become available after switching on some personal settings after update 1.77 is released. Meanwhile, a general list of changes is already available.

https://static.warthunder.com/upload/image/!%202018/02%20February/Dagor5/GI/0_factory_before_9c1f94403b9e525157ea7694174c7f9d_034fdcba5781b8a52c527170375a9d3c.jpg

https://static.warthunder.com/upload/image/!%202018/02%20February/Dagor5/GI/0_factory_after_7fa354543625d4c33dab28b38669419e_825a74b339560ba528e31ab30be89fb2.jpg

See the difference in shadow rendering and visual perception of the volume with the new Dagor Engine 5.0 shadowing algorithm.

https://static.warthunder.com/upload/image/!%202018/02%20February/Dagor5/GI/968_GI_off_89d5446896ea4457a8303a06b21a1e35_65aef60053fcc877d19cdc86b2ff897b.jpg

https://static.warthunder.com/upload/image/!%202018/02%20February/Dagor5/GI/968_GI_on_d462b4d8fbadd7953746203ca44dede4_66438739c64d81c96d5b83d427c80349.jpg

Shadows on effects

Effects are often separate from the rest of the photorealistic rendering, as most effects are simplified versions of much more complex processes, like smoke and fire. That’s why the effects render is usually a separate process. In the Dagor Engine 5.0, we have calculated the shading of effects by environmental objects, such as exhaust fumes or clouds of smoke from a burning tank, making them look more three-dimensional and natural in the final image:

https://static.warthunder.com/upload/image/!%202018/02%20February/Dagor5/GI/contact_shadows3big_bf270b4a0fe0eb2fc559b7e93a802ed2_3ffeb46e14ef96c10911a42f473d3a50.jpg

https://static.warthunder.com/upload/image/!%202018/02%20February/Dagor5/GI/contact_shadows2big_b9964e2046645676fdd0d9c8bc39bebd_e45c5ab5a5143180c478597d69df504f.jpg

Contact shadows

In our new Dagor Engine 5.0 graphics engine, to be introduced in War Thunder 1.77, we’re presenting an algorithm for creating contact shadows, which make the image more realistic and give depth to maps. Technically, the algorithm for drawing contact shadows relies in fact, on rendering each frame, every pixel in the image undergoes ray tracing for a short distance toward the source of light. The tracing takes place through other objects already drawn on the screen. If an obstacle appears in the ray’s path, an additional shadow is created.

Changes in the grass will be particularly noticeable: grass in the game could previously take shading from other objects but couldn’t give off shadows itself. The technology of contact shadows not only allows grass to give off its own shadow on the ground, but also give shade to other grass. As a result, grassy meadows and fields will now look deeper and more realistic, both up close and at distance.

Apart from grass, the technology of contact shadows provides a means to create great depth in all objects far away from the player. For example, window frames, rivets on vehicles, and other objects receive visually more correct sub pixel shading, in contrast to classic shading methods in which shadows at great distances are drawn only on large objects.

https://static.warthunder.com/upload/image/!%202018/02%20February/Dagor5/GI/contact%20shadows02_full_4c0ffcbfba60af77d1053b61afed79c3_33cad887734079cef3aa7ffc720e0fc1.jpg

https://static.warthunder.com/upload/image/!%202018/02%20February/Dagor5/GI/3_a0596622835d37834937374e5862fbdb.jpg

https://static.warthunder.com/upload/image/!%202018/02%20February/Dagor5/GI/contact%20shadows01full_ddba2034a35195aa45152e7d73fcc95b_f1c5446e9ca4d464991bf2bd4e3bc5fe.jpg

https://static.warthunder.com/upload/image/!%202018/02%20February/Dagor5/GI/contact%20shadows00full_385a3d885b6041931187b09fa671e105_31560e0beb97dc071855c8af62347561.jpg