SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH4 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 02-01-09, 07:33 PM   #1
forhotc
Swabbie
 
Join Date: Feb 2008
Posts: 10
Downloads: 0
Uploads: 0
How to make a mod to massively improve performance?

Hi there, I'm just wondering is it possible to make a mod to massively increase the game performance (in terms of frames per second)?

My video card is fairly old, Nvidia 7600GS, and only the lowest graphics settings are actually playable. However, I always have this strange habit of tweaking the deck guns to fire at crazy rates (like 10 shots per second), but thanks for the poor video card, the actual firing rate is always a lot lower than that (like 2 or 3 shots per second), because it just can't display that fast. (CPU and RAM might not be so much of a limiting factor here: P4 3.0G and 4GB RAM)

So, could you guys provide some direction about: the aspects of the game that I can tune down that actually effect performance; ways of tuning them down, such as editing via S3D, changing values in some configuration files, removing under water rock/plant files, etc; If I need to use lower res texture, where I can find them or how do I make them...

I know the best possible "mod" is actually "buying a new video card", but Aussie dollar is so low at the moment and I'm going to wait until mid year to get the whole Intel i7 and video card upgrade.

Thanks a lot in advance.
forhotc is offline   Reply With Quote
Old 02-01-09, 07:51 PM   #2
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
Default

Try changing main.cfg in My Docs\SH4\Data\Cfg and set High res textures to lowres. I don't remember if this could be set in game.

[VIDEO]
..
..
TextureResolutionHigh=No

This will force the game to load any alternative lowres texture in the Textures\TLowRes folder. Obviously, if no lowres is available the highres is used. But you can downsample all highres textures yourself.

Other options are changing the render attributes "min/mag filtering" to point mode (iow. disable linear sampling), which should increase FPS, but the visual difference may make you turn it back again because of less nice texture scaling. The problem is there's hundreds of materials to change this individually for... o_O (but you could start with ie. interiors and see if it gives desired result of better fps at respectable quality)

Removing geometry gets a little more tricky and I can't give a general guideline, but removing underwater rocks f.ex. can be done safely, just delete child nodes under 'Adornments' in undersea.dat.

Last edited by skwasjer; 02-02-09 at 07:23 AM.
skwasjer is offline   Reply With Quote
Old 02-01-09, 11:54 PM   #3
gimpy117
Ocean Warrior
 
Join Date: Jul 2007
Location: Kalamazoo, MI
Posts: 3,243
Downloads: 108
Uploads: 0
Default

well If you have the dough...mod you computer (as in upgrade)
__________________
Member of the Subsim Zombie Army
gimpy117 is offline   Reply With Quote
Old 02-02-09, 09:56 AM   #4
vanjast
Sea Lord
 
Join Date: Jun 2006
Location: Somewhere else now
Posts: 1,739
Downloads: 825
Uploads: 4
Default

A video card with with a LOT of VRAM....
vanjast is offline   Reply With Quote
Old 02-02-09, 10:42 AM   #5
steinbeck
Frogman
 
Join Date: Mar 2008
Posts: 295
Downloads: 808
Uploads: 0
Default

Quote:
Originally Posted by forhotc
Hi there, I'm just wondering is it possible to make a mod to massively increase the game performance (in terms of frames per second)?

My video card is fairly old, Nvidia 7600GS, and only the lowest graphics settings are actually playable. )


I know the best possible "mod" is actually "buying a new video card", but Aussie dollar is so low at the moment and I'm going to wait until mid year to get the whole Intel i7 and video card upgrade.

Thanks a lot in advance.





Nvidia tweaks to SH3/SH4........ See this sticky in the other forum. I ran (until last week) exactly the same card as you and had very good performance. All sliders over to the right in 'Options' And all other options selected for 100% realism.
I never had to 'remove' plants or anything else. Used all the mods I wished to as
well.


Also you can search for another sticky which tell how to use the Nvidia Control Panel


steinbeck
steinbeck is offline   Reply With Quote
Old 02-02-09, 12:10 PM   #6
forhotc
Swabbie
 
Join Date: Feb 2008
Posts: 10
Downloads: 0
Uploads: 0
Default

Thanks for the reply skwasjer. Yes there's an option in game to use low res textures. After reading your post, I have quite a few questions here for you, hope you don't mind .

======================
Question 1:

I have very limited knowledge in 3D rendering, so I don't quite understand the part where you mentioned about "changing min/max filtering to point mode to disable linear sampling". Could you explain where and how I can change those "min/max filtering" attributes to point mode, please? And, if it's not very complicated, what is and how does linear sampling work (I googled but didn't find any useful result)?

======================
Question 2:

I've read your guide: "[TEC] SH4 models and texture maps". In the guide you mentioned that there are many passes when applying textures in SH4 (Diffuse + Specular + Ambient Occlusion/Dirt Map + Normal Map).

Using your S3D editor (awesome work!) to open .dat files, I can see there are attributes under the "UnifiedRenderControler" section, and their names sound like the ones controlling the texture rendering passes, but I would just like to double check with you: is this the right place to control rendering passes?



If they are indeed the attributes controlling texture rendering passes, are the following their correct usage?

BumpEnable - controlling whether or not to run the Normal Map pass?
SpecularMaskEnable - controlling whether or not to run the Specular pass?
SelfOccEnable - controlling whether or not to run the Ambient Occlusion/Dirt Map pass?

Caustics - is this part for controlling the rust texture on boats/subs only, or does it also control the damage texture after the boats/subs got hit by shells/torpedoes?

======================
Question 3:

Instead of opening all the .dat files for every object in the game, and change them one by one using S3D, is there any "main switch" somewhere in the game files or console commands that I can use to turn off all these passes at once?

Or, if there isn't any main switch, can I simply delete the texture files related to the passes that I don't want SH4 to render? e.g. Deleting all _O01 and _N01 files to prevent Ambient Occlusion/Dirt Map and Normal Map from rendering? (I don't know about 3D rendering, but in normal applications, deleting files may cause file not found exception being thrown, and as you know, catching exceptions are huge performance hits, do you think this is also the case in SH4?).

Or, does your S3D editor have any batch processing command line flags that can be used, to change the attributes in a batch?

If the answer for all 3 above is no, I will just use a program called AutoIT, which is a mouse and keyboard automation tool, and let it go for a while, eventually those attributes in every file will be changed.

======================
Question 4:

I don't mind about how bad the graphics look, so besides reducing the rendering passes, down sample textures, disable linear sampling, is there any other aspects that you think can be turned down to improve performance? (Removing geometry is too much effort, so I gave up on that one ).

======================

gimpy117 and vanjast:

thanks for the reply guys. I'm going to do exactly what you guys said in just a few months, new cpu, new vid card, and that old 7600 will be out of the window.

The actual reason I want to dive into all these graphics/performance tweaking though, is similar to my strange habit of tweaking deck guns, tweaking graphics to the lowest and fastest possible is fun, so I don't mind how bad the graphics will look .
forhotc is offline   Reply With Quote
Old 02-02-09, 12:27 PM   #7
forhotc
Swabbie
 
Join Date: Feb 2008
Posts: 10
Downloads: 0
Uploads: 0
Default

Thanks for the reply steinbeck. Yes I did read that "Nvidia tweaks to SH3/SH4" post. and just like you said, the 7600 runs this game fine (even with RFB or TMO mods applied).

However, I just like to find out how fast the game can run when firing deck guns at crazy rates.

(Somehow I don't really mind bad graphics, as long as the game play is good. Also, the process of tweaking the graphics is quite fun. It's a great learning and experiencing processs).
forhotc is offline   Reply With Quote
Old 02-02-09, 03:08 PM   #8
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
Default

1)
The game has 2 sampling techniques for scaling textures between mip levels:

- point (scale by nearest pixel)
- linear (scale by averaging bounding pixels (linear interpolation))

Some game objects use point, some use linear, depending on the situation.

The first method is faster, simple as that. While thinking about it, you could probably force this through the GFX driver. Make sure to 'force disable' (bi/tri)linear texture filtering in the nvidia applet.

In the game files, you can control this sampling mode on a per material basis (but as said it can be overriden by the driver).

2)
As far as the 'passes' is concerned, my info is not really 100% accurate but more a way to say, watch out for unnessecary overhead. All texture maps are mostly done in one pass. But additional processing passes are needed for lighting, post processing effects (line the grainy look).

However, the resource allocation (moving the maps into GFX memory) does add overhead, so by disabling bump maps for example, you let the game ignore that and as such less resources have to moved to the GFX card, less device state changes and thus better performance. Especially on low memory cards, this can save FPS.

I think there's also a global option to disable normals maps (bump maps) though so this is a bad example.

The UnifiedRenderControler indeed controls what 'technique' to use to draw the model(s). Caustics controls the additional pass of 'reflection of sun via waves/water' seen on the hull. Disabling this bypasses the caustics shader (this is an actual extra pass). The rust (dirt map) is combined with the ambient occlusion texture, so this can't be toggled seperately.

3)
I don't know if removing the textures causes a performance hit on 'file not found' type exceptions. But removing them is possible. I don't think you will get a crash. However, since the option to render them is left untouched, it may not result in a performance gain, but I can't confirm this.

There's no batch support as of yet.

4)
- Remove reflection models could help.
- Reducing particle generator rates (emit less particles per sec).
- Probably the best way gains can be had by simplifying the shaders and remove any redundant stuff that is only for pretty looks. Besides turning off the bump maps, specular maps, etc in the game files (this tells the game to ignore it), the shader code still supports those maps. By removing all the branch code and unnessecary computations, more FPS can be gained.

I could simplify some shaders for you but atm, my plate is filled with a couple of other requests, and S3D of course, so I can't promise anything on short notice.

Last edited by skwasjer; 02-02-09 at 03:30 PM.
skwasjer is offline   Reply With Quote
Old 02-02-09, 03:12 PM   #9
Wilcke
The Old Man
 
Join Date: Jan 2007
Posts: 1,441
Downloads: 234
Uploads: 0
Default

9800GT cards are going for under $100 and will solve your framerate issues. Tiger Direct or New Egg are your friends.
__________________
Wilcke


For the best in Fleet Boats go to: Submarine Sim Central. http://forum.kickinbak.com/index.php
Check out: A Brief Introduction to the Pacific Submarine War by Ducimus
http://www.subsim.com/radioroom/showthread.php?t=128185
Operation Monsun plus OMEGU, the #1 ATO Solution for SH4!

Signature Art by Gunfighter
Wilcke is offline   Reply With Quote
Old 02-02-09, 06:53 PM   #10
gimpy117
Ocean Warrior
 
Join Date: Jul 2007
Location: Kalamazoo, MI
Posts: 3,243
Downloads: 108
Uploads: 0
Default

actually look at the 4850...i got a 1 gig one for not that much on newegg...
__________________
Member of the Subsim Zombie Army
gimpy117 is offline   Reply With Quote
Old 02-02-09, 07:50 PM   #11
AVGWarhawk
Lucky Jack
 
AVGWarhawk's Avatar
 
Join Date: Jun 2005
Location: In a 1954 Buick.
Posts: 28,277
Downloads: 90
Uploads: 0


Default

I have to agree with the others. Your computer is only as fast as it's slowest part. This part in your case is the video card. As suggested, Newegg and Tigerdirect have great prices.
__________________
“You're painfully alive in a drugged and dying culture.”
― Richard Yates, Revolutionary Road
AVGWarhawk is offline   Reply With Quote
Old 02-02-09, 08:53 PM   #12
gimpy117
Ocean Warrior
 
Join Date: Jul 2007
Location: Kalamazoo, MI
Posts: 3,243
Downloads: 108
Uploads: 0
Default

tell me about it!!! my iffy proc is bottle necking my whole compy!!
__________________
Member of the Subsim Zombie Army
gimpy117 is offline   Reply With Quote
Old 02-03-09, 07:50 AM   #13
forhotc
Swabbie
 
Join Date: Feb 2008
Posts: 10
Downloads: 0
Uploads: 0
Default

Thanks again for taking the time to answer all my questions skwasjer.

Base on your suggestions, I'll try to disable only the caustics and dirt map first to see if there's any fps gain.

In the end of your post, you mentioned about removing reflection models, do you mean removing the light reflection effects on objects? Could you give me some hint about how and where I can remove them, please?

Also, you mentioned reducing particle generator rates, where can I do that?

Thank you so much for offering to simplify the shaders for me, really appreciated. Before you have time to take a look at it (no hurry though, your S3D weights so much more to the SH4 community than this thing), I guess I will muck around with them a little bit. Could you give me some info about which shader type (vertex shader or pixel shader) in SH4 has more responsibility for pretty looks and has more negative performance effects?
forhotc is offline   Reply With Quote
Old 02-03-09, 11:25 AM   #14
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
Default

Quote:
Originally Posted by forhotc
In the end of your post, you mentioned about removing reflection models, do you mean removing the light reflection effects on objects? Could you give me some hint about how and where I can remove them, please?
They are models used to render reflection in the water. Part of their name is 'reflect'. Removing each reflection node including children removes the reflection for said object and saves you an extra 'transparent' render pass for that object in the water, which can be expensive.

Quote:
Originally Posted by forhotc
Also, you mentioned reducing particle generator rates, where can I do that?
Inside particle generators you have options like MaxParticles and Creation>Rate (Particles per second). Thread lightly, because changing the values too far out of the 'designed' range can give unexpected/undesired visual effects. Removing effects/particle generators completely is obviously another option.

Quote:
Originally Posted by forhotc
Could you give me some info about which shader type (vertex shader or pixel shader) in SH4 has more responsibility for pretty looks and has more negative performance effects?
No definitive answer here. Environmental shaders is usually a good place to start, like clouds, water, foam. The UnifiedRender shader could help as well (specular/light computations).
skwasjer is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:48 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.