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

Yaskina

  • Guest
Is PNG 32 bit used for all graphics/uvmapping?
« on: May 09, 2006, 02:30:32 am »
hello all im just trying to get my mac up and running the latest version of this game and it appears there is problems so im trying to run a secound download to solve the problem? long story if you dont use a mac. that aside i was sniffing though the files in the .14 build and see that most files are PNG. I have some 3d art and game dev Exp and i am wondering if all the files driving the color are PNG? ;D
« Last Edit: May 17, 2006, 02:56:51 am by Yaskina »

Karyuu

  • Forum Legend
  • *
  • Posts: 9341
    • View Profile
Re: Is PNG files used for all graphics/uvmapping?
« Reply #1 on: May 09, 2006, 04:05:10 am »
Not all, but I'd say that a good majority of textures that wrap around character models especially are and will be in .PNG format. Not too sure of the specific reasons, but it sure beats .JPGs when it comes to quality :}
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 files used for all graphics/uvmapping?
« Reply #2 on: May 09, 2006, 02:04:19 pm »
Karyuu i was thinking i would like to batch convert all the graphic/textures in the game to see if i could get a stable frame rate. You see PNG files are much larger than gifs,jpg. I ran some tests on some of the unzipped and i was able to drop the file size as much as 10% of the PNG size without very much loss of image. Im sure if all are PNG and I/We could convert to a smaller footprint format that works with the engine we could remove alot of system bus traffic and RAM/VRAM req and in affect make it a lighter wieght job for the vid card to render. I might have some time to write a 3D App to check for proof of concept, but im thinking that the test would not put the vid card under the same stress as the main world does in the game.

If i could get the information needed to unlock one of the zip files for the main world i could maybe run some tests. I think the quickest test for me would be to batch convert all the textures for the main town by discarding all of the colour information in the PNG. This should drop the files by 40% or more! which should be enough to see if i get a little higher min frame rate.

Anyways if you think you can help out or have done tests or any other information regarding this idea let me know.

thanks all

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
Re: Is PNG files used for all graphics/uvmapping?
« Reply #3 on: May 09, 2006, 04:13:00 pm »
Yaskina, images are not uploaded to memory of graphics card in original format (as png or jpg or tga or whatever). They are decompressed to bitmap (well, maybe not exactly bitmap but I hope you know what I mean) and stored in card's memory in quite different format. Changing PNGs to JPGs will not affect framerate. And why do you want to discard all color information ?  ???

Quote
...10% of the PNG size without very much loss of image

That can't be true. PS uses relatively small textures, and EVERY pixel is important. Using compression which throws out part of information would mean loosing many small details. Maybe You would not notice this when looking at buildings from a distance, but closer examination would show difference.

The format, which holds data in similar way to that used by hardware is DDS (maybe there are others, but I haven't heard about them).

BTW: formats like PNG and TGA can carry transparency information, JPG can not.
BTW2: converting all textures to other format would require also making changes to maps (textures definitions).
"Close the world, txEn eht nepO."

reisio

  • Traveller
  • *
  • Posts: 29
    • View Profile
Re: Is PNG files used for all graphics/uvmapping?
« Reply #4 on: May 09, 2006, 07:17:42 pm »
PNG almost always compresses lower than GIF or high quality JPEG.  Either you've been misinformed, or you're basing your claim solely on PlaneShift PNGs which haven't been compressed, or both.
aka Eso

Yaskina

  • Guest
Re: Is PNG files used for all graphics/uvmapping?
« Reply #5 on: May 12, 2006, 09:55:56 am »
Well what i am getting at is that i was suspect that alot of the files are larger than they need be. And yes i am correct in that. And i am not missinformed at all as i have worked with graphics for the past 20 years on computers. While at this point i have looked into some of the zip packages and have found jpg tga and png and the later animated version of PNG i forget the suffix atm.

But i have also found that most of these files render perfect in 256 colour with zero loss in image appearance. And in allot of cases i found images that were in tga or png sitting in the zips over 1 meg in file size and they could be saved in a gif or png with 16 colour at maybe 50k with no noticeable loss in image quality that anyone would see rendered in the game. This i m almost 100% sure off. That said!!!! Im sure that if theres no problem using optimized files with the engine, the distro could end up almost a 100 megs smaller with no noticeable loss in quality for the most part. Do the math on download savings/time saved etc. Then after you think about that for awhile and get the real numbers down add loading times and memory req as in most game engine that i have used these files sit unpacked in before it is passed off to the vid card via system bus, oh and not to mention that the file is converted for use by enige. I dont know about you but if i was a computer i would rather deal with a 50k file then a 1 meg file.

While anyways please think about that. I d like to talk about other things i found and some other ideas but im sure you would just try to shoot it down. Oh ya do me a favour what ever your name is dont reply just cause you have a keyboard your reply proves that you have no idea what your talking about. My numbers are rough and done in my head but i can prove what i say, and i was only trying to help. :thumbdown:

thanks and have a greatday, anyone that might want to talk about this idea and is not going to try to flame me for trying to help is more than welcome to contact me as i would be glad to help out if i can. :thumbup:

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: Is PNG files used for all graphics/uvmapping?
« Reply #6 on: May 12, 2006, 10:02:24 am »
We're looking at a different format to store our textures in. dds seems the most promising so far.

Yaskina

  • Guest
Re: Is PNG files used for all graphics/uvmapping?
« Reply #7 on: May 12, 2006, 11:16:48 am »
Xordan i think the best way to approach this is to just dev a texture standard with the idea that its going to be used in a game. I think alot of these textures started as a 256k color file then were upconverted. I know most games 3d use 256k colour or less when ever they can. I have also done some life/photo like 3D renders that use 256k color and less in the textues and you would not even know that it was not photo. Anyways its all about optimization when it comes to games.

Maybe some how i could upload one of my optimized zips to a moderator that plays to try and see what they think. To check loading speed, frame rate, zone image quality etc. It would be as easy as renaming the org file for exp deathrealm.zip to something like org_deathrealm.zip then adding the newer zip in the same folder.

While anyways i was thinking on trying to turn the water in the sewer into an animated gif to see if it will animate with out having placed it as an animated at time of model creation. Who knows maybe ill get lucky and the engine well know what to do with it without being told.

thanks for the info, maybe ill get around to looking at this DDS also tomorrow and let you know what i think

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: Is PNG files used for all graphics/uvmapping?
« Reply #8 on: May 12, 2006, 11:25:34 am »
We know that DDS is the best already. A lot of commercial games use DDS textures, because they're the same format as is what goes into the Vram, so they need no compression/decompression along with mipmap creation(pre created). It's just getting everything to convert correct, work, and look right.

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
Re: Is PNG files used for all graphics/uvmapping?
« Reply #9 on: May 12, 2006, 01:36:21 pm »
(I started writing this before last 2 posts)

@Yaskina

    Hey, I think You misuderstood (not everybody here can clearly express his thoughts in english) and You are overreacting a bit. For example - it wasn't so obvious for me, that You had in mind only reducing number of colours (quote: "...by discarding all of the colour information in the PNG"). And where are the flames in above posts ?
   I too sometimes don't understand, why people waste so many resources (memory, disk space, cpu power) and why don't they optimize things; and sometimes that thoughts are reasonable. But it is simply hard to belive in Your statements, because most beatiful, recent 3d games occupy gigabytes of disk space and they use high resolution graphics with 32-bit colour, (plus normal maps, specular maps etc...) Using 16-colour textures in modern game sounds... ridiculous (no offense, and I do not deny the possibility, that in this particular case You are right, but I would need a proof).  You write later about 256k colors, which sounds much more reasonable.

So I ask for concrete example, maybe a screenshots from PS showing no difference in appearance between original and converted graphics? If You don't know how to modify map, or You have no time for this, just tell, which textures to convert and to what format, and I (or somebody else) can make a comparision. I don't want to experiment with all of textures, so Your experience and intuition is welcome here :). I really would like to try it :).

I think You can use any free, public "virtual disk" to share Your files.

Regards

P.S. Please, please, try not to use agument "I was doing this for xx years, so yes, I am right!". These kinds of statements often meet opposition (conscious or subconscious) and... sometimes are untrue. A bit of diplomacy is always good. "I keep track of trends in computer graphics for xx years, so I am convinced I am right" sounds better :)
"Close the world, txEn eht nepO."

Yaskina

  • Guest
Re: Is PNG files used for all graphics/uvmapping?
« Reply #10 on: May 14, 2006, 05:34:24 am »
Wired how do you like your humble pie? I optimized the default gui and its not too shabby seeing how it knocks off over 15 megs from system memory ( and thats a safe low guess ).

 Im almost certain that engine on my system is not upconverting them to 32bit ( which would not ruduce system memory if this is happening ). You see i dont know down to the last nut and bolt how CS handles everything.

But one thing is for sure the zip pack went from about 9.5 megs to 1.4 megs!!!! alought the quality drops a tiny bit it, but it looks tip top for sure. Only thing i see that i might want to do is work on my custom colour pallet a little more which would create nicer down converts.

BTW can you do me a favour and tell my of a game that is using 100% 32 textures, you see im certain allmost 99% use 8bit and things like colour ramping, bumpmaping, vert painting, etc etc are rendered at 32bit using 8bit textures. Yes most games in the last few years include 32b textures but not 100% of there files are, you see it gobbles up ram like mad if you do....... and just maybe the 32bit files in this game ( most of them are really 8 bit files saved as 32bit ) cause the ram and unstable frame rates problems. I could explain how things work in computers core when moving files around but im not an expert so i wont bother beside i hate typing. Bah i hate words period i like pictures!!! lol

Im going to invite a GM in PM to see if they would like to try it out. If they say it ok for me to send to you PM me and i can send via email or via Yahoo msg system. its only one file at 1.4 meg.

Karyuu

  • Forum Legend
  • *
  • Posts: 9341
    • View Profile
Re: Is PNG files used for all graphics/uvmapping?
« Reply #11 on: May 14, 2006, 05:38:00 am »
Yaskina, we're currently going to try out the DDS format :} Both the sizes of files and loading times have decreased significantly, so we're on the right track for now, with no loss of quality at all.
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 files used for all graphics/uvmapping?
« Reply #12 on: May 14, 2006, 05:47:03 am »
Yes i tried out the DSS format. Still having problems with this format not to much info regarding macs and the use of these. I know in the past is was mirco only but i almost sure that has changed. It would be a nice format to use if there was more support across systems. maybe in the future, although i might have made an error or had wrong format from the 5 or i need to upgrade to 10.4

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: Is PNG files used for all graphics/uvmapping?
« Reply #13 on: May 14, 2006, 01:29:09 pm »
Texure formats depend on the graphics card and the drivers. It has nothing to do with the OS. Any card that would support DX7 can use them. Also, we're more concerned about speed rather than size. DDS is the fastest to load, no question about that, as well as being much smaller and with no loss in quality (which is very important). They actually load faster on linux than on windows as well :)
« Last Edit: May 14, 2006, 02:05:07 pm by Xordan »

Yaskina

  • Guest
Re: Is PNG files used for all graphics/uvmapping?
« Reply #14 on: May 14, 2006, 06:21:15 pm »
Xordan they will load faster on hands down on linux or mac because windows is bloat ware. Linux and Mac are much more optimized at a lower level ( mac also being from hardware up ). Its great your looking into DDS and i think this could be a solution, but  i didn't want to say it before but thats not going to solve any gameplay  or any memory issues. Unless the devs make some of these bit 8bit that should be 8 bit. Yes in some cases you may have to remap but why not.

Where you lose quality in Textures by using 256 color textures is by the amount you scale it when setting the mapping on the mesh. From my Exp your better off to use larger Textures at 8 bit when your scaling the texture to much. This will give you a sweet result and you do not have to worry about taking up to much more memory. i have noticed where texture mapping scaling is an issue in PS.

this is below is sorta what im talking about.

Expample: you could have 1 1024x1024 8bit textures for the cost of 1 32 bit 512x512

Which has more pixels? Which file could hold more detail?