Support for DirectX 12 API

Hello everyone.

In the official Discord server of Trainz series I have seen a message about future support for DirectX 12 API.
I would like to know more about it.

Will it be version 12.0 or 12.1 ?
When is it planned to be released ?
Will it be introduced in existing games (Trainz Plus or Trainz Railroad Simulator 2022) as a an update or will it be in the next game of the series ?

Thank you.
 
DX12 is still WIP. It's already there in Trainz Plus but it is buggy and causes the program to freeze.

DX12 will be released soon(tm)... in other words, whenever it's ready.
 
Honestly, DX12 is a failure much the way that DX10 was. It has massive issues with Nvidia cards and only a small number of developers have supported it. Last number I saw was 144. Trainz doesn't even come close to using all the features available in DX11. I don't really understand the commitment to adding it to Trainz as an option. Real time ray tracing gets talked about so much as being the big feature it will bring but I seen tons of game reviews where turning on ray tracing drops the framerate by 75%.
 
Honestly, DX12 is a failure much the way that DX10 was. It has massive issues with Nvidia cards and only a small number of developers have supported it. Last number I saw was 144. Trainz doesn't even come close to using all the features available in DX11. I don't really understand the commitment to adding it to Trainz as an option. Real time ray tracing gets talked about so much as being the big feature it will bring but I seen tons of game reviews where turning on ray tracing drops the framerate by 75%.
Yup, I agree. We suffer from heat issues as it is, and I can only imagine what raytracing will do.

When I tried DX12, I did notice a notable drop in temperature with my RTX3080, so maybe there is a benefit, unless that was because my screen was about to freeze ???
 
@wreeder

I have played modern Tomb Raider and The Division 2 games which both use DirectX 12 API. In both games, FPS count in DX12 mode is more than in DX11 mode. Moreover, in DX12 mode there is less input lag and thus the gameplay is more smooth. So, there is sense in a modern DirectX version. Another example is AotS – in such a game as Ashes of the Singularity, which was a showcase for DirectX 12, I saw a linear FPS increase when using an AMD CrossFireX combination of two my Radeon video cards working together in DX12 mode. DX11 version of the game could not show such FPS counts. So, DirectX 12 may be much better than 11-th.

It has massive issues with Nvidia cards
Well, nvidia is not the only vendor of GPUs nowadays.
I have an AMD video card and am planning to buy my next card with Intel GPU.

I don't really understand the commitment to adding it to Trainz as an option.
The 12-th DirectX is more optimized for multi-core CPUs and provides a smoother gameplay when implemented correctly. Though, DX12 is much more difficult to use for a game engine developer than the old DX11. You can get more information about it in the internet. Search for so called Draw Calls in DirectX 11 and 12.

Real time ray tracing
Ray tracing, or simply RT, is a feature of DirectX 12.1. There is no RT in DirectX 12.0. This is why one of my questions mentions the version. I personally do not like ray tracing and I do not need it at all. I think, DX 12.0 is enough for the game.
 
I agree that without RT then performance is better but the Trainz developers cited Ray Tracing as the main reason for adding it along with the rather vague "maybe it will improve performance". Trainz has always had a problem with handling independent light sources such as streetlights. If you put more than a handful in a scene the program grinds to a halt. This is obviously a game engine issue as other games using DX11 have no such problem. I sense that this is one of the areas where there is hope that DX12 will make a difference. As far as Nvidia, they do have 80% of the graphic card market at the moment and Trainz makes use of Turf FX for doing grasses. Currently, users of other graphic cards have an inferior experience with the newest version of Trainz due to not being able to see Turf FX layers on routes they run.
 
I agree that without RT then performance is better but the Trainz developers cited Ray Tracing as the main reason for adding it along with the rather vague "maybe it will improve performance". Trainz has always had a problem with handling independent light sources such as streetlights. If you put more than a handful in a scene the program grinds to a halt. This is obviously a game engine issue as other games using DX11 have no such problem. I sense that this is one of the areas where there is hope that DX12 will make a difference. As far as Nvidia, they do have 80% of the graphic card market at the moment and Trainz makes use of Turf FX for doing grasses. Currently, users of other graphic cards have an inferior experience with the newest version of Trainz due to not being able to see Turf FX layers on routes they run.
Light sources were always and issue and it was possible to crash Trainz in the past by placing a lot of locomotives and then turning on their headlights. Scenery light sources are the ca. 1990 light cones. Since nothing emits light but can glow, a cone representing light coming from a light source such as a streetlight is given the properties to glow at some intensity with an alpha channel so that the light cone is almost transparent. When TS12 was updated to SP1 Build 61388, alpha channels were broken, I'm sure you remember that, causing the cones to appear solid under the lights.

When I tried DX12 before it crashed, I did notice a big drop in temperatures as I mentioned previously and a bit of a performance boost. If this holds true when we eventually see that in TRS22 and up, I'll be pleased over that alone.
 
SCS American Truck Simulator using DirectX 11. Note that the yellow lights are lighting the ground, they are reflecting in the windshield and the smoke stacks. The windshield is reflecting the light of the setting sun. Note the realistic falloff of the headlights on the ground. All of this while requiring less computing power than TRS22 and Trainz Plus. It will even run on Intel's 630 iGPU.
F5E410ABC040FF3BC067DB61378AC5239CCD65B0
 
And all because Trains is not an optimized game at its core.
SCS American Truck Simulator using DirectX 11. Note that the yellow lights are lighting the ground, they are reflecting in the windshield and the smoke stacks. The windshield is reflecting the light of the setting sun. Note the realistic falloff of the headlights on the ground. All of this while requiring less computing power than TRS22 and Trainz Plus. It will even run on Intel's 630 iGPU.
 
not an optimized game
This is why I think every PC game should have a built-in benchmark as some modern games do, such as Tomb Raider and The Division 2 which I mentioned earlier. I can spend one minute to run a built-in test and it will show the framerate, and if anything bad happens with the game engine, I will see it in this minute. I do not know how Auran / N3V is developing their games, but I personally always do some tests when I write scripts and programs. This saves a lot of time.
 
Concerning the dynamic lights in modern 3D rendering, there is an old technique called Deferred Rendering. It allows to have thousands of sources of dynamic light in a scene. I hope that Auran / N3V are using it. Source: https://gamedevelopment.tutsplus.com/forward-rendering-vs-deferred-rendering--gamedev-12342a

Concerning PC freezing, there may be a lot of reasons. One of the obvious reasons are Out of memory (OOM) situations for CPU-RAM and GPU-VRAM. By the way, the Arma game series has this bug in their game engine. They often have OOM for the GPU and game starts freezing and then just crashes. All this can be fixed, but it requires a lot of testing and code updates.
 
Arma 3 is still the original Operation Flashpoint with more stuff built-in. We still get AI that wanders off somewhere only to get stuck in corners near buildings, all the while tanking frame rates.

You can monitor the framerates in T: ANE and up using the Profiler. Before starting Trainz, click on the Developer menu item on the top of the Launcher and then click on Clear Profiler and then Show Profiler. The Clear Profiler removes previous information to give you a fresh look. While this is running, you can see the frame rates as you use the program. You'll notice a big variation in rates due to not only the quality of content but also the amount of content. Using this capability as a user you can optimize your routes so that the performance is equal throughout. This profiler can also assist with troubleshooting big stutters due to poorly constructed assets or corrupted ones.

In addition to the Profiler, there's also the ability to show performance statistics within Surveyor and Driver. These tools are enabled under Trainz settings while in Trainz itself under Interface Options. This is particularly helpful for searching really badly performing assets. If there's a huge triangle count shown while in a certain area of the route, start checking around for the assets that may be causing the problem.
 

@JCitron

Is it possible to monitor in-game VRAM usage in this Profiler ?
Not within the game but you can use Task Manager.

VRAM doesn't seem to be too much of an issue unless you're working with a lot of PBR textures and Turf-FX grass, which in all honesty is over done in many cases. Seriously, how many fields have 2-foot-high super thick grass?

I have noticed that having a 3 x the size paging file helps a lot in particular when working with large routes really helps a lot.
 
Back
Top