Author Topic: ANI Particles Causing Massive FPS Drop  (Read 5386 times)

0 Members and 2 Guests are viewing this topic.

Offline Trivial Psychic

  • 212
  • Snoop Junkie
ANI Particles Causing Massive FPS Drop
This has been reported a couple times in the Media VP thread, but I've just posted a Mantis bug-report and felt that it could do with a bit of combined exposure here.  The main problem reported was that the Hornet missile was causing a massive FPS hit.  I had a hunch that it was the particles in its exhaust that were the problem, since its the only missile that has them.  In idle conditions, I was getting about 60 fps, but firing off a double-fire volley of Hornets was bringing my FPS down to less than 10.  I extracted the modular table file from the effects MVP, and commented out the Hornet's particles, and the slowdowns went away.  Unfortunately, I get the same slowdowns with impact particles too.  Since both particles are ani, I'm thinking that there's something wrong with how anis are dealt with as effects.

I'm using 3.6.8 Zeta MV_Core, Textures, Effects, and Models, as well as the corresponding 710 patches, and I run on latest CVS, which is 2006/11/15 at this point, but I encountered this with 11/07 as well.  I haven't done a comprehensive check of all builds to see what builds aren't effected.

BUG 1154
« Last Edit: November 23, 2006, 10:13:16 pm by Trivial Psychic »
The Trivial Psychic Strikes Again!

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: ANI Particles Causing Massive FPS Drop
how big are the ANIs?
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: ANI Particles Causing Massive FPS Drop
Its a known bug.. Exists only in CVS HEAD tree. And afaik fix already exists but just isnt committed to cvs. 
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: ANI Particles Causing Massive FPS Drop
how big are the ANIs?
Only 8 or 9 KB.
The Trivial Psychic Strikes Again!

 
Re: ANI Particles Causing Massive FPS Drop
I get the same issue.  I get 90 FPS normally (VSYNC is on, refresh rate is 90Hz), but God forbid I look at my wingmen fire off a volley of hornets at a capital ship.  I get maybe 2FPS and the game is completely unplayable.  It goes away if I turn away.  I'll see if I can get a Fraps video of the game later (though frame rates will be lower when recording, you'll get an idea of what's going on).
For great justice.

 
Re: ANI Particles Causing Massive FPS Drop
http://www.meikathon.net/FS2ChoppyMissiles.wmv


Youtube (lower quality): http://youtube.com/watch?v=DBelWShicxQ



C:\Games\FreeSpace2\fs2_open_r-P420061115.exe;
game_flags = -ambient_factor 75 -fov 0.50  -spec -glow -env -jpgtga -mipmap -missile_lighting -cache_bitmaps -dualscanlines -targetinfo -rearm_timer -ballistic_gauge -3dwarp -warp_flash -snd_preload -loadallweps -alpha_env -fps -pos -stats -coords -show_mem_usage ;
active_mod = mediavps;

Latest VPs from the installer.

Windows XP Pro x64
Athlon 64 4000+
VIA KT880
All-In-Wonder X800XT
Sound Blaster Audigy 2 ZS
SATA 7200RPM HDD

All drivers up to date.


Remember the video doesn't show just how dramatic the effect is.  Since Fraps was recording, I only got around at 20 FPS max, while I normally get 90FPS.  In BOTH cases it drops down to below 5 FPS and becomes completely unplayable when I watch my wingmen shoot off those missiles.  When I turn away, the frame rate goes back up.
For great justice.

 
Re: ANI Particles Causing Massive FPS Drop
Oh so THIS is what's causing this damn mess.
Been trying to play over the last few days and got this 5 fps rubbish, thought my hardware was screwing up.

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Re: ANI Particles Causing Massive FPS Drop
This really should have been fixed a while ago. I think the exact problem has been known for at least a month now and it has made a lot of builds essentially useless.

Just stick with one of the RC7 builds for now. I am using the dot9 build and haven't run into this issue.
« Last Edit: November 25, 2006, 11:17:08 am by CP5670 »

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: ANI Particles Causing Massive FPS Drop
To be honest I doubt that most of the people complaining should even be running CVS builds in the first place. Unless you're using the new team loadout (I can dream! :D) or WMCs newer version of the scripting or a few other features there isn't much good reason to be running CVS instead of 3.6.9.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 
Re: ANI Particles Causing Massive FPS Drop
Where's this RC7dot9 build?  looked and only found a link to an August build.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: ANI Particles Causing Massive FPS Drop
Where's this RC7dot9 build?  looked and only found a link to an August build.
The newest incanation is this one: http://icculus.org/~taylor/fso/testing/rc7dot9x.rar

 

Offline Mars

  • I have no originality
  • 211
  • Attempting unreasonable levels of reasonable
Re: ANI Particles Causing Massive FPS Drop
Can I get it for Linux?  :D

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: ANI Particles Causing Massive FPS Drop
Can I get it for Linux?  :D
I suppose... http://icculus.org/~taylor/fso/testing/fs2_open-3.6.9-7dot9x.tar.bz2   :)



And before someone asks:  No, there will not be an OS X build.  There are several OS X specific issues that I want to look into before uploading a new build for the Mac.

 
 

Offline Mars

  • I have no originality
  • 211
  • Attempting unreasonable levels of reasonable
Re: ANI Particles Causing Massive FPS Drop
Can I get it for Linux?  :D
I suppose... http://icculus.org/~taylor/fso/testing/fs2_open-3.6.9-7dot9x.tar.bz2   :)



And before someone asks:  No, there will not be an OS X build.  There are several OS X specific issues that I want to look into before uploading a new build for the Mac.

Thank ya  :D :yes:

 

Offline Flaser

  • 210
  • man/fish warsie
Re: ANI Particles Causing Massive FPS Drop
I wonder why we use ANIs to begin with IIRC using DDS compression is the way to go (and I always forget the format name the team came up with for the animated version).
"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 Trivial Psychic

  • 212
  • Snoop Junkie
Re: ANI Particles Causing Massive FPS Drop
You're thinking of EFFs, and AFAIK they aren't always more efficient.  Now, if you were to make 2 different EFFs, both using the same specs and the same sized images, except one used 24-bit DDS and the other used 8-bit PCX, the DDS one would definitely be the better choice, as the PCX files within an EFF are treated the same as PCX textures and are expanded into 16-bit memory.  The 8-bit PCX files within an ANI however, stay as 8-bit in memory so they take up less space.  What it comes down to, is if a compressed 24-bit DDS image takes up more memory than an uncompressed 8-bit PCX image.  If the answer is "NO", then ANIs still have their uses when it comes to small animations, but for things like shockwaves where you want a large range of colors and DDS-based EFF would be the format of choice.
The Trivial Psychic Strikes Again!

  

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: ANI Particles Causing Massive FPS Drop
The 8-bit PCX files within an ANI however, stay as 8-bit in memory so they take up less space.
Incorrect, most ANIs are converted to 16-bit images for each frame.  Only ANIs which have no color information will stay 8-bit, which pretty much only applies to talking head ANIs.  Talking head animations can't be EFFs anyway though so it's not really an issue.  Talking head animations also aren't used like effect animations, they are streamed, which means that there is always only one frame loaded anyway.

What it comes down to, is if a compressed 24-bit DDS image takes up more memory than an uncompressed 8-bit PCX image.
An EFF making use of DXT1a, DXT3 or DXT5 will take up the same amount of memory that an 8-bit PCX image will (if the 8-bit PCX image did not get converted to 16-bit).  A DXT1c however, will use less memory than an 8-bit PCX.


But once an effect animation is loaded, there is absolutely no usage difference between ANI and EFF.  The game uses them exactly the same.  The only difference is how much memory they use.  Technically an EFF should take a little longer to actually load the first time, since it has to search for each frame of the animation as a file, but then ANI frames have to actually be decoded to be used, and EFF frames (DDS at least) don't.  In the end it pretty much balances out.

And one thing that most people tend not to do (I don't think it's common knowledge anyway) is mix DDS formats for an EFF, even though that is explicitly allowed.  So you could really just base each frame on it's content, and use any mix of DXT1, DXT3, DXT5, or an uncompressed DDS format, in the same EFF.  As long as all of the frames are actually DDS then it would work.  This way you get maximum flexibility with the ability to both help save memory, and preserve the best visual quality possible for your EFF.  That capability was a main goal of the format. :)

 

Offline Turey

  • Installer dude
  • 211
  • The diminutive form of Turambar.
    • FreeSpace Open Installer Homepage
Re: ANI Particles Causing Massive FPS Drop
And one thing that most people tend not to do (I don't think it's common knowledge anyway) is mix DDS formats for an EFF, even though that is explicitly allowed.  So you could really just base each frame on it's content, and use any mix of DXT1, DXT3, DXT5, or an uncompressed DDS format, in the same EFF.  As long as all of the frames are actually DDS then it would work.  This way you get maximum flexibility with the ability to both help save memory, and preserve the best visual quality possible for your EFF.  That capability was a main goal of the format. :)

Really? So we could use DXT1a for the less detailed parts of the animation, saving memory, then step up to uncompressed for the more detailed frames?
Creator of the FreeSpace Open Installer.
"Calm. The ****. Down." -Taristin
why would an SCP error be considered as news? :wtf: *smacks Cobra*It's a feature.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: ANI Particles Causing Massive FPS Drop
Really? So we could use DXT1a for the less detailed parts of the animation, saving memory, then step up to uncompressed for the more detailed frames?
Yep.  Every frame must be the same file type (ie, DDS, TGA, JPG or PCX), but DDS is a containter format, so the data contained in it has nothing to do with the overall animation settings.  Just like with an ANI, each frame of an EFF effect is treated separately by the game.  EFF was designed to take full advantage of this, even though at the time it was made the support for DDS was rather minimal.  Outside of filenames, every frame of an EFF need only have a similar image width and height.  Everything from compression level, to base format, to color depth, and mipmap levels are considered individual settings for each frame.  You can even mix 24-bit images, with 16-bit images, with 32-bit images which have full alpha.  The game will just handle each frame by it's individual settings rather than as a whole for the EFF.

Even an EFF using JPG could have different compression levels for each frame, and save disk space by heavily compressing some frames, while having max quality on others (obviously this has nothing to do with memory usage though, it would be the same for each frame).  A TGA EFF gives you the same basic options, allowing 24-bit and 32-bit frames to be mixed together in the same animation.

That is a primary reason that EFF was never designed to be a container format, but instead have each frame as a separate file.  A container format would complicate that ability (though it would still be possible).  This is also why EFF can't be used for streaming animations (like interface stuff or talking head animations), since is was tailored specifically for effects use.  There is a new format coming which will offer a better-than-ANI steaming animation, and will be specifically tailored to that usage.