The online racing simulator
LFS Performance - how to increase your FPS.
In the driving view thread a couple of people mentioned that they use wheels-only view to increase their framerates. This actually surprised me because I would think that two circular wheels would use more polys than the relatively low resolution dashboards in LFS. So, I did a few tests to see just how much different settings affected frame rates.

I tried this on a machine I had handy (not the rig I normally use to play). Specs are as follows: Athlon XP 1700, 480MB RAM, nVidia GeForce2 on-board video (32MB). All tests run at 1024x768x16bpp @ 75Hz. All tests were done using the "benchmark.spr" replay found on the LFS benchmark site.

Note that these numbers are what *I* got. Every system is different and you may get slightly different results depending on where your bottleneck is (RAM, processor speed, video card speed, video card memory, etc). Obviously the bottleneck on this machine is the on-board video card. I have no doubt that with a half decent video card this machine's frame rates would quadruple or more.

Cockpit view - LFS Standard Settings:
Frames: 974 - Time: 103283ms - Avg: 9.430 - Min: 5 - Max: 16

Cockpit - Wheel, no driver:
Frames: 998 - Time: 103273ms - Avg: 9.663 - Min: 5 - Max: 16

Cockpit - no wheel, no driver:
Frames: 1002 - Time: 103390ms - Avg: 9.691 - Min: 5 - Max: 16

As you can see, turning off the wheel and driver in cockpit view made no effect on the minimum or maximum fps and only gave a <.5 fps difference on average. So, turn off the wheel/driver if that's your preference, but don't expect a frame rate boost.

Wheels only view:
Frames: 1875 - Time: 103364ms - Avg: 18.139 - Min: 8 - Max: 41

This is quite obviously a very large jump in frame rate. The average frame rate is about double while the max frame rate is over double what the cockpit view gave. It's interesting to note that the frame rate seemed least affected when there were lots of cars around, but when the track was clear up ahead the frame rate really shot up. I don't understand this. I would think that drawing the tires should logically require more horsepower than drawing the cockpit.

Cockpit - no wheel, no driver, LOD set to minimum:
Frames: 1331 - Time: 103540ms - Avg: 12.854 - Min: 7 - Max: 19

Cockpit - no wheel, no driver, LOD min, wheels/tires/flags/rubber set to all:
Frames: 1390 - Time: 103451ms - Avg: 13.436 - Min: 7 - Max: 20

For these tests I went back to cockpit view but turned Level Of Detail to minimum. For the second test I set the listed options to "all" (which means those things aren't drawn). These were set to "mirror" by default. The LOD option made a fair difference, but turning on simple wheels, no flags, no rubber, etc. only gave a <1 fps increase. It's my opinion that turning off wheels/tires/flags/rubber is not worth it. The game looks graphically much worse while giving a negligible increase in frame rate. Again, this seems strange since having wheels drawn adds a ton of polys that must be rendered.

Cockpit - as above with mirrors disabled:
Frames: 1906 - Time: 103460ms - Avg: 18.422 - Min: 10 - Max: 29

Finally, something other than wheels-only view that made a significant difference. Average frame rate is double what it was with the default cockpit settings, but it's only ~30-50% higher than the above settings (LOD and wheels/tires/etc were left turned down, as above).

Benchmark minimum settings:
Frames: 2100 - Time: 103406ms - Avg: 20.308 - Min: 10 - Max: 31

These numbers represent the "minimum" cfg.txt that comes with the LFS benchmark. Again, this is only a slight increase over the above test (only 2fps gain on average) even though virtually every single graphical option was turned to minimum or completely off. Running in this mode looked, quite frankly, *awful*. It's quite obvious that many of the grahical options have a huge effect on eye candy while not having much effect at all on frame rate.

Benchmark maximum settings:
Frames: 765 - Time: 103275ms - Avg: 7.407 - Min: 5 - Max: 13

These numbers represent the "maximum" cfg.txt that comes with the LFS benchmark. I knew this would give poor frame rates, but wanted to have a baseline anyway. It's interesting to note that with EVERYTHING enabled and set to high, the average frame rate and min/max frame rates are very near to the standard settings that LFS ships with.

Benchmark maximum settings w/wheels view:
Frames: 1484 - Time: 103230ms - Avg: 14.375 - Min: 6 - Max: 29

This was probably the most interesting test of all. I used the "max" settings above, but used wheels-only view instead of cockpit. Despite having all of the graphical options maxed out, this view gave results very similar to the "minimum" settings. In other words, you could run wheels-only view with graphical options maxed out, or you could run cockpit view with graphics on minimum and get approximately the same frame rate. As much as I hate wheels-only view, this is probably going to be a no-brainer for most folks.

In conclusion I would have to say that based on my testing the three things that make the most difference to frame rate are as follows:

1) Wheels only view. Changing to this view can basically double your frame rate over cockpit view.
2) Mirrors. Turning off mirrors can give a significant increase in frame rates. However; I don't recommend this as you really have no other way to know how close other cars are to yours without constantly looking around.
3) Level of Detail (LOD). This also seems to give a decent boost, especially when there are a lot of cars on screen, so long as they're not all close to your own car. It helps very little off the starting line or when you have to drive through a pile-up.

I have a few questions that hopefully one of the devs can answer, and one suggestion that might offer an easy way to increase frame rates.

Question: Why does wheels view make such a huge difference in frame rate? The cockpit would seem to have fewer polygons and very little in the way of textures (assuming wheel/driver are turned off). Also, the dash doesn't have to be turned and animated like the wheels. Are the wheels still being "drawn" in cockpit view even though they can't be seen? Is there anything that can be done to address this so that cockpit view is faster and more efficient?

Suggestion: The LOD option appears to work using distance. Closer cars are drawn using a high number of polys, full textures, etc. while far away cars use fewer polys and low res textures. It might be better to change LOD based on frame rate, rather than distance. I noticed when doing the replays that LOD made virtually no difference right off the starting line or through the first turn or two because all of the cars are so close together. Since the cars are close together they get drawn fully. Unfortunately, this is exactly the circumstance where most people need the extra fps. I think you'd get a significant frame rate boost if you based LOD on frame rate. Using a system like this you could have a max and min frame rate. When the rate dropped below minimum, LOD would drop slightly. When the rate went above max the LOD would raise. This would, of course, be an option just as LOD is now. I think this would offer a much better user experience and could significantly increase frame rates early in the race.

Thanks to everyone who bothered to read this whole thing.

(edited for grammar and to remove some uncessary info from the fraps logs)
I'm sure there are plenty of optimisations the devs could do on the graphics side. I'd certainly like more dynamic detail options. With dynamic LOD set at 1.0 (maximum) it improves my starting FPS a bit, but not much, and can make the cars look awful. Once all the cars are spread out I certainly have no FPS issues.

It's the drop at the start which needs to be ironed out - having 70fps when I'm on my own is great but I need things to still be smooth when there are lots of cars around (and 20fps is not smooth).
#3 - Misko
Really useful suggestion for the LOD changing with framerate.

I remember a relatively significant boost in FPS if I disabled overlays with Shift+F when I had a weaker machine. Even just bringing up messages history with H key made a noticable difference. So theres another thing to try.
Quote from Bob Smith :I'm sure there are plenty of optimisations the devs could do on the graphics side. I'd certainly like more dynamic detail options. With dynamic LOD set at 1.0 (maximum) it improves my starting FPS a bit, but not much, and can make the cars look awful. Once all the cars are spread out I certainly have no FPS issues.

I think you have this backwards, or I'm not understanding what you're saying. Setting User LOD to maximum makes the level of detail as high as possible. With a setting of 1.0 cars will not use low poly models or low resolution textures until they're quite far away. Setting this slider to a lower value (.25 is minimum) will cause the cars to lower their detail when they're much closer and give slightly better frame rates. If you change your slider from 1.0 to .25 you should notice a very slight increase in frame rate and you'll definitely notice the lower detail cars. However; the cars will stay highly detailed when they're within a few car lengths, even on the minimum setting.

Quote :
It's the drop at the start which needs to be ironed out - having 70fps when I'm on my own is great but I need things to still be smooth when there are lots of cars around (and 20fps is not smooth).

This is exactly what I was getting at. Even using the lowest (fastest frame rate) LOD setting it doesn't help much at all at the start of the race. During the start and the first few corners the cars are so close together that LOD makes no difference since it's based on distance. I'd rather have all the cars in the grid look like bricks and get 50fps off the start than leave them looking shiny and pretty and only getting 20fps like I do now. I think changing LOD to change based on frame rate would be a huge improvement over the distance calculation that appears to be used now.
Here are some examples:

LOD 1.0 http://i14.photobucket.com/alb ... 32/Cue-Ball/LFSLOD100.jpg
LOD .50 http://i14.photobucket.com/albums/a332/Cue-Ball/LFSLOD50.jpg
LOD .25 http://i14.photobucket.com/albums/a332/Cue-Ball/LFSLOD25.jpg

This is the exact same picture taken at three different LOD settings. If you download all three then view them in a slideshow you can see how the LOD progressively worsens the view and increases the fps as you lower the setting. I left the frame counter enabled so you can see the change in frame rate. Note that these pics were taken while the game was paused, so the frame rate is higher than it would be in-game since no AI or car path computation is happening.

With a setting of 1.0 (100%) the cars and track are drawn at full resolution clear into the distance. All cars appear to have full wheels drawn and trees, signage, etc shows up as far as you can see. It's interesting to note that the car at far left has low detail tires, yet still has full detail wheels. 12.3 fps.

With a setting of 50% you notice the furthest trees disappearing or turning into a black blob and the furthest cars getting boxy and blurry. Note that the car at far left now has tires only, no wheel detail. 14.6 fps (~15% increase over LOD 1.0).

When you get to 25% (the minimum) you'll notice that all cars look much worse than they did before. The furthest front cars have actually disappeared, while other cars are blurry and are using lower detail models. Grass textures have become blurry, as have most textures more than 100 yards away. 18.7 fps. (~34% increase over LOD 1.0)

It's quite astonishing how much different the three screens look. I'm really curious what LFS would look like if the closest cars were drawn with the lower poly models and fuzzy textures. After looking closely at the .25 screenshot, I wonder if anyone (myself included) would be willing to live with that level of graphics for the boost in frame rate it might provide (which could be minimal, or could be huge, who knows?).
The problem with the framerate drop when there are lots of cars in the screen at once is mostly because there is lot of physics that have to be calculated. Reducing graphics quality won't help much there.
I did some benchmarking with the LFSBench max settings and the replay. My computer is AMD Sempron 2800+, GF6600GT and 1GB of RAM. First I ran it without AA or AF:avg 29.759 min 19 max 47, then I put on 8xS AA and 16xAF: avg 29.669 min 19 max 46. This clearly shows that graphics in have not much effect on fps.
The only solution would be to make physics also reduce detail when the car is further away. Though this could make further away cars look weird.
Quote from geeman1 :The problem with the framerate drop when there are lots of cars in the screen at once is mostly because there is lot of physics that have to be calculated. Reducing graphics quality won't help much there.
I did some benchmarking with the LFSBench max settings and the replay. My computer is AMD Sempron 2800+, GF6600GT and 1GB of RAM. First I ran it without AA or AF:avg 29.759 min 19 max 47, then I put on 8xS AA and 16xAF: avg 29.669 min 19 max 46. This clearly shows that graphics in have not much effect on fps.
The only solution would be to make physics also reduce detail when the car is further away. Though this could make further away cars look weird.

Keep in mind that you're testing on a much, much faster video card compared to the on-board GeForce 32MB card that I did my tests on. I purposely tested this on a machine with a so-so video card because the people with the low-end stuff are the ones who need the most help getting every last fps they can. While AA/AF might not have a huge impact on frame rates using the 6600GT, it does have a huge impact on other video cards. I don't have the numbers handy, but on my Matrox Parhelia enabling AA/AF gave me a huge frame rate hit. Also, there's a big difference between simply enabling AA/AF and doubling (or halving) the number of polygons that are being drawn. The two are not really comparable at all.

Contrary to what you posted, I think my results are pretty conclusive that phyics is not the main thing that causes a frame rate drop since changing from cockpit to wheels view made the biggest difference in frame rate, and mirrors off made the second biggest difference. Both of those things have no effect on the physics calculations - they are purely display options. Other than the tests that turned LOD down to minimum, the same cars were on screen for every single test. The physics being calculated for each test would have been identical.

Edit: Using no FSAA and no filtering I was getting 20fps avg, 14 min, 34 max. Turning on FSAAx16 and Anistropic filtering reduced me to 10fps avg, 6 min, 16 max. Using 4X supersampling instead was slightly faster, but still a big drop from having it disabled. Using FSAA or AF (but not both) gave me 15fps average. Still a 25% hit from using nothing at all. This is with a Matrox Parhelia running at 3072x768. So, it's quite obvious that video card makes a HUGE difference in how much AA/AF affect frame rate.
Did you try the wheels only view with the wheels turned off? I believe its under options, one of the custom views.
Quote from Cue-Ball :I think you have this backwards, or I'm not understanding what you're saying.

Yep, you don't understand. I'm not talking about "user LOD" - found under Graphics, I'm talking about "dynamic LOD reduction" under Misc. It reduces the LOD when there is lots going on, and puts it back when everything calms down.

0.0 turns it off, 1.0 turns it on to maximum.

Basically it means everything looks pretty during most the race, but your framerate isn't quite as terrible at the start. Goign from 0.0 to 1.0 has doubled my FPS at the start of races, although it tends to turn cars into blobs.


@Geeman - I do believe that cars not so close to you run on a low-res version of the physics.
Quote from Bob Smith :Yep, you don't understand. I'm not talking about "user LOD" - found under Graphics, I'm talking about "dynamic LOD reduction" under Misc. It reduces the LOD when there is lots going on, and puts it back when everything calms down.

0.0 turns it off, 1.0 turns it on to maximum.

Basically it means everything looks pretty during most the race, but your framerate isn't quite as terrible at the start. Goign from 0.0 to 1.0 has doubled my FPS at the start of races, although it tends to turn cars into blobs.

I never even saw that option before! Why the heck isn't this under Graphics instead of Misc? I even read (okay, skimmed) the unofficial LFS manual and didn't notice that option. I'll give it a try and see how it affects my perf numbers.

Thanks!

Edit: Just tried this option and benchmarked with/without. I didn't notice a difference visually and my frame rate only went up 1fps on average (from 19.9 to 21.2). Not sure what the deal is, but it doesn't seem to do much for me, even set to the highest setting (1.0)

edit2: Pausing the screen on a high-action spot during a replay and adjusting the dynamic LOD on the fly, I can see the difference. But the ONLY thing that's affected is the number of polys used for wheels and tires. Everything else stays the same on my machine. The cars themselves don't look any different, nor does the track, even if I enable "Track LOD reduction". <shrug>
Cue-ball, I have to thank you for the work here. As I have a P4 2.5 which should be decently ok for running LFS, I only have 8 mb onboard graphics. So, ah, I'm pretty sure that my system is bottlenecking in the graphics area. Your numbers here really help out in my configuring of LFS graphically. I would like to see the same thing done with other settings such as the mip bias, dither, half texture, etc, etc. If I find the time this weekend, I'm going to do this same testing with all the graphics options so that I can maximize my frame rate to graphics ratio. Very nice work.

And the FPS hit at the start being because of the physics calculations of all the bunched up cars makes alot of sense.
Glad I could help out mrodgers. As noted in one of my very long posts turning off mip bias, dither, half texture, etc had virtually no effect on my test system. However, since you only have 8MB of video RAM, the texture options might help you more than they did on my test system.

If I could be so bold, I'd recommend you backup your current settings and then try the "minimum" benchmark settings (but turn mirrors on). If you don't get a substantial increase, it's not worth the effort of trying each individual option.
Tonight I played around with many of the settings that I wasn't sure which way to go, the MIP bias, Dither, Mip Filter, half texture, Vertical Sync and I didn't see any difference in any of these settings. I've been running all these settings at "yes" except for the Vertical sync. I have simple wheels and disable rubber set to mirror (rubber on the track is a must). I run in the wheels view and have the virtual mirror turned on. User LOD I slide about half way. I have all the rest of the options at minimum I think. One thing I found is I didn't have the dynamic LOD reduction turned on. I also have plain sky, but all HUD options turned on. The PC is a P4 2.5 with 512 mb ram and onboard 8 mb graphics (really need to replace that). I'm also running 1024x768x16.


My numbers:
Avg: 19.052 - Min: 10 - Max: 34

Testing things out, I left most of my settings alone except I turned on the dynamic LOD and the user LOD to minimum. Then I started to turn stuff off individually

MIP bias slider set to left: Avg: 20.575 - Min: 10 - Max: 36
Dither turned off: Avg: 20.868 - Min: 11 - Max: 37
MIP filter turned off: Avg: 20.958 - Min: 11 - Max: 37
half texture turned off: Avg: 20.557 - Min: 10 - Max: 36
Vertical sync turned on: Avg: 20.886 - Min: 10 - Max: 37

I tried turning the clouds in the sky on and was surprised at that:
Avg: 20.619 - Min: 10 - Max: 36
So I will have the clouds on from now on.

Hmm, I thought I ran the minimum cfg file from the benchmark site, but it doesn't seem to be in the log. I did just for S&G's run 640x480 to see what I'd get:
Avg: 34.522 - Min: 17 - Max: 71

One thing I noticed is I couldn't really see any difference in the look of any of these setting changes (other than the 640x480, man that looked horrible). I even ran 32 bit to see and it really didn't look much different.
Avg: 19.388 - Min: 10 - Max: 34

32 bit with low LOD runs about the same as I was originally. So pretty much I found the same as you did, Cue-ball. Though, I didn't see earlier where you said you changed the MIP, Dither, texture, etc. I breezed through your posts again before writing this and still didn't see it, LOL, the posts were quite long .

So, what did I get out of this? Just leave my settings alone illepall . Though I did learn that vertical sync should be on and that I can have the sky turned on as well without a hit in frames, whoo hoo!! I will take the little hit by not having my user LOD minimized, I just couldn't run like that. Of course these numbers are with the AI cars. In multiplayer, I get better frames than this. I usually see about 45 fps online, so if I take a 1 or 2 frame hit from what I figure by turning up the LOD just a bit, then so be it. I'm happy with that. Now if I could just get that graphics card here without Wifey knowing about it .

EDIT: Ah ha, I found it. This is actually the min cfg file numbers:
Avg: 34.522 - Min: 17 - Max: 71
what I posted above as the 640x480 figures. Here is for the lower resolution. Not a very good increase for the horrible looks:
Avg: 24.024 - Min: 11 - Max: 43
Quote from Cue-Ball :
edit2: Pausing the screen on a high-action spot during a replay and adjusting the dynamic LOD on the fly, I can see the difference. But the ONLY thing that's affected is the number of polys used for wheels and tires. Everything else stays the same on my machine. The cars themselves don't look any different, nor does the track, even if I enable "Track LOD reduction". <shrug>

No I've never seen it adjust the track LOD either. However it does certainly make the cars look worse, you just haven't taxed your system enough. Try a 20 car grid start and be in the middle of the pack. Cars tend to turn into great big blurry texture blobs to me. Looks god awful. But if it means the images on my screen aproach something like motion during race starts, that's good for me.
I haven't seen the "multiplayer speedup option" mentioned... I think it's in the same menu as dynamic LOD. With the "multiplayer speedup option" set on "on" a slider pops up where you can set the distance from your car, where the other cars show up... This helps a lot at the start if you set it a low value, you will only see perhaps 4 cars infront of you = more FPS... I use this a lot when reviewing league replays because it allows me to FF the replay 32x ...
Quote from Cue-Ball :Keep in mind... ...frame rate.

Sure GF6600GT is a lot faster than onboard GF2. But LFS is not very graphically demanding game. What this means is if you don't have powerful CPU it does not matter what video card you have, you still won't get high fps because of the all physics. For me it's just that situation, my GeForce can calculate all the graphics LFS can offer to it, but my CPU is limiting the fps to numbers I mentioned earlier.

You also may note that I have bought my computer with a budget in mind. I did not go crazy bying top of the line parts. I really don't get people who have slow computers and then they complain how the games won't run properly. If you are a serious gamer why not upgrade your PC, it is not that expensive.
Quote from geeman1 :But LFS is not very graphically demanding game. What this means is if you don't have powerful CPU it does not matter what video card you have, you still won't get high fps because of the all physics.

wrong wrong wrong.. yes they may be direct and one may slow down the other... but since patch G in S1 lfs has been more graphics card demanding

as for wheels being drawn in inside view; yes, they are.. (in all cars), so thats a huuuge thing that needs some working on, because if the cars besides open wheelers wheels are not drawn, that would help FPS so much
Quote from XCNuse :wrong wrong wrong.. yes they may be direct and one may slow down the other... but since patch G in S1 lfs has been more graphics card demanding

Yes LFS is now more graphics demanding than before, but it still is no match to new "modern" games. LFS does not have all new and fancy dx9.0 shaders and reflection stuff, it does not have ultra high resolution textures etc etc. You don't need the newest and most expensive video card to get over max 100 fps in LFS. But on the CPU side I am not sure that even the most powerfull CPU can handle the 20 car start without a fps hit.
I don't (fortunately) have major FPS problems (actually I can use 4xFSAA even that have over 2 years old machine) but what the "Haze Effect" does?
yeah i'd like to see an fx-57 or close in one of those starts inside the cockpit.
Quote from mrodgers :32 bit with low LOD runs about the same as I was originally. So pretty much I found the same as you did, Cue-ball. Though, I didn't see earlier where you said you changed the MIP, Dither, texture, etc. I breezed through your posts again before writing this and still didn't see it, LOL, the posts were quite long .

I didn't specifically turn those settings off, but the "min" settings for benchmarking turn them all off. Like you said, with everything turned off it looks horrible with very little in the way of frame rate gain.
Quote from Chaos :I haven't seen the "multiplayer speedup option" mentioned... I think it's in the same menu as dynamic LOD. With the "multiplayer speedup option" set on "on" a slider pops up where you can set the distance from your car, where the other cars show up... This helps a lot at the start if you set it a low value, you will only see perhaps 4 cars infront of you = more FPS... I use this a lot when reviewing league replays because it allows me to FF the replay 32x ...

The problem I have with the "multiplayer speedup" is, yea it would help the start of the race, but later on when everyone is spread out, you can have a spin up ahead somewhere and not see them sitting broadside in the middle of the track until they are right in front of you. Then you can't avoid them. I use to have this option turned on, but I've killed too many racers who spun not even very far in front of me and I hit them in the drivers door at 140 mph or so because I didn't see the car until the last minute. These are instant fatal accidents and I apologize to everyones families I've affected by having the multiplayer speedup turned on. Since I've turned it off, I haven't encountered one fatal accident on the track, only minor spins and bangs due to too close racing.
Quote from deggis :I don't (fortunately) have major FPS problems (actually I can use 4xFSAA even that have over 2 years old machine) but what the "Haze Effect" does?

Haze is a subtle one. It makes distant objects slightly lighter and less contrasted, i.e. seen through a thin "haze". The effect is only really noticable in large areas, like the Blackwood straight--turn it on and off and look at stuff that's far away to se the difference. It basically just makes distant objects look more distant, and lends a sense of "atmosphere" to the game.

I like it because it looks more realistic, and it also helps hide LOD effects.

FGED GREDG RDFGDR GSFDG