Author Topic: Improving performance  (Read 6935 times)

0 Members and 1 Guest are viewing this topic.

Improving performance
Here are my specs.
P4 2.8 GHz
512 MB RAM
Radeon 9700 128 MB

SCP stutters a lot and gets jerky after playing for a while.  If I upgraded to 2 GB RAM, would that probably fix these issues?  I'm going off of the assumption that the SCP is more memory-intensive than processor speed or video card quality.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Improving performance
If you aren't using it already then use the -img2dds cmdline option.  It will increase speed and help reduce overall memory usage.

What build you are running and which MediaVPs you are using also can help or hurt the problem.  Cmdline options in use can obviously make a big impact in performance as well.  Providing more info on those three things can help point out areas where you try to improve things.

 
Re: Improving performance
Let's see.....I'm actually running the 11/22 CVS build, and my VPs are dated October, so I guess that would be 3.6.7?
I'll try that command line option.

 
Re: Improving performance
Well, the game runs fine with that command line option, but.....some of the effects look horrible.  Is there no middle ground here?  Could this problem be solved simply by getting more RAM?

 

Offline Mars

  • I have no originality
  • 211
  • Attempting unreasonable levels of reasonable
Re: Improving performance
Mine runs five on 512MB, the command line shouldn't effect the graphics that much.

 

Offline neoterran

  • 210
Re: Improving performance
get a card with double the local video card memory... using img2dds makes the explosions and the nebulas look really artifacted and terrible... it really damages suspension of disbelief... main system ram doesn't seem to be the main issue here..
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 

Offline Flaser

  • 210
  • man/fish warsie
Re: Improving performance
I hope you realize those effects in the MediaVP already ARE in a DDS format (as they should).
The fact, that img2dds causes artifacts only shows that you're using earlier inefficient  or overdetailed tga effects instead the optimized dds ones.
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

 

Offline neoterran

  • 210
Re: Improving performance
i'm using whatever is in the mediavps 3.6.8delta plus many patches overriding it. img2dds definately affects the nebs and the explosions.
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Improving performance
As Flaser said, most of the MediaVP images are already DDS.  The new nebula graphics in the upcoming MediaVPs should also be DDS (they aren't currently).  It's extremely difficult to tell the difference in quality, I converted them myself and compared them in detail before accepting the compressed versions as a replacement.  And compression quality of -img2dds is directly linked to your video card, since it's doing the compression, so the quality that people see can vary between different video cards and driver versions.  For you it may not look very good, for someone else, they may not be able to tell the difference.  That will have little or nothing to do with that persons artistic eye, just the quality of their hardware.  If performance is unexceptable then sacrifice some quality to get better control (use -img2dds, or use -img2dds and -mipmap and then lower the "3D Hardware Textures" detail slider down a notch).  If you aren't willing to do that then don't come to us and complain about it being slow, fork over the cash to upgrade your hardware instead.

The main point of -img2dds here is to convert all of the big ANI files into DDS as well.  And if you (NeoBasilisk) are using the 11/22 build then that's too old.  There were several bugs with the -img2dds code, which among other things, caused it to use the faster and lower quality compression techniques.  Now it will try to get as much quality as possible out of the compression, since it's done only during mission load and won't hurt performance when you are actually in a mission.  Not only that but -img2dds will replace the old memory used by the ANI frames with the new compressed versions, which is anywhere from 4 to 8 times less than the original images were using.

And main system memory is an issue.  By the time you have Windows going, any services and apps running in the background, the good chunk of memory that FS2_Open itself will take up (even without any textures loaded), the sound effects, the bitmaps loaded into memory, and the texture memory that OpenGL is using (which can be AGP memory, video card memory, and/or system memory), you are going to have big performance issues due to paging.  To make full use of the current MediaVPs you need at least 1gig of RAM to really perform well.  Avoiding as many memory intensive cmdline options as possible and using -img2dds can reduce that requirement to 512meg.

 

Offline neoterran

  • 210
Re: Improving performance
I highly recommend to not have any on demand virus or spyware scanners going while you run the game either (ie, norton, symantec, nod32, or windows defender)
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 

Offline neoterran

  • 210
Re: Improving performance
Well, i've done some additional testing based on your recommendations in your post, Taylor. I managed to seriously increase the performance and reduce the first load hitching behavior by quite a bit, even on the most intensive missions. There were several improvements i made.  Remember, YMMV. The changes were :

1.) No Active AV/AS Scanners during gameplay
2.) Reduce overall number of services and background programs. This includes killing explorer.exe, which can use up to 80 MB of precious memory. I used a batch file to auto turn off all the services not needed during gameplay. By reducing the number of processes to roughly 16-18 and memory usage of windows to around 170 MB, I freed up enough memory for the game to run much better. This seemed to have the largest effect on the games performance, surprisingly. ( I have 900 MB of ram, around 650 was "available" for the game. I'm using all effects in the mediavps, except for high shockwaves instead of super high. Graphics cards settings : 4x AA and 4x AF. Unusually, these have less of an effect on performance than they do in newer games and they make it look alot better. This is probably related to the lower number of polygons in Freespace compared to contemporary games)
3.)  I reduced my AGP cards latency using PCI Latency Tool 3.1 from 248 to 64. Many sites and users claim there is a performance gain to be had from doing this, although I did not notice much of one, and I'm still testing this as I'm skeptical as to its' improvement. Implement this at your own risk. The idea behind this is that the AGP device takes too long with such a long latency value, and thus creates a queue for other PCI devices such as the soundcard etc, which drives up CPU usage and lowers performance of the system. I am aware that the AGP is on it's own bus, but these sources insisted that even so, it can effect other devices.
4.) I used refresh force to make sure the refresh rate was at maximum (100hz) this increased the frame rate from 60 frames/sec average to 100 frames/sec average. Vsync was left on so as to avoid tearing (it's really bad with Freespace)
5.) enabled img2dds (see below)

Following the above steps gave me a much smoother ride, and to my surprise, step #2 was the biggest factor. I still have some slight hitching on the first load of textures in a mission but it is nowhere near as bad as it was. It seems main system RAM usage is much more important in this game than I thought.

I also enabled img2dds, as I realized I was being overly nitpicky and critical about the nebula quality loss. It's not as bad as i had thought because you can only notice the difference if you really go looking directly for it. Even the explosions aren't as bad as I thought. I would however, prefer we have a hard set of DDS nebulas rather than leaving the conversion up to the graphics card. I think that they'd probably end up being higher quality that way as the conversion can be done with a dedicated converter that might be better at it than having different graphics cards do it.

To sum up, I recommend following steps 1, 2 and 5 for the majority of users. It is possible to improve performance of the game if you're willing to experiment with your system's configuration.
« Last Edit: April 30, 2006, 03:01:08 pm by neoterran »
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Improving performance
I would however, prefer we have a hard set of DDS nebulas rather than leaving the conversion up to the graphics card. I think that they'd probably end up being higher quality that way as the conversion can be done with a dedicated converter that might be better at it than having different graphics cards do it.
Yep, it does look a good bit better that way.  Using NVIDIA's cmdline tool to do the conversion, with it's highest quality setting, makes some really nice images.  It does still produce artifacts but they tend to at least blend in better and not be so noticable.  This is something that the next 3.6.8 MediaVP set should take care of.  I have already converted anything that wasn't ANI to DDS for my own MediaVP set and WMCoolmon has those changes.  About 95% of those are compressed DDS and the others are uncompressed due to too much quality loss, but still DDS so that it's already got full mipmaps.

-img2dds is for those ANI graphics which haven't been converted to EFF and so that you can use JPG/TGA graphics without having to use -jpgtga, in case the memory usage is too high.  And we are probably going to remove -jpgtga and have it always enabled anyway, since we now have -img2dds which can be used to reclaim that memory.

And also don't forget that -img2dds can create full mipmaps for you if you use the -mipmap option as well.  This can improve performance, especially on explosions and things like glowmaps.  Mipmaps do look much better when you use trilinear filtering (which is a registry option) but that will be enabled by default with my next OpenGL upgrade.  Enough people have complained that I think it being default is warranted, and the option will instead just allow you to use bilinear filtering which looks worse.

 

Offline neoterran

  • 210
Re: Improving performance
taylor, what's up with the dds set of vps that Steel01 posted in the 3.6.8 Delta thread ? I tried to use these but they caused problems with some campaigns (like derelict) and so I reverted to my normal set. Can I try to convert these textures to dds myself ? Should i use DXT3 or DXT5 ? Auto-Generate mipmaps or no ? I'm just trying to squeeze all the performance I can out of my setup
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Improving performance
taylor, what's up with the dds set of vps that Steel01 posted in the 3.6.8 Delta thread ? I tried to use these but they caused problems with some campaigns (like derelict) and so I reverted to my normal set. Can I try to convert these textures to dds myself ? Should i use DXT3 or DXT5 ? Auto-Generate mipmaps or no ? I'm just trying to squeeze all the performance I can out of my setup
I'd already converted everything to DDS before Steel01 started posting those so I never even gave them a look.

You can convert them yourself if you like.  If an image has an alpha channel you will want to use DXT5, but if it doesn't you need to use DXT1c (that's DXT1 without 1-bit alpha).  The DXT5 version of a TGA will use 4 times less memory, the DXT1 version will use between 6 and 8 times less memory.  You will want to make mipmaps for as many images as possible but know that mixing images which have mipmaps with ones that don't, on the same model, will tend to look bad.  The existing DDS images tend not to have mipmaps so you would basically have to reconvert some of those to avoid some minor graphical strangeness.

A few of the graphics don't look good compressed so you might want to make them uncompressed DDS instead (u8888/u888 or something like that) to keep the full quality but still get the mipmaps out of it.  What an uncompressed DDS is called depends on what you use to save the DDS, but generally, if it's not a DXT format then it's uncompressed.

And a quick note on converting PCX images, you will probably have to convert them to RGB color instead of index color before you will be able to save them as DDS.  Some DDS converters may tell you this, others will just refuse to save.

 

Offline neoterran

  • 210
Re: Improving performance
Thanks that's very helpful, Taylor. I'm using nvDXT (latest version) to do the conversions. I think steel used all DXT 5 and there were some non-power of 2 issues / corruption so I'm going to experiment with some of my own dds conversions. it'll be interesting to see how these hold up to the next version of the mediavps (which I assume will incorporate all these revisions and more.

Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Improving performance
When using nvDXT just be sure to use the -quality_highest option so that you get the best visual results.  It makes a noticable difference in image quality, though it does make the conversion process slightly slower (but no difference to the game).  Also, you can use the -dxt1c option when making the DXT1 images so it won't use alpha.

As far as the non-power-of-2 issues go, compressed images have to be power-of-2 or the game won't load them.  Non-compressed DDS don't have to be power-of-2, as long as they don't include mipmaps.  I have an upcoming code update for OpenGL which will allow you to use non-power-of-2 DDS for the interface graphics and they won't have to be resized to power-of-2 to display (like they do now).  Since DDS images, compressed or not, will work even if you don't use the -jpgtga option you can convert any hi-color interface graphics (splash screens, loading screens, etc.) to uncompressed DDS and they will always be used.  This way you wouldn't need to make both PCX and TGA versions.  Those non-power-of-2 images will only work fully for the interface graphics though and not any ship textures or effects.  But that restriction does't hold true for users whos video cards support the "GL_ARB_texture_non_power_of_two" extension since they get to use non-power-of-2 images for pretty much anything.

Oh and -img2dds has no affect on uncompressed DDS so you can convert everything to DDS, choose the best quality you need whether it's compressed or not, and even if you use -img2dds it won't make changes to those images.  I made it this way so that the artist still has some control over quality and if they converted to uncompressed DDS then there is likely a reason that they did so.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: Improving performance
And a quick note on converting PCX images, you will probably have to convert them to RGB color instead of index color before you will be able to save them as DDS.  Some DDS converters may tell you this, others will just refuse to save.
Odd.  I've done numerous conversions for TBP, and Photoshop has never complained about that.  I've converted from pcx and bmp.  It will warn me about the power-of-2 issue, a mistake I've only done once.
The Trivial Psychic Strikes Again!

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Improving performance
And a quick note on converting PCX images, you will probably have to convert them to RGB color instead of index color before you will be able to save them as DDS.  Some DDS converters may tell you this, others will just refuse to save.
Odd.  I've done numerous conversions for TBP, and Photoshop has never complained about that.  I've converted from pcx and bmp.  It will warn me about the power-of-2 issue, a mistake I've only done once.
I should have added "Some will work fine."  ;)

I've had it all three ways, depending on what software I was using at the time.  Of course with some of the plug-ins for DDS support it can be version specific as to whether it's an issue or not, with the older versions having the issue which was then fixed.  GIMP for instance will complain about it needing to be converted to RGB, but also gives you the option to do so.

 

Offline neoterran

  • 210
Re: Improving performance
Derelict SCP doesn't seem to like dds files in mv_adveffects for some reason....
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Improving performance
Why? What happens?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]