The online racing simulator
March Progress Report - LFS in Direct3D 11
(117 posts, closed, started )
March Progress Report - LFS in Direct3D 11
Dear Racers,

We hope you are keeping well in these unusual times. LFS online activity has been higher than usual due to the lockdowns so I hope most of you can find a good race!

We don't want to do a full progress report this month but I can tell you a few things that have been going on this year.

Eric has been continuing to work on South City. He has been updating a lot of the buildings to give them a more detailed three dimensional structure. Progress is good but there are still holes and unfinished objects around. For this progress report he wanted to stay focussed instead of stopping to clean things up for another big round of screenshots.

On my side the main news is that LFS has been converted to use Direct3D 11. A lot of developers have had to go through this process at some point and we are later than most. It is a quite long and meticulous process because it's not as simple as renaming a few D3D9 functions to a new D3D11 style. Some parts of the update were relatively easy like that but other areas of code needed to be done a completely different way.

After all the graphical glitches were sorted out the frame rate was notably higher than the D3D9 version. I don't know exactly why that is but I did take time to do the proper restructuring so that D3D11 would work cleanly. There are various other possibilities in D3D11, although there are no visual changes in LFS yet. For example you can request information from the graphics card without slowing things down. It could be used to read back some data about the current image to adjust the brightness (eye adaptation / auto exposure). I'd like to try a live 'audio render' to create the reverberation more accurately depending on your car's location instead of relying on pre-generated echo maps.

This change does mean that some older graphics cards will no longer be supported. At the moment LFS can still be compiled to use D3D9, but it will be hard to maintain the two versions, specially when we start to use the possibilities that D3D11 offers. For now I am using the D3D10 feature level, which means it works on D3D10 graphics cards. There is no guarantee about that at this point but that's what I'm aiming for now. I know that some people don't have a D3D10 (or later) graphics card and in that case I don't think LFS will work on their computer. But I think that's quite rare so it seems like the time has come to drop support for D3D9 graphics cards. I'm not exactly sure when Direct3D 10 support became common but it has been around since 2007 and Direct3D 11 graphics cards were available in 2009. According to the Steam Survey most gamers have a D3D11 or D3D12 GPU and a few percent have a D3D10 GPU.

Apart from all that technical stuff I did one visual update. The individual tree objects can now move with the wind. Not only the old auto-generated trees (which have been improved) but all the other individual trees and bushes too. It's a fairly subtle effect but it does make the place seem a bit more alive.

A few images are attached, showing some updated areas at South City, with LFS in Direct3D 11.
Attached images
-1089773 -1851788 965105 4927 1193 0.0 60.0.jpg
-11044336 13992239 405731 1473 -1089 0.0 60.0.jpg
11073053 -14485836 398516 -22199 1372 0.0 60.0.jpg
Holy damn
I'm in love with that.

Rest in Peace MVH!
Looks amazing ! Keep going strong Smile
#5 - lfsrm
Sage decision Scawen, moving to D3D11 should give you more tools to get things done easier.

Maybe volumetric clouds is possible now :kappa:
Wow, this is unexpected. This is good news, I thought you will stick with dx9. Did you play with compute shader stuff yet?
Nice work!
BTW, noticed unpretty hard shadow on the tree here. Theese usualy look ok on opaque surfaces, but weird on translucent objects, especially directly facing the light source. Not a bug though. Soft shadows could fix it maybe?
Attached images
nbxlrrlp.jpg
These are gorgeous!
I was wondering though are these colorful walls in the last pic at the outside of the corner in any way "soft"? They aren't tyres but it does seem like they're made of plastic.
Quote from Scawen :After all the graphical glitches were sorted out the frame rate was notably higher than the D3D9 version. I don't know exactly why that is

DirectX 10 was a complete rewrite, throwing out a lot of legacy code in order to improve performance and efficiency.

Adding to that, modern GPUs and drivers tend to focus on the more modern APIs, features and techniques when optimising performance, sometimes sacrificing the legacy stuff (which they can largely brute force in older games). They are now pixel/vertex shader machines.

Both of these probably contributed to the improved performance somewhat.


DX10+ is also able to handle multiple threads better, which has the potential to reduce the reliance on a single, fast CPU core.
very good work !

I'm really looking forward to the complete update Smile
Nice, Keep it up Smile
Thank you all for the comments.

Quote from Keiichi_Tsuchiya :Wow, this is unexpected. This is good news, I thought you will stick with dx9. Did you play with compute shader stuff yet?

No, so far I've just been trying to finish off the conversion, there were quite a few loose ends I still had to sort out even after it was solid enough for Eric to start using it for the editors.

Quote from Degats :Obligatory comparisons:

https://imx.tc-g.uk/so202003/01
https://imx.tc-g.uk/so202003/02
https://imx.tc-g.uk/so202003/03

Thanks!

Quote from Degats :DirectX 10 was a complete rewrite...

Thanks for the comments. It was interesting to see that CPU usage was down while frame rate was up.

Quote from kagurazakayukari :btw translation work done Smile http://bbs.srfc.com.cn/forum.php?mod=viewthread&tid=187732

Thank you!
Quote :This change does mean that some older graphics cards will no longer be supported.

RIP me and my old potato Frown

Good job anyways guys, keep it up! Smile
Thanks for the report! Appreciated.
I am not playing through linux and wine but maybe that's an issue.
For me if it is looking better and as smooth it is perfect.
finally Smile <3
you can use the 2 versions of D3D
similar a GTA V, have a D3D 10 and the D3D11 versions for non-supported graphics card
Curious to know if the difference in Traffic Lights means anything?
Attached images
Capture.PNG
-
(harun940) DELETED by harun940
Keep going Smile As a motivation, I will provide a comment that once caught my attention because it is very accurate. Jimmy Broadbent, known youtuber, once released a video in which he tested LFS. He received the following comment below the film https://youtu.be/gvXvzvOsqOk:

"If the devs weren't so lazy LFS would be the best sim of all time. It was so far ahead of its time and does things with its physics that other sims still can't replicate."

I don't think that you are lazy because as software developer i know how hard that job is, but the market is ruthless, people want more and more, and to be on top they must be receive what thay want.

Please think about entering the steam distribution platform - this will definitely help to reach more players, about new tracks - I like the available layouts, but experienced players want something new, pro racers would like to have real tracks like e.g. nordschleife, maybe new cars, and open (officialy supported) platform for moders with workshop - people can create amazing things, .

In my opinion just a big, top quality update can re-interest players and help you get new ones. New visuals, although I am very happy, are not enough.

Best regards and good luck in your work on still the best online simulator!
Quote from Keiichi_Tsuchiya :Wow, this is unexpected.

Yeah, but thinking about it, it can be really hard to implement modern rendering techniques using such an old API, without compute shaders, asynchronous operations, multi-threading capabilities, etc

Scawen, I think you don't worry about minimum GPU requirement implied by the update, I'm pretty sure even the best DX9 compatible GPU couldn't handle the new update anyway, so that's a good thing for performance, stability and quality. Smile

Is your new rendering code using command lists? If not, I suggest you really use them from the begining, as it's the only way to record work to submit to the GPU from D3D12 onwards, and to record work from other threads in D3D11, so it will save you some time in the future. Smile

Looking forward for a new GPU based particle system using compute shaders and indirect draw calls, or a tile light clustering system to help with night rendering with a lot of lights Big grin

Keep it up ! Thumbs up
Nice work as always! Thumbs up
It's nice to hear from you guys again, thanks and good job!
Quote from nacim :...don't worry about minimum GPU requirement implied by the update, I'm pretty sure even the best DX9 compatible GPU couldn't handle the new update anyway, so that's a good thing for performance, stability and quality. Smile

That is an interesting point, that the power offered by the D3D9 interface exceeds the abilities of D3D9 graphics cards.

Quote from nacim :Is your new rendering code using command lists? If not, I suggest you really use them from the begining...

No but I'll have a look to see how it fits with our system and how much rearrangement is needed.

Quote from nacim :Looking forward for a new GPU based particle system using compute shaders and indirect draw calls, or a tile light clustering system to help with night rendering with a lot of lights Big grin

Thanks for the link but I'll have to start simple with compute shaders!

I might read up on the tutorials about compute shaders in that link. I'm thinking two of my first compute shaders should be:
1) Histogram analysis of a render target and pass the results back to the CPU (for auto-exposure).
2) Audio / echo render, also a sort of histogram.

They don't sound too hard although I know there are quite a few concepts to learn. Should these be possible with the D3D10 compute shaders? My understanding is compute shaders started in D3D10 and were extended in D3D11. At the moment I feel it is better to keep supporting computers with a D3D10 GPU.
This thread is closed

March Progress Report - LFS in Direct3D 11
(117 posts, closed, started )
FGED GREDG RDFGDR GSFDG