Author Topic: GFX II  (Read 3434 times)

0 Members and 1 Guest are viewing this topic.

hi

i have some questions

1.
if i want include new textures or want replace some what must i do so they would work ???

2.
how SCP handle PCX 8Bit files are they handled as 8bit or 32bit ???
its important because if they are stored as 32bit in gfx-card memory i would convert all to dds thy are compressed and smaller i think they can stored as compressed in gfx mem and save mem at gfxcard

3.
if i convert tga to dds is there much quality lost ???

i think there will come more questions later ;)

thx for help

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
1 - you just need to name them the same as previous textures and put them in an area of higher precedence. Files in the directory structure take highest precedence; files in the .VPs are next, followed by files on the CD-rom. If you're using a mod directory, stuff in the mod directory structure come before stuff in the normal directory structure.

2- PCX and TGA and JPG files are stored as 24-bit. Note that very recent versions of Fs2_open (the newest CVS builds) may even be able to support 8-bit DDS...I'm not 100% sure about this...however, what it means is that an 8-bit (uncompressed) DDS will be stored as either 8-bit or 16-bit, effectively reducing memory usage to half that of an 8-bit PCX. All other DDS files are stored in memory as the same size as they are in a directory, and fs2_open can also load uncompressed DDS.

3- It depends on the texture. On some it's barely noticeable, on others it's very noticeable. Just convert the texture, and if it looks bad, try another DDS format, until you get bored of DDS or find one that you like.

Also note that JPG and TGA files will be disabled unless the command-line is specified, but will take precedence over DDS. (Both take up roughly the same amount in memory, both are stored as 24-bit).

There's also this thread.
-C

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Some of this is correcting or expanding on what WMCoolmon wrote so be sure to read the responses from both of us...

2) All PCX textures used by the game are 8-bit files.  For fonts they are read in as and used as 8-bit.  For everything else they are converted to, and used as, 16-bit.  The only exception is that if you use the -img2dds option then the PCX files are converted to 32-bit, then compressed and used as compressed DDS images.  JPG files are 24-bit and used as 24-bit.  TGA files are either 16-bit (if from Volition), 24-bit or 32-bit and are read and used in whatever the original format was.  DDS files will retain their original format (16-bit, 24-bit, 32-bit, compressed, uncompressed) except in the case of 8-bit files.  8-bit DDS isn't fully supported yet but when it is it will be read as 8-bit but then converted to 16-bit for use by the video card.  A compressed 32-bit DDS (DXT5) will use the same memory as an 8-bit PCX.  A compressed 24-bit DDS (DXT1) will use even less memory.

3) You should always use DDS in order to have proper mipmaps.  That's not a requirement, but is generally good, especially if you ever distribute those files.  DDS offers many formats, from compressed formats which use less memory but with compression artifacts, to uncompressed formats which are available in 8-bit, 16-bit, 24-bit and 32-bit versions and will have the same quality as a PCX or TGA image.  If you can't make use of a compressed DDS format then you can use an uncompressed DDS format.  If you prefer it uncompressed but don't care about the game compressing it (with -img2dds) then use PCX, JPG or TGA.  If the image is uncompressed DDS then even the -img2dds option won't touch it and it will never be compressed unless you conver the image yourself.

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Quote
1 - you just need to name them the same as previous textures and put them in an area of higher precedence. Files in the directory structure take highest precedence; files in the .VPs are next, followed by files on the CD-rom. If you're using a mod directory, stuff in the mod directory structure come before stuff in the normal directory structure.

I tried overriding two of the dds files in mv_textures.vp by placing my versions in the main FS2 folder and they didn't work. I had to delete the dds files inside the vp before it read the new ones.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
I tried overriding two of the dds files in mv_textures.vp by placing my versions in the main FS2 folder and they didn't work. I had to delete the dds files inside the vp before it read the new ones.
If the MediaVPs are in a mod folder then your replacement files have to go in the mod folder too.  Read order says that files in a mod directory are found first, then VPs in the mod folder, then files in the main FS2 folder, then VPs in the main FS2 folder.  If you are using a debug build then have a look at the log, it lists the search order first thing.  The files also need to go in the proper directory structure (ie, data/maps/*.dds) in order for CFILE to properly find and cache the files.

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
It was probably the fact that I didn't have the files in the correct data folder. I just assumed that the root directory had the highest precedence, as was the case in retail FS2, but will give that a try next time.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Some of this is correcting or expanding on what WMCoolmon wrote so be sure to read the responses from both of us...

2) All PCX textures used by the game are 8-bit files.  For fonts they are read in as and used as 8-bit.  For everything else they are converted to, and used as, 16-bit.  The only exception is that if you use the -img2dds option then the PCX files are converted to 32-bit, then compressed and used as compressed DDS images.  JPG files are 24-bit and used as 24-bit.  TGA files are either 16-bit (if from Volition), 24-bit or 32-bit and are read and used in whatever the original format was.  DDS files will retain their original format (16-bit, 24-bit, 32-bit, compressed, uncompressed) except in the case of 8-bit files.  8-bit DDS isn't fully supported yet but when it is it will be read as 8-bit but then converted to 16-bit for use by the video card.  A compressed 32-bit DDS (DXT5) will use the same memory as an 8-bit PCX.  A compressed 24-bit DDS (DXT1) will use even less memory.

3) You should always use DDS in order to have proper mipmaps.  That's not a requirement, but is generally good, especially if you ever distribute those files.  DDS offers many formats, from compressed formats which use less memory but with compression artifacts, to uncompressed formats which are available in 8-bit, 16-bit, 24-bit and 32-bit versions and will have the same quality as a PCX or TGA image.  If you can't make use of a compressed DDS format then you can use an uncompressed DDS format.  If you prefer it uncompressed but don't care about the game compressing it (with -img2dds) then use PCX, JPG or TGA.  If the image is uncompressed DDS then even the -img2dds option won't touch it and it will never be compressed unless you conver the image yourself.

It should also be noted that if you chose DDS as an image format, make SURE that you resize the image before converting so that its dimensions are of power-of-2.  For example, if you have a square image of 480x480, resize that to either 256x256 or 512x512 (I'd prefer the later).  You can also have non-square textures in this format, as long as they still have power-of-2 dimensions.  Example, you can have a DDS texture of 512x1024.
The Trivial Psychic Strikes Again!

 
thx for your good help

i have some new question ;)

where can i get an good dds converter or programm plugins ...
yet i use DXSDK converter and ATI converter but i dont think they are really good

  

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
http://developer.nvidia.com/object/dds_utilities.html
You can get a command line utility there as well as a Photoshop plugin.

If you use GIMP then there a DDS plugin for that too (don't have to URL handy but if you want it I'll look it up).

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
im not too happy with 8-bit dds files. they seem to take up alot more disk space than the 8-bit pcx files. i only really use 8bit for glowmaps. im most cases it seems more feasable to use 24bit dxt1s over 8-bit dds. the qualitys better and the memory usage is less. im curious if the pcx files use up more memory than they do disk space? i like dds files because the size they use on disk is about the same as the size they use im memory. this is not true of other formats. also is there any disadvantage to using non-square compressed textures?
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
im not too happy with 8-bit dds files. they seem to take up alot more disk space than the 8-bit pcx files.
PCX is just a palette with the RGB colors and then the rest of the file is just a single byte palette index for each pixel.  This lets the file size be the minimum possible.  File size isn't important though, it's memory usage that should be the concern.

Quote
i only really use 8bit for glowmaps. im most cases it seems more feasable to use 24bit dxt1s over 8-bit dds. the qualitys better and the memory usage is less.
8-bit DDS offers no savings in memory usage than 24-bit DXT1, in fact 8-bit DDS uses more video memory.  Also the DXT1 image is used as is, where as the 8-bit files (be it DDS or PCX) have to be processed before use.

Quote
im curious if the pcx files use up more memory than they do disk space?
Memory usage for a PCX is computed as: width * height * 2.  So a 512x512 PCX would use 1meg of memory.

Quote
i like dds files because the size they use on disk is about the same as the size they use im memory. this is not true of other formats.
DDS files are basically snapshots of what the image would look like in video memory.  This means that a DDS file should always have approximately the same size on the disk as it does in memory and should only be slightly larger on disk (for the header).  TGA files are the same way if you don't RLE compress them.

Quote
also is there any disadvantage to using non-square compressed textures?
As long as it's power-of-2 it doesn't really matter whether it's square or not.

 
 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
question, what are these mip-maps everyone is talking about? i still dont understand that
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Mip-maps are integrated LODs for DDS textures, they are chosen by the video card whenever it feels that it needs to resize the image. They're stored within the DDS file, too.
-C

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 
i have an little question about dds/mipmaps

if i have 1024/512/256/128/64/32/16/8/4/2/1 dds the file is 1.33mb on HDD
but if the game use the 256 or smaller what GFX mem usage there is
is it only the usage of the 256 mipmap or of the the complete 11mipmaps????

its very important to know these for me :)

 
i have an little question about dds/mipmaps

if i have 1024/512/256/128/64/32/16/8/4/2/1 dds the file is 1.33mb on HDD
but if the game use the 256 or smaller what GFX mem usage there is
is it only the usage of the 256 mipmap or of the the complete 11mipmaps????

its very important to know these for me :)

What? Your DDS-Files are ALL 1.33 MB large? That shouldn't be...

 
oh no ;)
an 1024textur with mipmaps 512-1 is 1.33mb
i want know if when game use smaller the full dds file is in memory or only the mipmap which is in use
like my 1024textur with the 10other mipmaps or only the 256 which is in use
there is an difference between about 1mb or more

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
It loads all mipmap levels into video memory (with exception, see next paragraph).  It's just that it only uses what is needed for the polygons getting rendered which is faster than having to take a large image and scale it down to fit.  This minimzes the traffic over the video card and can offer big speed increases in rendering speed.  And depending on what you are using the save the DDS file (the GIMP plugin doesn't offer this for instance) you can say how many mipmap levels to make.  So really you could just have 1024-128 if you wanted.  It does depend on what you are using that image for as to whether that's a good thing or not though.  You can stop at 32 or 16 for a ship texture for instance, all the way for a weapon effect, and stop at 256 or 128 for a background bitmap or planet.

If using OpenGL (for now, D3D fix is coming) then the "3D Hardware Textures" detail slider in the options screen will limit what the max mipmap level that gets into video memory actually is.  If the slider is at the max (4th dot) then it will load all mipmap levels into video memory.  If the slider is down one (3rd dot, obviously) then it will only send 512-1 levels to the card.  Down two, 256-1 levels, etc.  So there is some user control here and they can help decide exactly how much video memory will be used for them.

 
thx for help at all

sorry for so many questions but i think i ask all gfx questions here ;)

my next question is a bit complex. is it possible to use an use an grey colored texture were i can change the color
without make color in texture
i hope anyone understand what i mean elsewise i must edit this post :(

something like this are to complex for my english even if i use an dictionary ;)