compressed VP support
Sounds very useful. If you can get .zip-level compression, I'll be impressed. if you can get .7z-level compression, I'll be amazed. :yes:It's much closer to .7z, but without the higher memory requirements for decompression. At the moment it's using bzip2, but wolf recommened lzma to me (what 7z uses) and I'm still considering going with that instead. The test results for decompression speed and memory usage didn't impress me in my tests though, so I'm still leaning towards bzip2 instead. It will take longer to actually compress the VPs in the first place, but using them in-game should be a little faster than lzma according to my tests. Memory usage on decompression for lzma is what actually killed it for me, but I'm working towards removing that as an obstacle so that I can re-evaluate lzma based purely on speed and the API (has be easily usable in-game obviously).
Here is what the current 3.6.8 Zeta MediaVPs would look like as CVPs. They are the VP as it would be installed, the CVP as it would be installed and the VP as you download it (ie, zipped up).
mv_core:
- as VP: 9.3 Meg
- as CVP: 2.6 Meg
- as zipped VP: 2.9 Meg
mv_effects:
- as VP: 90 Meg
- as CVP: 21 Meg
- as zipped VP: 25 Meg
mv_models:
- as VP: 183 Meg
- as CVP: 64 Meg
- as zipped VP: 67 Meg
mv_textures:
- as VP: 180 Meg
- as CVP: 77 Meg
- as zipped VP: 85 Meg
mv_adveffects:
- as VP: 245 Meg
- as CVP: 60 Meg
- as zipped VP: 75 Meg
Total installed size as VP: 707.3 Meg
Total installed size as CVP: 224.6 Meg
Since mv_music.vp couldn't work compressed, since we have to stream data from it, I'm not listing it in this comparison as the size wouldn't change between VP and CVP. All CVPs are ready as-is for use by the game (when the game side of the code ever gets done).
I switched to using level 6 compression for the files since it's about 3 times less memory needed and a noticeably faster. Even so, the average file sizes increased no more than 5% on the various tests I made.
Forgive my failed memory, but wasn't there talk(long ago) about having fs2_open rely more on SDL? Or is that what we are doing(sdl-ttf comes to mind)?It will happen, but it's low priority. Although I haven't comitted the code yet, I do have a tree which has SDL support on all platforms. It is still off by default for Windows, but can be turned on with a simple compile option. The only reason for the delay is the amount of code which needs to be removed first in order to keep the code clean and easy to manage. It's not a hard job, just a long and boring one. :)
Regarding the compressed VPs: I assume that all existing VP editor and viewer utilities will not be able to read the new format, right? That means that either the compressor program (like Winzip, if you were to use a zip-based compression) would become the new editor/view software), or that some kind of new, customized VP editor/viewer program would be needed, that can accomplish the task and contain the source code of the compression format. What's it gonna be?The existing VP utils will just have to be modified to work with the format. It is a custom format though, so you couldn't open the files in WinZip or anything else. Unlike something like the .pak type format that Doom/Quake uses, the CVP spec dictates that each individual file be compressed, not the entire archive. To work seamlessly with the game, that is how it needs to work. And fortunately, for the content that we need to compress, we get better overall compression ratios that way too. As an added bonus we get to filter what files are actually compressed. This way something like an OGG file, which doesn't compress worth a crap, can get no compression at all and we save the overhead of using it as a compressed file, and all of the other files in the same CVP can still be compressed. A CVP doesn't have to have any compressed files in it even. It can still end up being smaller than a similar VP though, since the file index would be compressed regardless and that can save anywhere from a couple of k, to a meg or more.
how can we expect pixel shaders to effect FS2_open? I mean, in terms of both looks and performance? I'll assume that decreased performace for enabled pixel shaders is a given, but byhow much are we talking? Any ideas as to how big of a graphical improvement they will make?
I would love to be able to sit down and discuss options for reorganiseing the abstraction layer, I have been asking for literaly years now, and I had a bunch of realy nice code done on my side for organiseing geometry. I'd like to keep D3D support if we can, and I don't think we'll have to sacrafice much to do it.
the graphics code desperately needs reoganisation, look at either OGL or D3D *_render_buffer functions, they are terifying, when in fact they should be small and compact, doing nothing but rendering buffers, instead they are handleing multable passes and all sorts of material settings, and all the compatability code therein.
and look at set_bitmap, this one function is the only way to change alpha blend modes, and texture filtering, WHY!?!?!? there should be three seperate functions, and each one should also be able to specify wich of the 8 texture stages it effects, rather than just the fisrt stage, leaveing the API level code to figure out how to handle stuff by _global ints_ storing the handles of texture files to be used in effects, wich double in posable complexity every time an new one is added. I know I started the whole global int thing, but realy that was a design flaw made by a first year coder who could barely remember the syntax of a for loop, and even then I knew it was a bad idea, I realy expected that to be just a temporary bandaid was of bypassing the crappy bitmap setting code, why we are still useing my horrably flawed anti-pattern after all these years I can't fathom.
I konw we can make a nice simple abstraction layer that everyone would be happy with at least as far as the render level stuff goes (I have no idea how OGL handles things like how it handles blending between it's equivelent to texture stages, but if nothing else we could make one big struct that represented all the settings)
I realy wish I could talk to someone with OGL knowlege about this.
First, I have to say that thoe figures on the CVP compression results are phenomenal! Are we only going to be compressing the mediavps or are we going to be compressing the main FS2 vps as well? Anything to save hard disk space wins in my book. lolWell that's really up to you, and/or who ever you get the retail VPs from. If they are distributed as CVPs then that's all you need, unless you need to retain compatibility with retail or older FSO builds that is. There will be a command line utility to convert between VP and CVP though. It's the same utility set that will initially be ready for messing around with the files anyway (cfilearchiver/cfileextractor, which are both command line VP utilities).
Also, I have this nifty Hyperspace OGL screensaver that demnstrates to me the effectiveness of pixelshaders in it's own way, so I'm pretty excited, but how can we expect pixel shaders to effect FS2_open? I mean, in terms of both looks and performance? I'll assume that decreased performace for enabled pixel shaders is a given, but byhow much are we talking? Any ideas as to how big of a graphical improvement they will make?As Bobboau already said, it will most likely increase performance. That will depend on the shader types in use though. We'll be able to do more texturing, lighting and fogging stuff at one time that we do now, with much higher quality, and much faster. This will not only improve graphics quality, but also open up the use of even more features, like proper shadows. The shader code will even be available to help render Theora movies much more efficiently.
mv_core.vp | 9.3M | decompression time: 0:00.04 |
mv_core.vp.bz2 | 2.5M | decompression time: 0:01.55 |
mv_core.vp.lzop | 3.4M | decompression time: 0:00.05 |
mv_core.vp.ucl | 3.2M | decompression time: 0:00.09 |
mv_effects.vp | 90M | decompression time: 0:00.09 |
mv_effects.vp.bz2 | 21M | decompression time: 0:10.25 |
mv_effects.vp.lzop | 29M | decompression time: 0:01.63 |
mv_effects.vp.ucl | 28M | decompression time: 0:02.43 |
mv_models.vp | 183M | decompression time: 0:04.21 |
mv_models.vp.bz2 | 64M | decompression time: 0:31.40 |
mv_models.vp.lzop | 78M | decompression time: 0:03.20 |
mv_models.vp.ucl | 73M | decompression time: 0:04.62 |
mv_textures.vp | 180M | decompression time: 0:04.47 |
mv_textures.vp.bz2 | 80M | decompression time: 0:37.31 |
mv_textures.vp.lzop | 97M | decompression time: 0:03.44 |
mv_textures.vp.ucl | 93M | decompression time: 0:14.26 |
mv_adveffects.vp | 245M | decompression time: 0:15.53 |
mv_adveffects.vp.bz2 | 60M | decompression time: 0:33.75 |
mv_adveffects.vp.lzop | 91M | decompression time: 0:06.97 |
mv_adveffects.vp.ucl | 87M | decompression time: 0:07.83 |
Both LZOP and UCL are GPL'd, so we couldn't use them anyway.
http://www.oberhumer.com/opensource/lzo/ (http://www.oberhumer.com/opensource/lzo/)
LZO and the LZO algorithms and implementations are distributed under the terms of the GNU General Public License (GPL) . Special licenses for commercial and other applications are available by contacting the author.
[...]
I realy wish I could talk to someone with OGL knowlege about this.