Author Topic: Improving performance  (Read 6940 times)

0 Members and 1 Guest are viewing this topic.

Offline neoterran

  • 210
Re: Improving performance
I get a crash at the end of mission load but not a descriptive one. Just crash to desktop (and since I have visual studio, a debugger asks me if i'd like to debug) It's only with Derelict so far as well. It happens on at least 2 different missions. It doesn't crash if i have dds mv_effects, but it does crash with mv_adveffects in dds. (this doesn't make much sense, because there is hardly anything in mv_adveffects that should affect derelict, but it is the case)
 It happened both with Steel's converted set and with my converted set. Steel's set has some other issues (about 5 corrupted non power of 2 textures in mv_effects) that were easily fixed, But with Derelict crashing I decided to make my own effects. Plus I wasn't sure if Steel's set had mipmaps (i don't have a tool that will tell me) So I thought I can make my own for some fun (that shows how much of a geek I am)

I seemed to pinpoint it to mv_adveffects, because everything will work with just mv_effects in dds.  I haven't actually tested with a pure set of mediavps yet, I've got left over additional tables and the like in my data folder, maybe that's messing it up. I'll test it and post a bug on mantis if I find one.

Update : This is turning into an adventure. The debugging build can't even get that far, it dies with an Max String lenght aassertion failure in ManagePilots.cpp. This is with Kara's 4/29 build. honestly, all the other mods seem to work well with this vp set. If anyone out there has a working set of dds vps (taylor...) please check them against Derelict SCP and with adveffects and tell me if you get an issue.

In the meantime, I can simply revert to a set with the old mv_advanced effects and have no issues in Derelict, so I guess I'll do a little experimenting see if I can shed some light on my own. I know i probably should just wait until the official dds vp + fixes (3.6.8 Omega ? lol) comes out, but I'm a glutton for punishment.
« Last Edit: May 03, 2006, 09:55:32 am 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
Derelict works perfectly for me.  But then I don't use the official MediaVPs anyway, I have my own set that I maintain (but don't distribute).

I'll grab the current mv_adveffects and Steel01's modifications and give the files a look over.  If I see anything I'll let you know.

EDIT:  Only looked at Steel01's so far, but other than the fact that some of the effect which need mipmaps most don't have them, there was nothing terribly wrong, other than the fact that pretty much everything was using DXT5 and taking up twice the memory that it should (as DXT1).  Though one of the effects is non-power-of-2, uncompressed DDS and it has mipmaps.  The having mipmaps part will crash on you so the code has to resize to power-of-2 before use and it can't do that will mipmaps.  This will either lead to memory issues (and crashes) when it tries to resize, or it will get to the video card and crash there.  NEVER create mipmaps for non-power-of-2 textures.  While technically not illegal by the specs, it does require driver/hardware and app support to use them without issue.  Just resize it to power-of-2, resave as DXT1 with mipmaps, and that one will be fixed.

The effect in question is explode1.eff:
explode1_0000.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1_0001.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1_0002.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1_0003.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1_0004.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1_0005.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1_0006.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1_0007.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1_0008.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1_0009.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1_0010.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1_0011.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1_0012.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1_0013.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1_0014.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1_0015.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1_0016.dds:       DirectDraw Surface (DDS), 112 x 102, 7 mipmap levels, RGB5A1
explode1.eff:            FS2_Open Effect Animation (EFF), DDS, 17 frames at 15 fps
« Last Edit: May 03, 2006, 10:52:14 am by taylor »

 

Offline neoterran

  • 210
Re: Improving performance
Hmm, this is all interesting.... I'm not sure how to convert anis to effs. Is there a site with a good tutorial on this ? Another question I have is, why are there duplicate files with both TGA and PCX in the mediavps ? Is there a reason for this ? Which one should be converted to DDS if there are both TGA and PCX versions ? Are there rules about reconverting existing compressed DDS files ? For example, to gain mipmap levels ? Or should this not be done ? Thanks in advance.... 
« Last Edit: May 03, 2006, 12:44:29 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
Hmm, this is all interesting.... I'm not sure how to convert anis to effs. Is there a site with a good tutorial on this ?
No real tutorial, but the EFF feature was initially setup to allow this easily.  Basically all you should have to do is use the ANI veiwer in Windows, export all of the frames to BMP with a filename like "exp20_" which will then create all of the frames like this "exp20_0000.bmp", exp20_0001.bmp", etc.  Then you can use nvDXT like "nvdxt -quality_highest -dxt1c -file exp20*.bmp" and that should convert all of the frames to DXT1 with full mipmaps and on the highest quality setting.  Then just create the EFF file itself.  Open Wordpad (it's safer this way since Notepad tends to add a .txt extension automatically) and set the required fields (look at an existing EFF to see what you need) and then save it as exp20.eff.

Someone should probably add that to the Wiki at some point, filling in the gaps from my description of the process.

Another question I have is, why are there duplicate files with both TGA and PCX in the mediavps ? Is there a reason for this ? Which one should be converted to DDS if there are both TGA and PCX versions ?
The TGA versions would only be used if you were using the -jpgtga option.  Because of this there are also PCX versions for the people who didn't turn on -jpgtga since otherwise they would get invisible ships.  But going with DDS works whether you use -jpgtga or not so you if you make the DDS files then you can remove both the TGA and PCX versions of the same image.

When converting to DDS always try to use the TGA when possible.  It will already have a proper alpha channel if it's needed and those you'll convert to DXT5.  If it doesn't have an alpha channel, or doesn't appear to need alpha, then convert it to DXT1.

Are there rules about reconverting existing compressed DDS files ? For example, to gain mipmap levels ? Or should this not be done ? Thanks in advance.... 
It's always going to be better to come from a TGA or uncompressed DDS.  However, I have seen very little degrading when resaving an existing compressed DDS.  It would help to only ever do that once though so it would be safe to make a backup copy of the images you are going to convert just to make sure you have something a bit cleaner to go back to.

 

Offline neoterran

  • 210
Re: Improving performance
Thanks for all this taylor. very informative.

I came across something interesting during my conversion.

I decided to start over from scratch and I noticed some of the dds files in the 3.6.8 mv_effects.vp exhibit some weird behavior (the format is listed as "format unknown", mip levels and size report ridiculously huge values, and there is no preview) These files also crash nvdxt on conversion. The files are : bomber-04-01a-shine.dds, bomber2T-01a.dds, cairo.dds. There may be a few more but those I double checked. Are these corrupt ?
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 decided to start over from scratch and I noticed some of the dds files in the 3.6.8 mv_effects.vp exhibit some weird behavior (the format is listed as "format unknown", mip levels and size report ridiculously huge values, and there is no preview)
Not sure, which files are they?  All of them are identified correctly for me.  Some of them are uncompressed DDS though and not DXT compressed.  Some of them are DXT3, though I wouldn't think that should be a problem.

These files also crash nvdxt on conversion. The files are : bomber-04-01a-shine.dds, bomber2T-01a.dds, cairo.dds. There may be a few more but those I double checked. Are these corrupt ?
They look fine to me, assuming we are checking the same files (I looked that the 3.6.8 VPs and Steel01's version).


Oh and one other thing on the ANI->EFF conversion that I didn't add before... I don't do it.  I let -img2dds take care of that for me for the simple reason that ANI is a highly lossy format and conversion will tend to always suck.  It's not just that it's a 256 color palette, but it's a single palette shared among all of the frames and that greatly reduces the quality of the animation as a whole.  Using -img2dds I get the easy choice of using the compressed files for normal play, and using the uncompressed files for screenshots or things like that.  I'm just waiting for someone to remake those effects so that we can get better color resolution out of it for better compression quality.

 

Offline neoterran

  • 210
Re: Improving performance
Something bad is occurring on my system when using vpmage to extract the files. I have seen some corruption to the dds occur (i can reproduce this as well) on my windows xp sp2 system, and it doesn't occur with quickvp. I'll let quickvp handle the creation of vp files from now on.

Thanks for all the hints taylor, appreciated.
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'm going to slog through this slowly and carefully one vp at a time.

This is kind of a *****, because you have to determine, should this be DXT1c, DXT5, or U888 format. and then you have the multiple PCX/TGA mix-n-match, although some PCX files only ! and vice versa. What have I gotten myself into...   

:headz:
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
Hehe. :) It's taken me quite a few months to get my VP set the way I want it.  I stopped using the official set last summer and have been slowly building and converting the files over to what I prefer (something optimized for 128meg video cards).  If you promise not to redistribute the VPs, I'll give you access to what I have.  They should be mostly rolled into the next VP set anyway so I don't feel as bad about letting them out.  BUT, as a VP set this will not be supported by ANYONE, and should NOT be redistributed.  Always use the official set if using the MediaVPs.

You can either use what I have the way I have it, or use it as a base for fixing your own files.  If you are interested then PM me and I'll get you the FTP address.  This isn't a free-for-all though so no one else bother asking for the files, I'll just ignore you.

 

Offline Cobra

  • 212
  • Snake on a Cain
    • Skype
    • Steam
    • Twitter
Re: Improving performance
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)

dude, do you even know what explorer.exe is? it's what enables you to freaking run your computer. without it, until you do a forced restart, you can just stare at everything on your desktop. tried stopping that .exe once, it wasn't pretty.
To consider the Earth as the only populated world in infinite space is as absurd as to assert that in an entire field of millet, only one grain will grow. - Metrodorus of Chios
I wept. Mysterious forces beyond my ken had reached into my beautiful mission and energized its pilots with inhuman bomb-firing abilities. I could only imagine the GTVA warriors giving a mighty KIAAIIIIIII shout as they worked their triggers, their biceps bulging with sinew after years of Ivan Drago-esque steroid therapy and weight training. - General Battuta

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
Re: Improving performance
Cobra, you can restart explorer.exe without rebooting.  Anyone who knows how to use the task manager knows that.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 
Re: Improving performance
Quote
dude, do you even know what explorer.exe is? it's what enables you to freaking run your computer. without it, until you do a forced restart, you can just stare at everything on your desktop. tried stopping that .exe once, it wasn't pretty.

No, if you kill the explorer.exe, part of the Shell still remains, that's why you can still see your desktop, and mostly the mouse pointer, when the Explorer shutdown itself in XP it mostly tries to re-initializate itself, not like in other Windows where your PC would freeze, one of the causes why XP requires more RAM than other older OS.

If your explorer.exe crash and doesn't restart (you're left with no Shell, of course), to restart it just press Ctrl+Alt+Supr, that will bring the Task Manager, now go to File, then "New Task (execute...)", and write "explorer.exe" (without the quotes), and you will save a restart to yourself and your PC...

Quote
I used a batch file to auto turn off all the services not needed during gameplay.

Does that Batch File (a *.BAT, right?) includes the auto-execution of the SCP ?, I always wondered if that was possible, it was possible for DOS to just force it to run a game and just only that, nothing else, I never tried with Windows...(sounds interesting...)
« Last Edit: May 04, 2006, 12:00:53 am by Shadow0000 »

 

Offline neoterran

  • 210
Re: Improving performance
no thread is complete without a little trolling.  :o

Shadow, the batchfile will launch the launcher last, and all i have to do is hit run on the launcher and it runs. If the launcher accepts a command-line parameter (such as launcher.exe /run or launcher.exe -run) you could completely automate it but I don't think that it does. I didn't actually try, my purpose was really just to batch a bunch of net stop and net start commands to turn off services on my machine to free up memory, and provide an easy way to turn them all back on again. It might be interesting to see if Taylor's new launcher will accept command-line switches/parameters for automated running (it would be nice if it does)

I found that by seriously stripping down my system, including not running explorer.exe which isn't necessary while running Freespace SCP, really reduces paging activity which is problematic in game for me. I don't want to sacrifice any quality at all running the game, so I'd rather do this, I'm quite comfortable killing explorer.exe, as a lightstep user from time to time  :yes:

As usual, those with 2 GB RAM and Athlon64 FX Dual Cores won't need to do this, so please don't come and crap all over the thread if you don't have to do it. I do.

« Last Edit: May 04, 2006, 12:03:18 am by neoterran »
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
Re: Improving performance
Quote
dude, do you even know what explorer.exe is? it's what enables you to freaking run your computer. without it, until you do a forced restart, you can just stare at everything on your desktop. tried stopping that .exe once, it wasn't pretty.

No, if you kill the explorer.exe, part of the Shell still remains, that's why you can still your desktop, and mostly the mouse pointer, when the Explorer shutdown itself in XP it mostly tries to re-initializate itself, not like in other Windows where your PC would freeze, one of the causes why XP requires more RAM than other older OS.

If your explorer.exe crash and doesn't restart (you're left with no Shell, of course), to restart it just press Ctrl+Alt+Supr, that will bring the Task Manager, now go to File, then "New Task (execute...)", and write "explorer.exe" (without the quotes), and you will save a restart to yourself and your PC...

Quote
I used a batch file to auto turn off all the services not needed during gameplay.

Does that Batch File (a *.BAT, right?) includes the auto-execution of the SCP ?, I always wondered if that was possible, it was possible for DOS to just force it to run a game and just only that, nothing else, I never tried with Windows...(sounds interesting...)

It could, in theory, at least pop up the launcher.  Whether you'd need to add in the command lines or not is a different question, of course, but the XP command line is certainly capable of launching a process in the same manner the linux prompt or DOS.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline Cobra

  • 212
  • Snake on a Cain
    • Skype
    • Steam
    • Twitter
Re: Improving performance
Cobra, you can restart explorer.exe without rebooting.  Anyone who knows how to use the task manager knows that.

here's the dude who doesn't. :nervous:

and Neoterran, since when was putting out misguided information  (at the time before Shadow0000 came into the thread) trolling?!
To consider the Earth as the only populated world in infinite space is as absurd as to assert that in an entire field of millet, only one grain will grow. - Metrodorus of Chios
I wept. Mysterious forces beyond my ken had reached into my beautiful mission and energized its pilots with inhuman bomb-firing abilities. I could only imagine the GTVA warriors giving a mighty KIAAIIIIIII shout as they worked their triggers, their biceps bulging with sinew after years of Ivan Drago-esque steroid therapy and weight training. - General Battuta

 

Offline neoterran

  • 210
Re: Improving performance
Cobra, you can restart explorer.exe without rebooting.  Anyone who knows how to use the task manager knows that.
Neoterran, since when was putting out misguided information  (at the time before Shadow0000 came into the thread) trolling?!

Quote
dude, do you even know what explorer.exe is?

The above quote is pretty much considered trolling by most messageboard's standards. Not that I particularily care, because that just seems to be your posting style. But I can still point it out. Especially when it was so ironic given the context of the post.
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 
Re: Improving performance
Quote
no thread is complete without a little trolling. 

I personally prefer a fishing rod and a lure, it's way more effective when you need to do some trolling. :lol:

-------------------------------------

Quote
t could, in theory, at least pop up the launcher.  Whether you'd need to add in the command lines or not is a different question, of course, but the XP command line is certainly capable of launching a process in the same manner as double-clicking an icon.

Well, yes once one configure the Launcher, the Command Line is still used even if the user executes the FS2.exe directly, In any case I would set the Batch to the FS2.exe (or CVS Build) ignoring the supposedly already configured Launcher...

 

Offline neoterran

  • 210
Re: Improving performance
Speaking of command lines, XP has a new commandline now from Microsoft called PowerShell. You can run it on Windows XP SP2 / Server 2003 SP1 or higher if you have .net 2.0 installed. It allows full scripting, and supports pipelining of objects, not just text. It's something that Windows has needed for a long time.
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 
Re: Improving performance
Supported Operating Systems: Windows Server 2003; Windows Server 2003 R2 (32-Bit x86); Windows Server 2003 Service Pack 1; Windows Vista; Windows XP; Windows XP Service Pack 1; Windows XP Service Pack 2
There is also a x64 version for 64-Bit Windows...

Seems a great tool, not surpresive that Microsoft take the idea from other OS like UNIX, but well...it was first called "Monad" which is the actual name of the scripting language...it's seems to be a fashion for companies to change products names in the last moments before the releases...

It seems that the link has dissapeared from Microsoft's WebSite...(only the Documentation is available), how they manage to make so many mistakes, they must be really brilliant or they put a lot effort on that...

  

Offline neoterran

  • 210
Re: Improving performance
From what I can see they have a very bureaucratic and monolithic structure with particularly bad management. But some very bright engineers working there.
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"