High detail shadows main cause of stutters?

General discussion about Rail Simulator that doesn't really fit in to any specific category. A good place to start if you're not sure what category it should fit in to as well.

Moderator: Moderators

User avatar
rabid
Very Active Forum Member
Posts: 1547
Joined: Wed Dec 12, 2001 12:00 am
Location: ...has left the building

High detail shadows main cause of stutters?

Post by rabid »

Apologies if this has already been thrashed to death, but I only now just realised after having used RS since it's release that High Detail Shadows are set by default to ON!
Having suffered from the stutters since the beginning, and even waxed lyrical on the subject regarding anti-aliasing settings, I am stunned that I have missed this before now.

I can confirm that setting High Detail Shadows to OFF and Low Detail Shadows to ON has all but eliminated the steady stuttering on my PC - RS is really smooth.
Now I can run with 8x Combined AA, 16x AF and all the other visual enhancements my graphics card has to offer. :bday:
I think it would be wise if RSDL set this as the default configuration, perhaps a good idea for Mk3? ;)

Now I have sorted this out I will be dipping in to RS a lot more, and investing in some more add-on packs.
I had a wail of a time with my 7 year-old son yesterday running a scenario from the US wagon pack in a beautiful super-smooth, stutter-free RS. :D

David.
Image
User avatar
3DTrains
Very Active Forum Member
Posts: 1090
Joined: Wed Nov 20, 2002 11:08 am
Location: Another Planet
Contact:

Re: High detail shadows main cause of stutters?

Post by 3DTrains »

Please, no. I mean no disrespect, but technology should move forward, and when you feel the need, then so should you. I can run most routes in triple digit fps, and have little or no stutters (IOW is a bit slower, but not by much). All settings are maxed with all shadows enabled at 1600 x 1200.
Cheers!
Marc - 3DTrains

Image
User avatar
rabid
Very Active Forum Member
Posts: 1547
Joined: Wed Dec 12, 2001 12:00 am
Location: ...has left the building

Re: High detail shadows main cause of stutters?

Post by rabid »

Wow, you must have quite an animal under the hood there Marc!

I am running fairly recent kit (Intel Q9550 / NVidia GX280) but the stuttering was not FPS related.
Others on this forum have reported stutters with up-to-date hardware since RS came out.

May I ask what OS you are using? I have been running on Vista x64 for a long time, but I installed Windows 7 beta last night and will give it a whirl, maybe it'll be better. Would putting good old XP back on make a difference?

Thanks.
Image
User avatar
overmarze
Very Active Forum Member
Posts: 3155
Joined: Fri Jul 15, 2005 9:29 pm
Location: Essex

Re: High detail shadows main cause of stutters?

Post by overmarze »

Windows 7 runs RS the best out of Xp Vista.

When RS came out i had Vista and Xp on dual boot up with no difference in fps.Bad performance.

But i put Windows 7 on here now i get hardly any stutters.

The Iow route is easy to run. Its the Paddingtod to Oxford that isnt so hard.

I can run the Iow 50 to 90 fps at full 1900 x 1200 full detail and full shadows.

Same with the Paddington to Oxford.

8gb of ram Ati 4870x2 2gb Intell dual core E8400 3ghz.
User avatar
maddog989
Established Forum Member
Posts: 343
Joined: Sat May 24, 2008 11:25 pm

Re: High detail shadows main cause of stutters?

Post by maddog989 »

mine only ever comes up as 14FPS :o and then it'll be smooth and running well or extremely stuttery!!??? lol.
Currently recreating Salisbury to Exeter 50s/60s.
almost all yard, trackwork, scenery and signalling complete salisbury - wilton. Trackwork 2013 standard to Gillingham, Older beyond. - Abandoned due to newer tools in subsequent TS versions.
User avatar
BadWhippet
Been on the forums for a while
Posts: 204
Joined: Sat Apr 26, 2008 2:11 am
Location: East Anglia

Re: High detail shadows main cause of stutters?

Post by BadWhippet »

I agree with rabid. It's true that detail of shadows really shouldn't make a difference on high-end PCs that exceed anything that existed when the game came out, but it does for me too. My PC is pretty well-specced, but I noticed last week during a usual bout of stutter that the game was making a meal out of rendering the shadows. Reducing them to low detail shadow has absolutely improved my performance too. It's still not perfect (there is still occasional stutter, possibly still connected with shadows) but it's a LOT better.

The stutter I'm getting is periodic but not related to fps (I maintain a steady 60-70fps even through stutter), it's not related to RAM (I always have over a GB spare even on busy routes), it's definitely not related to display settings (I've been through the lowest of options and still the same stutter), switching the game to a single core doesn't seem to make a huge difference and disabling EAX sound effects has also made no difference. Reducing the shadow detail is the only setting that has made any significant impact (and I still have a teeny bit of stuttering here and there).

For info, I have a dual-booting PC (XP 32-bit and Vista 64-bit) with RS installed on both. RS seems to run a little smoother in Vista 64-bit so switching back to XP might not be the best choice for anyone considering that. I'm interested in how Windows 7 performs!

Sue :)
__________________
PS: I'm now finding MSTS also has the same stutter! :o My late-2008 rig is not coping with a 2001 game?! I give up! Should have kept my Spectrum 48K and wonderful Amiga!
SUE | i7 3820 @4.1Ghz | 16Gb DDR | nVidia 580 3Gb | SSD +6Gb/s Data | still only 14fps! :D
Image
Fabulous photos from Ali (desiro5), Mark Walker (almark) and David Hennessey
User avatar
willburton
Established Forum Member
Posts: 407
Joined: Fri Mar 07, 2008 9:28 pm
Location: California

Re: High detail shadows main cause of stutters?

Post by willburton »

Fortunately I've never had any problems like this, and have everything set to maximum in the options.
I've got 4gb of ram, a dual core cpu. I forget exactly what the graphics card is a Nvidia Geforce 8800 GTX.
The OS is XP
Screen resolution is 1280x1024, and even with Maya, Max, and Photoshop running in the background there are no problems.

Can someone tell how to display the FPS? it doesn't appear to be displayed by any of the F keys.


Thanks,
Kevin
User avatar
RiscaStation
Very Active Forum Member
Posts: 1466
Joined: Fri Feb 24, 2006 7:52 pm
Location: Newport, South wales

Re: High detail shadows main cause of stutters?

Post by RiscaStation »

willburton wrote:Fortunately I've never had any problems like this, and have everything set to maximum in the options.
I've got 4gb of ram, a dual core cpu. I forget exactly what the graphics card is a Nvidia Geforce 8800 GTX.
The OS is XP
Screen resolution is 1280x1024, and even with Maya, Max, and Photoshop running in the background there are no problems.

Can someone tell how to display the FPS? it doesn't appear to be displayed by any of the F keys.


Thanks,
Kevin
Hi Kevin

Try "Shift and "Z" should display FPS in the top right of your screen. You may have to press "Z" again to start your engine.

Regards
Mike
User avatar
BadWhippet
Been on the forums for a while
Posts: 204
Joined: Sat Apr 26, 2008 2:11 am
Location: East Anglia

Re: High detail shadows main cause of stutters?

Post by BadWhippet »

willburton wrote:Fortunately I've never had any problems like this, and have everything set to maximum in the options.
I've got 4gb of ram, a dual core cpu. I forget exactly what the graphics card is a Nvidia Geforce 8800 GTX.
The OS is XP
Screen resolution is 1280x1024, and even with Maya, Max, and Photoshop running in the background there are no problems.
...Which makes me wonder now whether there's something else responsible rather than the RS game settings and hardware. Kevin, I had exactly the same spec as you (dual core, same screen res, same ram, processor, OS etc - though my nVidia was the lesser 8800GT) and RS had stutters on that PC too . That PC's motherboard died so I have a newer set of kit and I'm still getting periodic stuttering with or without top-end settings. It's not heavy stuttering any more, but I can't eliminate it completely either. Do you use any special nVidia settings to override the game's settings at all?

Now I've seen the same thing happening in the much older MSTS,I'm now eyeing my anti-virus software, Creative soundcards, network etc suspiciously!
SUE | i7 3820 @4.1Ghz | 16Gb DDR | nVidia 580 3Gb | SSD +6Gb/s Data | still only 14fps! :D
Image
Fabulous photos from Ali (desiro5), Mark Walker (almark) and David Hennessey
User avatar
Acorncomputer
Very Active Forum Member
Posts: 10699
Joined: Wed Oct 17, 2007 5:37 pm
Location: Horley, Surrey, (in a cupboard under the stairs)

Re: High detail shadows main cause of stutters?

Post by Acorncomputer »

Now I've seen the same thing happening in the much older MSTS,I'm now eyeing my anti-virus software, Creative soundcards, network etc suspiciously!
I still have MSTS loaded on one computer and occasionally dip in for a quick look and as you say, Sue, there is definitely stuttering/freezing where there should be super smooth action but I have not tried to find out the reason. I will try some small tests later with RS to see what effect reducing the the high detail shadows really does have. I have noticed, however, that stuttering usually occurs at the point where tiles join and particularly so where four tiles join, but it could still be the shadows causing the problem.

Having said that, however, the stuttering is now only a minor problem and with successive improvements to the software and hardware, the residual problems are not significant. There was a great improvement with the Mk2 upgrade and perhaps a Mk3 upgrade will bring more improvements.
Geoff Potter
Now working on my Bluebell Railway route for TS2022
RISC OS - Now Open Source
User avatar
BadWhippet
Been on the forums for a while
Posts: 204
Joined: Sat Apr 26, 2008 2:11 am
Location: East Anglia

Re: High detail shadows main cause of stutters?

Post by BadWhippet »

Geoff, gald you said that because I wondered about tiles, or at least wondered whether the game was moving on from one loaded map to another (I know nothing about making routes - yet) because I've noticed it happen when the route changes significantly, as when approaching a town perhaps. Even though the detail at distance is low, there is a noticeable pause when an new set of data seems to be loaded. If that's so, then that's stutter that cannot be avoided. Shadows took away my worst and I'm happily playing a smooth game again (mostly smooth)...

I'm now waiting for someone to yell: "Sue, just LIVE with the VERY OCCASIONAL stutter, dammit!!!" :x :lol:
SUE | i7 3820 @4.1Ghz | 16Gb DDR | nVidia 580 3Gb | SSD +6Gb/s Data | still only 14fps! :D
Image
Fabulous photos from Ali (desiro5), Mark Walker (almark) and David Hennessey
User avatar
paulz6
Very Active Forum Member
Posts: 2255
Joined: Tue Oct 18, 2005 4:22 pm
Location: Disused Railway Lineside Shack

Re: High detail shadows main cause of stutters?

Post by paulz6 »

Unfortunately I don't know anything about 3D graphics programming, and so cannot suggest any reasons which might cause visual delays.

I've got quite a bit of experience with data processing though. Unfortunately the biggest machine I have ever worked on only had 32 processing cores. Even at that, the software platform couldn't effectively use them all. Effective real-time multi-processing systems are difficult.

A lot of observations have been made that the stutters are due to the disk loading of tiles. This would make sense to me as disk reads are synchronous and will block the calling processing thread from doing any further work until the data is returned. Considering disk access times are around 7.5ms to locate a file, and RS is potentially having to load 7 tile files (over 50ms average access time), this would cause a noticeable visual stutter in a single threaded application. Non-synchronised disk writes are asynchronous. You write the data to an O/S memory buffer and let the O/S write it to the disk. The thread can continue processing. A disk read is synchronous, it it is not in the O/S memory cache you will have to wait for it to be read from the disk. The thread is blocked from further processing.

I think stutter due to this reason can be eliminated completely for PC's with more than one processing core. A possible solution is as I stated on another thread:
It requires a little multi-processor thinking, and since most new computers come with two cores these days, it is probably the way forward.
If you are accurately modeling an entire networks rail operations in real time, then all the rail network will have to be loaded into RAM. You only need to load up the scenery tile data around the camera though. Having a separate tile data manager thread would help. All it has to do is monitor the operators location and load up and drop data tiles in advance as the operator moves location. The tile data manager would be pre-loading the data requiring blocking synchronous disk reads. The block doesn't matter, the real-time processing threads can keep doing what they are doing without the synchronous wait, as long as the tile data manager thread loads the next tile data in advance of the real-time threads wanting to use them. I think this could be efficiently done without swamping the bus in a game of cache-line ping-pong, which is the real performance killer of real-time multi-processing systems.
User avatar
Acorncomputer
Very Active Forum Member
Posts: 10699
Joined: Wed Oct 17, 2007 5:37 pm
Location: Horley, Surrey, (in a cupboard under the stairs)

Re: High detail shadows main cause of stutters?

Post by Acorncomputer »

Hi Paul

It does all seem to come back to the same thing each time - software that can make efficient use of multi core processors.
Geoff Potter
Now working on my Bluebell Railway route for TS2022
RISC OS - Now Open Source
User avatar
paulz6
Very Active Forum Member
Posts: 2255
Joined: Tue Oct 18, 2005 4:22 pm
Location: Disused Railway Lineside Shack

Re: High detail shadows main cause of stutters?

Post by paulz6 »

Acorncomputer wrote:Hi Paul

It does all seem to come back to the same thing each time - software that can make efficient use of multi core processors.
It is very difficult, especially with real-time systems such as a simulator. There are a lot of issues to consider.

If you have one thread running on one core, it will happily process away. If you have two threads running on one core, it will time slice between the two (at one point a time slice was typically 50ms - that could lead to stuttering performance in itself depending on the nature of the application).
If you can have threads happily processing independent of each other on their own core, then two cores are twice as fast as one, and four cores are four times faster than one. However, more often than not you need to share some data and resources between the processing threads. Where that data is modifiable it needs to be protected with a thread synchronisation lock. This is where two cores are not going to perform twice as fast as one - when they are fighting each other for resources.

A while ago I ripped a simple spin lock out of the Linux kernel source code and did some user application space tests. With a spin lock (mutex), only one thread is allowed to lock the mutex at one time. The other threads will simply spin on it (continuously process against the lock) until it is free.
On a dual CPU machine, with one thread I got 1,000,000 lock/unlock cycles per second, or about 40 cycles per operation. With two threads running in contention against the lock, I got 100,000 lock/unlock cycles per second (400 cycles per operation). It was slower by a factor of ten! (and using twice the CPU!) This is due to cache-line ping-pong; the caches have to synchronise the state of the spin lock between each other when they are under contention. Memory cache speeds and bus speeds will have an effect here. Also, a thread can be time sliced out whilst it holds a lock, locking out all the other scheduled processing threads.

In short, multi-processing systems which frequently pass through contended thread synchronisation locks will be slower then their single threaded counterparts. Throwing more CPU's at the problem may just increase CPU usage with no performance benefit!

EDIT: I was performing the test on a 400MHz CPU, so at 40 cycles per operation the uncontended case would have been 10,000,000 operations per second. The 100,000 contended figure may still have been true though!
User avatar
Acorncomputer
Very Active Forum Member
Posts: 10699
Joined: Wed Oct 17, 2007 5:37 pm
Location: Horley, Surrey, (in a cupboard under the stairs)

Re: High detail shadows main cause of stutters?

Post by Acorncomputer »

Hi Paul

So even if the software can deal with multi-core processors, the battle for shared resources is more of a hindrance than a help.

I guess also that you only have one monitor and one graphics card so however fast the processing is up to then, outputting to the monitor is limited in speed as well.

Bring back the ZX80. Moving that single white pixel around the TV screen and pretending it was a train was actually quite exciting.
Geoff Potter
Now working on my Bluebell Railway route for TS2022
RISC OS - Now Open Source
Locked

Return to “[RS] General RS Discussion”