Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: RandomTiger on October 24, 2003, 01:19:19 pm
-
Using this feature
http://mysite.freeserve.com/thomaswhittaker/c_code/freespace/fs2_open_r.rar
http://mysite.freeserve.com/thomaswhittaker/c_code/freespace/Launcher.rar
Ok the exe in this thread allows you to use TGA's and JPG's instead of PCX's.
For example fighter01-01a.tga or fighter01-01a.jpg can be loaded instead of fighter01-01a.pcx.
The engine will look for TGA first, then JPG and finally PCX
Also you must specify '-32bit_textures' command line parameter otherwise the textures will load into 16 bit even if you are playing in a 32 bit mode. We still have a lot of old cards so I dont want to force maximum quailty on everyone.
EDIT: For anyone downloading the exe from now on the parameter is '-t32'
This feature is only currently supported in D3D. Why? Because D3D provided a very nice function to do a lot of the work for me.
Now this is new code and I expect there to be bugs so anyone who tries it should consider themself a beta tester. Please give feedback on good and bad.
File type details
If people want I could also throw in compatiblity for these files types: .dds, .dib and .png
However the more types FS2 supports the more time it will take to work out which files it wants to load.
I have chosen jpg because a maximum quality jpg can give us good quality for a small file size.
I have also chosen TGA because it supports alpha channels.
Alpha channels
However I advise you not to use alpha channels except for stuff like planets. I've not tested alpha channels yet so they may not work perfectly yet. If you use alpha channels for 3D stuff then you are on your own, chances are the FS2 engine will not act how you expect and fixing that is not trivial.
Remember non alpha TGA's are 24 bit TGAS. If you save a 32 bit TGA without an alpha channel you wont see very much.
Green masking will have no effect in TGA and JPG, I could change that but I figure its better to stick to alpha channels since someone may actually want to use pure green in an image at some point.
Limitations
Because I coded it using D3DX functionality it has some interesting advantages. 16 bit users will be able to use the same data and it will be scaled down to 16 bit for them. Also hopefully it will scale down textures that are too large for your card. The only problem I see is that currently this system does not support texture sections so if people start making interface art then people whos max texture size is below 1024 (everyone scowl at voodoo owners) will get a very blurred picture in the frontend.
I think anyone releasing seriously huge textures for a MOD or whatever should have a low res version as well. All this scaling functionality is all very well but it will process slower on the machines that need to do the most rescaling of big images.
Also obviously using 32 bit textures instead of 16 bit means there will almost certainly be a performance loss.
Theres probably other problems that I havent forseen but they will turn up when people start to use this for real purposes.
Further work
Im also working on getting the current PCX's to load into 32bit for a slight increase in quality.
-
work it with the interface too ?
-
YEAH !! it works you are my hero :D :D :yes:
-
Can we (I) see a screenshot of this in action? Sounds great!
-
sure ;) its a very fast test
-
....:eek2:
Oh boy...
-
i work on a better render is will post a screenshot in a few minutes ;)
-
hmm well there we go random tiger i got some problems with the launcher they didn't save the -32bit_textures tag i must start the game ever over your launcher and enter the tag again an ingame the screen looks a bit blur
-
Deutsch interface und pilot zimmer ? :)
-
If its burry, could you post the original image as well so I can get a look at the difference? Theres probably a filter I can change.
Where those loaded from TGA or JPG? Looks like JPG to me.
Feedback is good but full details is better.
Oh.. and your right about the launcher, shows how much people are using that I guess. Make a shortcut to it and put the command line in that for now.
-
sure its tga and its not compressed its 1.32 mb
http://www.nwn-dippelsbach.de/dota/2_ChoosePilot.tga
edit: for example look at the lens flare of the erinyes
-
jpg's for the interface art sound good but, as a modder, for textures I think I'll stay on 16bit pcx for the moment (unless someone prove me that I can have a jpg with same quality and smaller filesize), since there isn't in my opinion such a big quality loss to 32 bit colour depth compared to potential perfomances loss, the jump could be made instead with tga with alpha channels.....
RT, can you explain me please what do you mean with alpha channel used on planet? I think you mean the background with something like a feather on the borders, right?
Alpha channel could bring to some interesting transparency effects..hmmmm
huff, I must change my old voodoo2:(
-
Thanks freeterran, you're right. I just did a difference blend between the two images and theres a blur.
And my code is using a filter, I'll turn that off.
But I cant be bothered to post a new exe just for that.
I will keep your informed though, you've got better eyes than me.
-
hehe no problem i hope this will be implented in the next cvs update :) and could you not code it that we didn't need to start with the -32bit_textures tag ?
-
Originally posted by KARMA
RT, can you explain me please what do you mean with alpha channel used on planet?
PCX's use pure green to set alpha on and off. Having a whole channel means you can make it gradual. Only problem is in 16 bit theres not really enough room per pixel for colour and alpha so one or the other suffers.
Definately time to get rid of your voodoo, they are terrible cards in just about every way.
You can get a 'nVidia GeForce 4 MX440 64MB AGP' for £34 !
Thats less than the price of a console game where I live.
-
Originally posted by FreeTerran
hehe no problem i hope this will be implented in the next cvs update :) and could you not code it that we didn't need to start with the -32bit_textures tag ?
Well, I was going to make it a registry setting (controlled by tickbox in the launcher) but anytime you say 'registry' around here people start rolling around the floor screaming. Suggestions?
-
yes, it what I understood was more or less correct:)
but, ehy, don't offend my poor voodoo2!!!:mad: it was an outstanding graphic card!!!...an era ago... :rolleyes:
-
Actually FreeTerran, look at the edges around the ships in the first image you posted (the red one). Can you see what I mean. Perhaps you could post the original of that so we can see if thats the filter as well.
Thats what made me think it was from a jpg.
-
yeah the jpg is crappy quality the edges are from the image only the blur is on this screen but ingame they look a bit harder
btw: here is the orginal
-
Sorry, I just hate voodoo cards for all kinds of reasons.
-
Originally posted by KARMA
it was an outstanding graphic card!!!
...an era ago...
:ha:
Originally posted by RandomTiger
Sorry, I just hate voodoo cards for all kinds of reasons.
Such as:
They're puny
They're old
No one makes drivers for them anymore
and last but not least:
They're 3DFX cards
-
Anyway, totally my fault but we should probably get to the point or take this to another thread.
-
which point ? :confused:
-
32 bit stuff etc etc.
-
:lol: ok i have think at voodoo cards
-
I'm buying a Chaintech nVidia GeForce FX 5200 128MB PCI Card.
FOR $75!!!!
-
finally....
this will allow us to get some really 1337 ;7 sun & engine glow effects in there :)
-
@llivinglarge
I won a bid at eBay for a GF4 ti4200 128mb for $75
-
Originally posted by RandomTiger
Anyway, totally my fault but we should probably get to the point or take this to another thread.
well, sorry, it is mostly my fault more than yours, I was kidding a bit, and I didn't thought about deviating from the point of the discussion.
btw guys plz stop it, this is not a graphic card thread where to discuss the advantages of 3dfx's voodoo serie or the prices of recent GPUs, it is a post where to discuss the improovments of FSO about new file specs for images, no more no less
-
Fantastic work, RT. I'll do some testing on this in a few days' time.
-
what about 32bit ani support now ? ;7
-
Well, let me get PCX nailed down first
I'm not in a hurry to get into ani but I guess it really has to be done as well.
-
Ani's are just a collection of pcx's I think so storing a 32 bit animation of FSO probably requires a rethink
-
Originally posted by RandomTiger
Well, let me get PCX nailed down first
I'm not in a hurry to get into ani but I guess it really has to be done as well.
sure you are the master ;) plz post here as soon as you have a new exe done without the filters (blurry thing)
-
I'll knock together some high colour backgrounds and see how they hold together :) As for the ANI's, would it be easier to have each frame as a 256colour PCX, but each with it's own pallete, and if it can't find a pallette, it uses the default one? That way it would be backward compatible, and I'm sure people could do animations fine with 256 colours per frame?
Flipside :D
Edit : The only problem is that these would still cause Big animation files.
-
here a little update
only problem are the filters maybe its the best if you all put off random tiger and another problem the file size the tag is 2.25 mb
-
Pretty but far too dark.
-
Also, apparently this works with JPEG? Well if that's the case use a high quality JPEG file - you won't notice the difference and the file size should at least be halved I reckon... Also anyone can save in JPEG but not everyone can save in .TGA (depending on the program used)...
-
People will have to make there own judgements on quality vs size. I merely offer the choice.
ANI's are a special case that need to be discussed seperately in a new thread I think.
-
Nice finally something other than the unamazing 256 color scheme that was going on in Freespace 2. Now I can run 32 bit images with no problems at all and have the added bonus of running the game at 1600x1200. :eek: :D
-
Hehe...FT ..you'll have to do that one again...
I fixed and re-textured the Galaxy (alltough it can still use another re-texture..I'm just not satisfied)..Whitelight's pofing it now and will send it to you when he's done....
-
no problem i change the model ;)
-
FreeTerran I couldnt take the filter competely off for technical reasons but my change should have reduced the effect.
New exe is up
As of now the command line param is -t32
-
ok i will try it as soon as i have reinstall win xp :nervous:
-
yeah random tiger its a lot better :yes:
-
cool
-
Originally posted by LLivingLarge
I'm buying a PCI Card!!!!
*points*
*laughs*
:lol:
-
Well, its probably safe to assume he doesnt have an AGP slot.
-
the way our HT&L system is set up, PCI cards will probly not suffer so baddly
-
sry, it was funny to see such enthusiasm over a pice of crap :P
nothing against you LLivinLarge ;P
-
It is a PCI card but its still a DX9 card.
Half life will look better on his than on my GF4 AGP.
Its not all about transfer speeds these days.
-
It will look nice, but it may not be playable unless you turn off the exact features that make it look nicer.
The 5200FX may be able to do the DX9 stuff, but it sure can't do it quickly.
-
im not sure if this has somthing to do with it but....
* $Logfile: /Freespace2/code/MenuUI/SnazzyUI.cpp $
* $Revision: 2.2 $
* $Date: 2003/10/27 23:04:22 $
* $Author: randomtiger $
*
* Code to drive the Snazzy User Interface
RT? WTF is Snazzy User interface?
-
I think its stuff to process the masking of the interface to make bits respond to the mouse by playing ani's and changing pcx images to hi-lighted ones.
Might do other stuff as well.
My knowledge of files that dont start with GrD3D is limited.
-
So JPG support will be in 3.5.6? :)
-
Ohh this is interesting work indeed. Great stuff!
Everyone is laughing about PCI right now except that PCI-Express, the replacement to both AGP and PCI is on its way :)
-
Until AGP Mega-Whopper express comes along and all our graphics cards are higher resolution than our eyes ;) LOL
Flipside :D
-
Lets take the AGP stuff to another thread, its taking over this one.
Back on topic: to use large interface art (bigger than 256x256) from TGA or JPG you must enable large textures or it will be tiled.
-
(Chaintech GeForce FX 5200 PCI is the 2nd best PCI card on the market.)
The fs2_open build is corrupted...
-
Ok, one little thought, if I remember correctly, TGA Alpha layers are greyscale only? So they would be no good for glow or highlights as we use them?
Flipside :D
-
Originally posted by LLivingLarge
The fs2_open build is corrupted...
Thats not enough info:
1. Is it uncompressing the rar? (If not update winrar) otherwise try downloading again
2. Doesnt it load? Use launcher (make sure you are using up to date version)
3. It crashes? Report bug fully with spec details
4. It looks wrong? Post a screenshot