Ray Tracing in War Thunder!

With the Firebirds update, War Thunder has support for Ray Tracing (RT) and is capable of doing several RT based visual effects, like shadows, ambient occlusion and reflections. In today’s blog, we’ll be taking a closer look at the details!

How does this work?

For RT to be used, we need to build and maintain a so called “Bounding Volume Hierarchy” (BVH). BVH is a triangulated representation of the whole world where all RT effects can work on that. Many games cut corners on what to include in BVH and what fidelity. Like only using less detailed models, removing everything at a relatively close distance. But that has a price. With such approach, it’s impossible to get accurate shadows.

With War Thunder, we decided to go for the real deal, so we can employ a wider range of effects in the long run. In War Thunder, almost the whole battlefield is accessible for RT effects at the same fidelity that is rendered in the game, so all of those effects can be physically correct and accurate.

Doing this has a price as the BVH building process makes use of as many CPU threads as possible, so a modern CPU is recommended.

Now we have BVH ready, we can start tracing rays in it and get some effects out of it. We have three main effects available at launch.

Screenshot on top is without the new RT effects

Screenshot on under is with the new RT effects

Ray Traced Shadow Map (RTSM)

This replaces texture based shadow mapping and instead traces rays from every point on the screen onto the surface of the sun. As it’s using the whole surface of the sun, and not just the center point of it, shadows get a physically correct penumbra, depending on the shadow caster object’s distance, as one would expect.

The result is physically correct and pixel perfect shadows from the sun.

On high end GPUs one can also try shadows from dynamic lights. It enables hard, pixel perfect shadows from all dynamic lights, like explosions, muzzle flashes and the like. This is a very demanding feature, and aimed for high-end GPUs.

Ray Traced Ambient Occlusion (RTAO)

Ambient occlusion is a technique used to simulate object features blocking the ambient lighting, like the sky itself — a sort of ambient shadow. That’s why it’s darker under your bed.

Traditionally we do this with screen space techniques like SSAO or GTAO. RTAO is a ray traced version of these screen space techniques, and can correct errors, typical to screen space techniques, like when something casts ambient shadows outside of the screen. Screen space techniques can’t deal with that, but RTAO can. Similarly to when something casts ambient shadows, which is occluded by another object. Usually in these cases, you see shadows where it should not be, or vice versa. RTAO fixes all of these issues.

Ray Traced Reflection (RTR)

This is the most complex feature. RTSM and RTAO is really just about shadows, but with RTR, we’re visualizing BVH itself. In a mirror, you basically see what is in BVH and we’re working hard to make it match the rendered image closely as possible.

Again, even before RTR, we had reflections. Probe based and screen space reflections were used, but just as with SSAO, they have their limitations. Actually very similar. Handling out of screen or occluded objects for screen space, and positioning issues with probes. RTR has the whole scene to trace, so naturally it can reflect objects from any location.

There is another complication for RTR, namely surface roughness. A rough surface like concrete has reflections which are very soft and blurry, while gloss surfaces like glass or flat water has mirror like sharp reflections. Additionally, there’s everything in between. Simulating this is actually one of the hottest topics in computer graphics.

Our approach is rendering noisy reflections based on roughness, and using a so called denoiser to get physically accurate reflections.

The effect is sometimes obvious, like in the case of mirror like reflections.

Other times, it’s less obvious but makes the rendered image just more correct, making it look natural. If you look at these shots, take a look at the vehicle and its surroundings. On the non RT one, it’s basically glowing in the shadow, as the building which should block the sky from the reflection on it is not on screen, so screen space techniques can’t know the sky should be blocked. On the RT version, this blue tint is gone, as BVH has the building, regardless of it being on screen or not, and blocks the sky correctly.

Again RTR is fixing the issues traditional screen space and probe based reflections have.

A sub feature of RTR is reflections on translucent glass surfaces. In these glass surfaces, you can now see an accurate reflection of the world, instead of the probe we used before. The result is accurate reflections again.

And finally another sub feature is reflections on water.

Our water reflections are using planar reflections in the game, which is a very accurate way to have reflections, and then it’s distorted based on the waves. With RTR water, the reflection rays are shot out correctly, based on the wave normal vectors. The reflection itself is simply more correct, as it’s not just distorting a 2D image, but actually use different reflections per pixel.

The difference is sometimes larger, sometimes smaller.

RT performance

Ray Tracing is heavy lifting, but there are many scalability options to make it more accessible.

First of all, all three options can be enabled/disabled independently, meaning you can use only the effect which you are care about the most if you have an older RT capable GPU.

Then there is the quality levels. In general, RTSM with dynamic lights is for the latest high end GPUs. Normally it’s not much more expensive than just sun shadows, but in the middle of the action with many fires and explosions, it can become very demanding.

For RTAO, low quality is using a lower internal resolution for the calculations. This is however the same resolution as with the screen space techniques, but without the screen space errors. Medium gives you higher resolution and high gives better de-noising. This is really only visible in certain circumstances, but we wanted to give you the control over it.

For RTR, low is a good tradeoff. It lacks RT shadows in reflections, improving speed considerably. Medium has RT shadows in reflections. Both low and medium is using a so called checkerboard rendering to double performance by tracing half the number of rays. High disables this checkerboard rendering, but the denoiser actually does a great job hiding the checkerboard pattern, so the difference is small. Again, it’s up to you to decide.

RTR also has a control to render at full or half resolution, both for water and normal surfaces. The difference is mainly visible in mirrors, and look good on half resolution even if you don’t have a beefier GPU.

Finally the RTR translucent glass reflections can also have RT reflections inside the reflections on high, or not on medium. This usually impacts performance slightly as these surfaces are not very common in the game.

For an optimized setting, where you get a good tradeoff on performance/image quality we recommend using the Medium RT preset. Pushing beyond further improves the quality of the effects but at greater price in performance. But if you have the latest top of the line GPU, go for it! :)

When using RT effects, we recommend using an upscaling anti aliasing method, with a preset that suits your graphics card. Like DLSS, FSR, XeSS or our TSR. With these upscalers you can achieve great performance and image quality. Balanced presets are usually a good middle ground for ray tracing, but on an older GPU, there’s nothing wrong in going for the performance preset if you want to enjoy the RT benefits.

We’re committed not just to add more RT features in the future, but also to improve the performance of existing ones, so stay tuned for future updates.

At launch, RT effects are supported on Nvidia graphics cards. Making it work on both AMD and Intel cards is a priority for us. It’s working with our internal builds, but not ready for release, we need to iron out some issues specific to these GPUs. It will be ready soon, along with the current generation consoles.

25 Likes

Oh so PS5 wont get graphics update in this update but when its done for Intel and AMD? Nice

1 Like

I’ve said this on every graphics-related dev blog, but I’ll say it once more;

All these new visual effects and graphics updates are what I am looking forward the most to this update!


I just hope live server optimisation/performance will be better than it was on the dev server. I went from ~170 FPS to ~40 upon enabling DX12 and Ray Tracing! I know I can expect a drop in performance, but I sure hope not to such degree, hahah. Hope it was just Work In Progress shenanigans.

For reference, my CPU is a Ryzen 7 5800X and my GPU is an Asus RTX 3060; running on a M2 drive, and 16GB RAM DDR4. In theory, I should be able to run RTX just fine, right?

10 Likes

Me with my GTX1660S:

8 Likes

Me with GTX 1650 Max Q:

Spoiler

image

3 Likes

Hopefully yes. CPU and GPU are decent for this.

1 Like

Quick answer for ya: Nnnnnope.
A 3080S or a 4070 are the minimal standards for maxxed out RT at 1080p. 4080S is the optimum ( if you’re expecting a reasonable frame rate)

5 Likes

Attracting is super expensive to run even if you have hardware capable of running it. It’s also extremely CPU intensive.

I built this PC like 2 years ago with great effort… I thought it would serve me well for a long time :’)

1 Like

oh you guys need like 1000 euros graphic card to run free to play game? Hilarious.

1 Like

Merkava reference?

1 Like

The current Ray Tracing implementation is garbage at the moment. Reflections, the most important setting among all, is broken. All glass materials act as mirrors, and DirectX 12 mode is still very unstable even after years since announcement.

Performance wouldn’t be too bad, even on lower end RTX cards, but the random stutters, especially before loading into the map makes it almost unusable.

Also what happened to Vulkan? It’s miles ahead DX12 and also supports Linux.

That’s not how windows work.

This also doesn’t fix the problem, that some ground textures are inferior to some textures used in games 10 years ago. Just look at afganistan, or ash river. (Abandonded factory rework is a step in the right direction but still far away from photorealism)

3 Likes

It will. Just don’t overdo the settings.
RT is still a beastly task for any PC, even 40xx series and 7900Xtx cards suffer under it. The tech will get there and while progress has been made it hasn’t gone far enough for it to pay off.
Knocking down your picture quality just for the pretty colors and omega good physics is poo though, it’s still a multiplayer game and isn’t there to portray real life down to the T, it’s there to be played.

2 Likes

As long as the FPS never drop below 60, I’m happy. As you said, it wouldn’t be wise to sacrifice gameplay for graphics, but I still enjoy the higher visual fidelity possible, hahah.

So I’ll fiddle around with the settings upon release, in order to find the highest possible setting without compromising performance (<60FPS); maybe disabling reflection-related settings, etc- but I would like to keep the general lighting/shading ones though.

We will see soon enough, I guess!

1 Like

We need Frame Generation and DLSS 3

5 Likes

they released this article today but doesn’t seem the dev server is up to test it at the moment :(

hopefully they will open it a few more times before releasing this!

Yeah, you should run raytracing at 1080p render resolution.

No you don’t. It is all optional. War Thunder is actually fairly easy to run.

This is just something on top that can make use of faster GPUs and also to make sure War Thunder graphics are staying relevant in the future and make graphical improvements easier in the long run.

EDIT: They are actually making DX12 as default render api as well, so it will actually make War Thunder to run even better.

7 Likes

$300 isn’t $1000.
Mine is $600 and will run ray tracing at 1440p render resolution.

3 Likes

This is the first game with RT, where I very much care about shadow and lighting improvements, so I am looking forward to that, even though my current non RT GPU doesn’t have issues running modern games yet.

I especially like that case, where it fixes glowing stuff in dark environment! Thats definitely something I really wanted to see improved.

Also thank you very much for taking time to explain the techniques and its effects in this article. Very interesting!

I recently bought new CPU so at least I am ready for it in this part. Keep going, it is looking great!

6 Likes