Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Alternatives to .TGA
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Lachlan87
Moderator

USA
160 Posts

Posted - May 30 2004 :  08:04:56 AM  Show Profile  Reply with Quote
I've been using .tga's for my game, basically for no reason except that they were smaller than .bmp's and had alpha channels. Recently I took a look at how big my graphics folder was and just about choked. Over 40MB and I'm still just starting!!!

Can anyone recommend a better format for games? I need an Alpha Channel and 16 bit color. If possible, I would prefer a format that DirectX 9 can load for me, but that is not a requirement.

Eric Coleman
Gladiator

USA
811 Posts

Posted - May 30 2004 :  08:40:20 AM  Show Profile  Visit Eric Coleman's Homepage  Send Eric Coleman an AOL message  Send Eric Coleman an ICQ Message  Click to see Eric Coleman's MSN Messenger address  Send Eric Coleman a Yahoo! Message  Reply with Quote
You could store your graphics in a compressed archive, and then just extract them when you need to load them in your game. You could also use .png files, which can store alpha information. Do a search on google for libpng. Png files are just regular bmp data compressed with zlib. You could try to create your own format using bzip2, which is free and better at compressing. Go to the Links page and look in the Tools/Libraries/Engines category for the links to both zlib and bzip2 homepages.

Go to Top of Page

VBBR
Moderator

Brazil
617 Posts

Posted - May 30 2004 :  08:44:12 AM  Show Profile  Reply with Quote
I recommend PNGs also because they are small and free. Also for what Eric said it uses lossless compression, which preserves the image quality.

(I'm in luck here because Revolution3D already loads PNGs for me... )

Also I use BMPs in the development stage because they are easier to edit (MS Paint) and then convert them all to PNGs for final distribution.

Whatever. Who knows...
Go to Top of Page

Sr. Guapo
Swordmaster

USA
272 Posts

Posted - May 30 2004 :  09:26:57 AM  Show Profile  Reply with Quote
Definately go with PNGs. They are tiny compared with bitmaps and they retain all the image quality. Almost all the major photo editing software supports them (PaintShop, PhotoShop, etc.). D3DX 8 can also load them easily in the CreateTextureFromFileEx call. It is really a great little format...

Edited by - Sr. Guapo on May 30 2004 09:28:10 AM
Go to Top of Page

Lachlan87
Moderator

USA
160 Posts

Posted - May 30 2004 :  12:01:51 PM  Show Profile  Reply with Quote
Wowza! Pngs are tiny! Thanks guys, thats even better than I had hoped!
Go to Top of Page

masterbooda
Swordmaster

277 Posts

Posted - May 30 2004 :  1:13:16 PM  Show Profile  Visit masterbooda's Homepage  Reply with Quote
Wow! No kidding I just changed all my .bmps to .png's on a massive game I was working on and saved about 20mbs of room.... That is a great format... why I never thought of it before is beyond me, but I didn't think dx8 supported them...

One question though, can anybody point me to information on extrapulating the alpha channel, that way I can get rid of .dds files too, because they are huge...

DaBooda out...

DaBooda Team is back: http://dabooda.789mb.com/
Go to Top of Page

Almar Joling
Moderator

Netherlands
192 Posts

Posted - May 30 2004 :  1:15:19 PM  Show Profile  Visit Almar Joling's Homepage  Send Almar Joling an ICQ Message  Reply with Quote
Why don't you use TGA's compress feature? OR change the bitdepth lower if needed. I only need 24/32bit for 3 of my 15 textures, the rest is 16 bit with alpha channel.

TGa without compression zipped is still bigger than TGA with compression compressed as ZIP, I checked it out last week for my own stuff :)


Go to Top of Page

VBBR
Moderator

Brazil
617 Posts

Posted - May 30 2004 :  1:30:45 PM  Show Profile  Reply with Quote
Are TGAs royalty-free?

Whatever. Who knows...
Go to Top of Page

Sr. Guapo
Swordmaster

USA
272 Posts

Posted - May 30 2004 :  1:42:53 PM  Show Profile  Reply with Quote
As far as I know...
Go to Top of Page

VBBR
Moderator

Brazil
617 Posts

Posted - May 30 2004 :  2:05:56 PM  Show Profile  Reply with Quote
Great

Whatever. Who knows...
Go to Top of Page

Sr. Guapo
Swordmaster

USA
272 Posts

Posted - May 30 2004 :  6:58:22 PM  Show Profile  Reply with Quote
Here is a quick comparison. I made a huge (1024X768) image and saved it in all the common image formats. Here are the sizes:
BMP: 2305 KB
PNG: 50 KB
GIF: 30 KB*
JPG: 179 KB
TGA: 150 KB

* A gif only holds 8 bits (256 colors) per pixel, and I do not(though I am not sure) think it holds alpha information, though this can be determined using the ColorKey value in LoadPictureFromFileEX.

Using that comparison, I think everybody should use gif, if possible, or PNGs. There is no comparison.

Edited by - Sr. Guapo on May 30 2004 7:02:38 PM
Go to Top of Page

Eric Coleman
Gladiator

USA
811 Posts

Posted - May 30 2004 :  7:03:02 PM  Show Profile  Visit Eric Coleman's Homepage  Send Eric Coleman an AOL message  Send Eric Coleman an ICQ Message  Click to see Eric Coleman's MSN Messenger address  Send Eric Coleman a Yahoo! Message  Reply with Quote
I think .TGA files use Huffman encoding, which is part of the .GIF compression scheme, and that means they fall under the same patent. Someone may want to verify it just to be sure. Also, png files can store an alpha channel. I don't know if Directx8 will load the alpha data.
Go to Top of Page

Sr. Guapo
Swordmaster

USA
272 Posts

Posted - May 30 2004 :  7:06:00 PM  Show Profile  Reply with Quote
This is just what I found out in 5 minutes using PSP 7, so I may have messed something up...

Edited by - Sr. Guapo on May 30 2004 7:48:46 PM
Go to Top of Page

VBBR
Moderator

Brazil
617 Posts

Posted - May 30 2004 :  7:58:40 PM  Show Profile  Reply with Quote
But don't forget Eric, that the GIF patent expired last year (I guess you should know it)... so would it be OK to use TGAs (assuming it falls under the same patent)?

Whatever. Who knows...
Go to Top of Page

Sr. Guapo
Swordmaster

USA
272 Posts

Posted - May 30 2004 :  8:22:19 PM  Show Profile  Reply with Quote
It is fine to use them, I think, even with the patent, as long as you don't create the same compression algorithm for your own file... I may be wrong, however... The patent just stops everyone from copying the idea and distributing their own version
Go to Top of Page

Almar Joling
Moderator

Netherlands
192 Posts

Posted - May 31 2004 :  03:29:47 AM  Show Profile  Visit Almar Joling's Homepage  Send Almar Joling an ICQ Message  Reply with Quote
TGA is supported in DirectX8, so it's not our problem I think :).

Anyway, was the TGA file in it's compressed form? :). and GIF is 256 colors, which won't work out most of the time, JPG should NEVED be used for colorkeyed stuff. And there was something with PNG as well.. :)
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.16 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.