Page 1 of 16

Graphic stuttering

Posted: Sat Jan 23, 2010 12:09 am
by chimboro
I have noticed that my game stutters a lot as I pass scenery which contains dense foliage. Does anyone have any ideas on how to set up ingame graphical settings or graphic card settings to lessen the impact of foliage on frame rates/ stuttering?

Re: Graphic stuttering

Posted: Sat Jan 23, 2010 7:10 am
by ckmemphis
chimboro wrote:I have noticed that my game stutters a lot as I pass scenery which contains dense foliage. Does anyone have any ideas on how to set up ingame graphical settings or graphic card settings to lessen the impact of foliage on frame rates/ stuttering?
I think the first question is this: What type of machine are you running? What spec t\do you have under the bonnet? Also, what type of graphics card are you using?

Re: Graphic stuttering

Posted: Sat Jan 23, 2010 8:40 am
by SaMa1
I think there is some kind of stutter between tiles no matter what computer you are using. I think its caused by loading all tile objects instantenously. For future updates I would recommend rewriting the loading routine so that objects are loaded gradually beginning from lowest detail LOD thus this loading "pause" would be equally divided and far less noticeable.

Re: Graphic stuttering

Posted: Sat Jan 23, 2010 9:57 am
by bremen
I have noticed that my game stutters a lot as I pass scenery which contains dense foliage.
I have done some tests on this subject and i'm fairly sure is a problem releate to the shaders. In one of my tests i'm able to push my radeon 3870 to 66% activity with a single tree in an empty land... and this is bad.

A simple question for RS.com...

RW needs a DX9 videocard with pixel and vertex shader model 3... so why 3/4 of the shaders are compiled to run on a DX8 capable video card with pixel and vertex shader 1.1? (1.1 has a list of limitations good for a 2002 games.. not for a modern 3d engine.) :roll:

Re: Graphic stuttering

Posted: Sat Jan 23, 2010 10:14 am
by RSderek
Things evolve.

Re: Graphic stuttering

Posted: Sat Jan 23, 2010 10:32 am
by miglietto
RSderek wrote:Things evolve.
Does this mean that the issue has been already fixed and available in the next patch ?

Re: Graphic stuttering

Posted: Sat Jan 23, 2010 10:38 am
by RSderek
Nope.
However, we are always looking at ways to increase performance.

I was responding to the question about shaders.

regards

derek

Re: Graphic stuttering

Posted: Sat Jan 23, 2010 10:43 am
by Bullet399
RSderek wrote:Things evolve.
Sorry Derek

but those answers are not fish nor flesh, so...

in most cases i feel a little bit ridiculed

Re: Graphic stuttering

Posted: Sat Jan 23, 2010 10:45 am
by RSderek
bremen wrote:A simple question for RS.com...

RW needs a DX9 videocard with pixel and vertex shader model 3... so why 3/4 of the shaders are compiled to run on a DX8 capable video card with pixel and vertex shader 1.1? (1.1 has a list of limitations good for a 2002 games.. not for a modern 3d engine.)
Things evolve.

Fleshed out version:

Kuju shaders evolved over time, some materials don't need pixel shader2 some of the later fx ones do.

regards

Derek

Re: Graphic stuttering

Posted: Sat Jan 23, 2010 11:19 am
by vlado960
Perhaps the answer is here (Paul Jackson Interview 2009):
So with that in mind we have been developing new Career and Achievement modes that will make your sim driving life more real. We hope to upgrade RailWorks with that in November. More importantly, we are working on a new driving interface that will really allow you to forget the hardware and feel like your there. Early usability testing has demonstrated how simply compelling this will be.
Well, it's end of January now :roll:

Re: Graphic stuttering

Posted: Sat Jan 23, 2010 1:19 pm
by bremen
Things evolve.
I'm not a coder of shaders (i'm doing something based upon a code and a simulation but in a complete different sector) but i'm a Boffin in a specific branch of science where the term Research has a meaning and where if something today is blu, tomorrow will be less blu and more green and the day after.. will be something new..and so on... 8)
some materials don't need pixel shader2
OK.. :D

"The latest DirectX 9 class hardware supports more advanced shader models, older hardware (DirectX 8 Level) much simpler profiles named vs_1_1 ps_1_3 / ps_1_4 with more limitations in the amount of instructions and capabilities."
http://www.bitmanagement.com/developer/ ... hader.html

Pixel and vertex shader have limits... limits like the number of textures slots, arithmetic functions slots and so on.

Image

What is a pixel shader?
"A pixel shader is a computation kernel function that computes color and other attributes of each pixel. Pixel shaders range from always outputting the same color, to applying a lighting value, to doing bump mapping, shadows, specular highlights, translucency and other phenomena. They can alter the depth of the pixel (for Z-buffering), or output more than one color if multiple render targets are active. A pixel shader alone cannot produce very complex effects, because it operates only on a single pixel, without knowledge of a scene's geometry or of neighboring pixels."
http://en.wikipedia.org/wiki/Pixel_shader

if i do a shader with Pixel and Vertex model 1.1 i have these limits.
Pixel Shader slots -> ps_1_1 -> 4 texture + 8 arithmetic

The same shader but compiled to run on a ps 2.0 has these limits.
Pixel Shader slots -> ps_2_0 -> 32 texture + 64 arithmetic

Shader model 3.
Pixel Shader slots -> ps_3_0 -> 512 minimum, and up to the number of slots in D3DCAPS9.MaxPixelShader30InstructionSlots. See D3DPSHADERCAPS2_0.

The minimum number of SLOTS for ps3 are 512.. so 512 textures, colors, bump map etc. che be manipulated one after another withour requesting more hardware shader unit...

http://msdn.microsoft.com/en-us/library ... 85%29.aspx

So if an object has 5 textures and a shader model 1.1, the Unified shader engine on a modern videocard has to do 2 pass to apply the shader or use 2 different shader units, loosing half of the compute power in the process. Right?
With a ps_2 the same objects is done in 1 pass..
What happen if i have 100 objects all with the 4 texture slots limits? A mess...

Vertex shader.
"Vertex shaders are run once for each vertex given to the graphics processor. The purpose is to transform each vertex's 3D position in virtual space to the 2D coordinate at which it appears on the screen (as well as a depth value for the Z-buffer). Vertex shaders can manipulate properties such as position, color, and texture coordinate, but cannot create new vertices. The output of the vertex shader goes to the next stage in the pipeline, which is either a geometry shader if present or the rasterizer otherwise."

Vertex shader - Maximum number of instruction slots
vs_1_1 128
vs_2_0 256
vs_3_0 512 minimum, and up to the number of slots in D3DCAPS9.MaxVertexShader30InstructionSlots. See D3DCAPS9.
http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Same as above.. more instrucions slots = better use of the current hardware.

If i have 512 instructions to be processed.. is better to use 1 hardware shader engine capable of 512 slots or 1 with only 128 slots? Of course the first is better because if i have 320 engine (like my 3870) capable to run 512 instructions at the same time but the shader is the old 1.1, it' takes 4 more time to compute the same thing... so when the GPU reach 100% start ditching frames and the result is a lagging movement.
This is more visible in motion. In my case there are 15-20 fps less, looking to an objects standin still or in movement..

"Early shader models (Shader Model 1.x) used very different instruction sets for vertex and pixel shaders, with vertex shaders having much more flexible instruction set. Later shader models (2.x and 3.0) reduced the differences, approaching Unified Shader Model."

"Unified Shader Architecture"
"Unified Shader Architecture allows more flexible use of the graphics rendering hardware [2]. For example, in a situation with a heavy geometry workload the system could allocate most computing units to run vertex and geometry shaders. In cases with less vertex workload and heavy pixel load, more computing units could be allocated to run pixel shaders."

To conclude...
My idea is that the use of an older shader model with big limitations is what is causing the lag when there aren't other things involved (loading routine.. the speed of the HD...etc)

I know that there are hundred of things requested by the community.. hundred of.. i want this i want that.. but the shaders are fondamental.. like the Distant Moutains... that, of course, are done by a shader.. DistantTerrain.fx :wink:

regards

Re: Graphic stuttering

Posted: Sat Jan 23, 2010 1:24 pm
by Acorncomputer
In practical terms, you can get a better performance from RW by turning off the shadows or lowering the levels in the options window. The difference is noticeable even with all other settings left at max.

Re: Graphic stuttering

Posted: Sat Jan 23, 2010 6:24 pm
by vlado960
Acorncomputer wrote:...you can get a better performance from RW by turning off the shadows or lowering the levels in the options window...
You must be kidding :x

Re: Graphic stuttering

Posted: Sat Jan 23, 2010 6:35 pm
by Acorncomputer
vlado960 wrote:
Acorncomputer wrote:...you can get a better performance from RW by turning off the shadows or lowering the levels in the options window...
You must be kidding :x
No

Re: Graphic stuttering

Posted: Sat Jan 23, 2010 8:16 pm
by vlado960
Acorncomputer wrote:
vlado960 wrote:
Acorncomputer wrote:...you can get a better performance from RW by turning off the shadows or lowering the levels in the options window...
You must be kidding :x
No
Do you mean that I buy powerfull hardware and put settings to low? Is it solution? :wink: