Author Topic: Is PNG 32 bit used for all graphics/uvmapping?  (Read 5065 times)

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: Is PNG 32 bit used for all graphics/uvmapping?
« Reply #30 on: May 17, 2006, 07:32:42 pm »
Urr, it's not a question of '8bit' or '32bit'...

It works somethinge like this....
32bit textures were converted to DDS with DXT5 compression.
24bit textures were converted to DDS with DXT1c coompression.
Anything other than those two were converted to DDS with DXT3 compression (default), although we can specify for those as well, probably DXT1c is best. There's lots of things we can specify and we're probably not using the best settings right now, but we can improve on that fairly fast.

This is a four-bit compressed color format that allows for opaque, and one-bit alpha textures; that is, textures with no transparency at all, and textures with a single transparent color (masking). The most compression will be put on textures.
DXT1c is colour only (no alpha),
DXT1a has that 1bit alpha.
DXT3 adds support for a four-bit explicit alpha channel, on top of DXT1's color compression. Four-bit explicit alpha allows for sixteen distinct alpha values, making it good for textures with sharply contrasting translucent/opaque areas.
DXT5 ssupports a four-bit interpolated alpha channel. Three bits are used to determine explicit alpha values, and two eight-bit values are used to interpolate gradually between them. This makes the format especially suited for soft gradients and other textures where the alpha areas vary less wildly. The least compressed option.

And no, I didn't have load all maps on. 350mb is normal for loading one map on windows. If I put on load all maps, the ram usage would be closer to 600mb.
« Last Edit: May 17, 2006, 07:35:48 pm by Xordan »

Yaskina

  • Guest
Re: Is PNG 32 bit used for all graphics/uvmapping?
« Reply #31 on: May 17, 2006, 09:33:40 pm »
Well it does have everthing to do with 8 bit or 32 bit thats the reason why i started this thread. This game is using 99% percent 32bit files, even on files that should be 2bit black and white. And thats why people are having problems with the game ITS A PIG on memory. Whats the point in making a game for people to enjoy if the only people that are going to be able to play it have 2 gis of ram and 256 meg plus vid card. That in essense was the entire reason that i started to try to help. If we got like a few people and did a mass conversion of the game we would have it done in like 3 days and a working update that would use probally about 100 megs less in ram and cut bus traffic by a third.

1-Are you going to post the sewer zip files with DDS or not?

2-Whats a resonable expected time frame for you to have the entire game converted to .DDS. Im now about 40% complete but im batch converting

3-And is there a loader for these files on mac in the game. Mac uses opengl and from my understanding opengl does not support the DDs format out of the box. But i could be wrong.




Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: Is PNG 32 bit used for all graphics/uvmapping?
« Reply #32 on: May 17, 2006, 10:38:51 pm »
Quote
This game is using 99% percent 32bit files, even on files that should be 2bit black and white. And thats why people are having problems with the game ITS A PIG on memory.

Try reading my last post.

Quote
This is a four-bit compressed color format

beats 8bit, if you use the same logic, ignoring what Jorrit and res (both crystalspace devs) said earlier. My results proved that dds is better than png for memory anyway. dds files are stored pretty much how they are in ram and vram, and used as such.  And yes, this means they undergo no conversion and mipmap generation, which means less bus traffic if you want to compare that as well.

Quote
play it have 2 gis of ram and 256 meg plus vid card.

That's crap. It doesn't need that and it won't.

Quote
1-Are you going to post the sewer zip files with DDS or not?

Once I have time to upload yes. I'm short on time atm because I have a life, and this isn't my top priority.

Quote
2-Whats a resonable expected time frame for you to have the entire game converted to .DDS. Im now about 40% complete but im batch converting

Two days ago.

Quote
3-And is there a loader for these files on mac in the game. Mac uses opengl and from my understanding opengl does not support the DDs format out of the box. But i could be wrong.

You understand wrong. They work fine on mac. If you'd done your research then you'd know that the whole of PS uses opengl, so that isn't an issue, if it works on one platform it'll work on others. (Also note that games like NWN which was released a few years back for windows/linux/mac with opengl uses entirly dds textures afaik.) What matters is that the engine and the graphics card have support for the texture. The first is a yes, and the second is most likely a yes unless you're using quite old hardware (not new enough to run modern games).
« Last Edit: May 18, 2006, 01:03:25 am by Xordan »

Yaskina

  • Guest
Re: Is PNG 32 bit used for all graphics/uvmapping?
« Reply #33 on: May 18, 2006, 05:51:55 am »
so your saying your 32 bit tga's are now in a 4 bit c colour format. If so my software kinda sucks bad or must be broken. Cause when i convert a a 32 bit tga into a DTX with consideration for alpha or not the file still uses exaclty the same amount of memory for a  512 x 512 only thing that changes is File length. i end up with a 32 bit colour channel and a 8 bit alpha channel.

Please just use the service www.yousendit.com and let me try your files send the same 2 you got from me only in your sweet DDS version hysewers.zip and sewers.zip and let me try it out

Also a very close friend of mine works at ATI and i asked him the other day regarding dxt on my card he said its no problem provided the software supports it and is able to load it in. Just thought i would mention this, i live just 5 mins from the main world wide head office. gota love it!

Also i think there is a problem with the arena zips on the mac anyways. not sure which one but i think its an image file thats creating the prob. reason i say this is there is dup images in these zones and the engine/openGL reuses ones already opened in another zone.

When i load into DR and get to hyldaa  then run to arena im ok ( no crash) if i go any other way i get a crash at the arena.

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: Is PNG 32 bit used for all graphics/uvmapping?
« Reply #34 on: May 18, 2006, 06:09:52 pm »
Firstly, most of the textures in the sewers are 24bit (according to windows anyway) with some 8bit and 32-bit textures as well. I checked a few other zips and they show the same thing. What software are you using to check the bit depth? It tells me that in your zips, most (the ones I checked) are 8bit, which is correct I assume.

Secondly, I've sent the maps.

And lastly; I'll see if dfryer will take a look at the arena to see if there's a problem there on mac.

PS: I'm a bit of a nvidia fanboy :P ATI  :thumbdown:

Yaskina

  • Guest
Re: Is PNG 32 bit used for all graphics/uvmapping?
« Reply #35 on: May 18, 2006, 06:49:50 pm »
Where did you send the maps? I checked my mail, pm box and i dont see any link. Please post/mail me a link for the 2 sewer files in dds so i may try them. I am interested in trying them files. I was suspect that you would not post the goods, prove me wrong 5 min job tops.

I have not been through every single file but hundreds and i have not seen one 24 bit file as of yet. i have seen a few 8 bit not many though. Im using software thats been around along time, it gives me a very highly detailed window regarding the file, even better than photoshop. I will open up a few zip packs and open all files and click close check.

Karyuu

  • Forum Legend
  • *
  • Posts: 9341
    • View Profile
Re: Is PNG 32 bit used for all graphics/uvmapping?
« Reply #36 on: May 18, 2006, 07:30:48 pm »
Yaskina... It's rather rude to be so demanding. As Xordan said, he has things he needs to take care of elsewhere in life, and replying here isn't his top priority at the moment. (Studying for finals is more like it.) So why don't you relax a little and stop poking him with a "Gimmegimme!" when he already said he'll give you the files.

Second, he asked you what software you are using, not how old the software is nor what it can do or what it's better than.
Judge: Are you trying to show contempt for this court, Mr Smith?
Smith: No, My Lord. I am attempting to conceal it.

Yaskina

  • Guest
Re: Is PNG 32 bit used for all graphics/uvmapping?
« Reply #37 on: May 18, 2006, 07:51:23 pm »
Well it would only take 5 mins to send zips he already has made.

I just checked these zips

hysewers.zip 5 8 bit files and rest are 32 bit - no 24 bit

sewers.zip 3 8 bit and rest are 32 bit - no 24 bit


Karyuu

  • Forum Legend
  • *
  • Posts: 9341
    • View Profile
Re: Is PNG 32 bit used for all graphics/uvmapping?
« Reply #38 on: May 18, 2006, 07:55:10 pm »
Now I'm also curious as to what software you are using, which you haven't answered yet.
Judge: Are you trying to show contempt for this court, Mr Smith?
Smith: No, My Lord. I am attempting to conceal it.

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: Is PNG 32 bit used for all graphics/uvmapping?
« Reply #39 on: May 18, 2006, 07:58:56 pm »
I typed your email (the one that in your forum profile) into the yousendit thing....

Here are the links anyway:
http://www.yousendit.com/transfer.php?action=download&ufid=211FEE5050845072
http://www.yousendit.com/transfer.php?action=download&ufid=CF2B4F7537F1A8B0

And this is what windows tells me....

http://img184.imageshack.us/img184/5526/bitdepth5ow.jpg

And if you're going to be so pushy I can just ignore you and we'll go our own way regardless of what you think.

Yaskina

  • Guest
Re: Is PNG 32 bit used for all graphics/uvmapping?
« Reply #40 on: May 18, 2006, 09:54:52 pm »
We must have different original files.  I noticed you image screen shot shows them at 96 they all report 72 on mine. maybe there are different zip packs being used on mac and pc. oh well its not that great of concern 8 bit still the way to go. Im really glad you sent them files cause im proud to say that they worked. Well i will have to try to figure out why the converts to DDS that i make wont. There is not a whole lot of options for DDS on the mac. I do have windows and linux installed on my mac and can run them at the same time so i should try other os software to try to handle them. my app reports that the dds are all 32 bit colour and 8 bit alpha where alpha applies. When i checked the files for memory usage png 8 bit used  5 megs less ram for these 2 files vs DDS. DDS did seem to load about 2 seconds faster thou.

So if we could go 8 bit colour and 8 or 4  bit alpha DDS files we would be doing really sweet.

And just to say i don't mean to rush you or try to make you use gifs or png 8 bit i don t care what format is used and if i have any point that i am pushing is to use 8bit what ever and use alpha channel only when its a 100% must. Alot of the alpha channel files in the game can be done with trans, i just have to spend a little extra time to not get the halo its a colour pallet thing.

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: Is PNG 32 bit used for all graphics/uvmapping?
« Reply #41 on: May 18, 2006, 10:14:30 pm »
You still haven't said what software you're using. ^^ I've run a few programs which outputs info about the images (png in this case) and they all report the same thing:

http://rafb.net/paste/results/Sd4LJD91.html

And I redownloaded the map from the updater (every platform has exactly the same art), and it reports that.... so I wonder if your app is reporting the correct info. To make sure; can you post what bit depth your app reports the fynnwn chain or leather armour to be?

Edit: hmm, I tried to find out the bit depth of the dds files and different apps are giving me different answers. One says that they're all 32bit, another says they're all 24bit. Will try and find a reliable app which supports them to check with. If, however, it turns out that all the dds are of the same bit size (dxt1c should be 4bpp, and dxt3/5 should be 8bpp), then it doesn't really matter what bit depth they were before converting. There would be no difference in memory usage after conversion. (Just checked that with crystalspace devs).

Edit2: Ok, I checked in photoshop and they are 4bpp and 8bpp. When you open them they default convert to 8bpp anyway and you can choose to convert back to 24 or 32bpp, so there's no point in us converting the textures to 8bpp before converting to DDS. Evidence looks pretty conclusive to me.
« Last Edit: May 19, 2006, 12:35:30 am by Xordan »

Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Re: Is PNG 32 bit used for all graphics/uvmapping?
« Reply #42 on: May 18, 2006, 11:14:29 pm »
Yaskina, if you're having trouble with DDS you might try:

http://nifelheim.dyndns.org/~cocidius/dds/

Which is a link to a plugin for The Gimp that handles reading and writing DDS

Since you and I aren't using windows, it will require a compile to get the script working on our platforms, but its worth a shot.

Yaskina

  • Guest
Re: Is PNG 32 bit used for all graphics/uvmapping?
« Reply #43 on: May 18, 2006, 11:21:34 pm »
Ya i was going to try out gimp but i dont have the X11 backbone installed yet on this system. But i will have to as only way im going to be able to create mng files.

res

  • Crystal Space Developer
  • Traveller
  • *
  • Posts: 30
    • View Profile
    • Crystal Space
Re: Is PNG 32 bit used for all graphics/uvmapping?
« Reply #44 on: May 19, 2006, 01:18:54 am »
DXT1c is colour only (no alpha),
DXT1a has that 1bit alpha.
DXT3 adds support for a four-bit explicit alpha channel, on top of DXT1's color compression. Four-bit explicit alpha allows for sixteen distinct alpha values, making it good for textures with sharply contrasting translucent/opaque areas.
DXT5 ssupports a four-bit interpolated alpha channel. Three bits are used to determine explicit alpha values, and two eight-bit values are used to interpolate gradually between them. This makes the format especially suited for soft gradients and other textures where the alpha areas vary less wildly. The least compressed option.

For the record:
DXT1c/DXT1a are essentially the same format; they compress to 4bits/bixel.
DXT3/DXt5 both compress to 8bits/pixel (hence "The least compressed option" is somewhat misleading; DXT3 is just as "bad").


What matters is that the engine and the graphics card have support for the texture. The first is a yes, and the second is most likely a yes unless you're using quite old hardware (not new enough to run modern games).

And even if the hardware does not support DXT compression, CS will uncompress it to something the hardware understands.



Please avoid posting two or more successive posts before others have replied. Just edit your last post to add new information. --Santiago
« Last Edit: May 19, 2006, 01:35:46 am by Santiago »
A Crystal Space developer