Hey guys, I was wondering if anyone out there knew a way to compress several TGA files to reduce the file size. Losing some quality is okay, but I just really want to find a way to get the image file size down without converting to .DDS
.TGA is an uncompressed format, meaning the filesize stays the same unless you change the resolution (image size) of the image. If you do not wish to use a .dds, then your only solution is to reduce the image size (eg 256x256 -> 128x128)
.DDS is a superior file format to use due to it being a compressed format with many options to for image quality or file size efficiency. Even if you don't wish to use this format, I'm still going to recommend it because you can easily shave off at least a third of the filesize while keeping optimal quality.
Ditto with the exception that .TGA can use RLE compression. Its not very efficient though and converting to .DDS is much better. In many cases reducing resolution/dimensions can be perfectly acceptable. IE, 512x512 normal maps for terrain with 1024x1024 diffuse.
Also, if a channel is not needed, make sure it is black. IE, leaving duplicate image info in all three of RGB when you only need it in the green channel triples the file size.
Btw, why the reluctance to use .DDS? do you simply not have the ability to save into or work with it?
Ditto with the exception that .TGA can use RLE compression. Its not very efficient though and converting to .DDS is much better. In many cases reducing resolution/dimensions can be perfectly acceptable. IE, 512x512 normal maps for terrain with 1024x1024 diffuse. Also, if a channel is not needed, make sure it is black. IE, leaving duplicate image info in all three of RGB when you only need it in the green channel triples the file size.
Well I need the solution to be something I can do in batch, because I have over 4,360 .tgas to compress. How can I use RLE compression? I looked at it a little but I don't think it is readable after? Idk honestly lol.
Quote:
Btw, why the reluctance to use .DDS? do you simply not have the ability to save into or work with it?
When I convert all the .TGAs to .DDS, the texture paths are lost. And there is no way I'm going into 3DS Max and reapplying .DDS textures to over 1,765 (and counting) models.
If you have that many models and that many textures attached... How exactly are you going to publish that O_o
they are split up into multiple .mod files that can be used as model libraries. basically you can choose which theme your map is going to be (like desert, forest, snowy, tropical, etc..) and then pick the corresponding .mod file with the same theme.
RLE is a compression option when saving .TGA files and is available in all editors I have used to save such files. My recommendation is to write a script to open and resave all your files doing this. Honestly though, you should have thought this out ahead of time. You really need to be using .DDS for this, your file size savings are going to be huge.
Look into scripting for 3DS Max, after all, you are only changing the extension.
There is no way to export the .M2 files as .M3 files with .DDS textures. It saves them as .DDS files. As far as I know, there is no way to have "thought this out ahead of time" because I couldn't find a way to efficiently export the models. So now, I'm trying to find a way to reduce filze size the best I can.
Not sure what you are talking about here... The model files reference texture files and those textures are stored externally... Those files need to be converted to .dds and a script should be written and run to batch change all the paths to reflect this.
I use Blizzard's built in compression for TGA files, simply because for high detailed pixel work in the UI, having a uncompressed format is a lot better. You are looking at say 5-10kb extra for a TGA file compared to DDS for ability icons, the size difference is negligiable. On the other hand, the loading screen that imported is a 2560x1440 DDS file, simply because it would be 2mb extra to import it as TGA, after compression.
TGA is fine for small delicate work, such as icons. Larger files are better suited to DDS ... keep in mind that if you have a lot of imports as Tofu does, then you should create a mod just for import files, so when you update the map people do not need to redownload the mod. ATM, we have the Map > Data Mod > Hero Assets > Game Assets, all daisy chained in the order of less likely to be updated.
Okay, for icons and small files, sure you can say you're looking at a 5-10kb difference, and that is completely acceptable.
However, we're not talking about icons, these are thousands of models (exported from WoW) with thousands of textures attached.
Assuming that the texture sizes are 256x256 ('small' texture size, standard in SC2 is 512x usually) we're talking about 0.78mb uncompressed, 0.50mb RLE. If you take this to .DDS, it goes down to 0.13mb, 128KB for the same 256 texture. We're talking a difference of 370kb here, for one 256x texture map.
Over the long run, you're going to be saving yourself megs and megs of file space for switching to .dds, much more than you would going with RLE compression. You can also use textureswapbyid method to redirect the texture paths to your .dds, which would be a bit of a hassle to do for each asset; but would be much better than creating 10's if not 100's more mods to accomodate the extra filesize. I mean if you were working with 10-20 assets, I wouldn't be pushing this as hard. Considering you're working with a high volume of assets, filesize is a major factor here. This would help with the limit on mod sizes and keep your map stable by using fewer dependancies.
You can also use textureswapbyid method to redirect the texture paths to your .dds, which would be a bit of a hassle to do for each asset; but would be much better than creating 10's if not 100's more mods to accomodate the extra filesize.
Can you explain what this is a little more? Thanks alot everyone.
You can even rename the file ending, if for example a model from WoW wants a .tga texture. So save it as compressed .dds and rename the "dds" to a "tga" and import it into your map. The editor will throw errors, but the textures work ingame. That's better/easier than using the "texture select by ID" only to apply a dds texture instead of tga.
You can even rename the file ending, if for example a model from WoW wants a .tga texture. So save it as compressed .dds and rename the "dds" to a "tga" and import it into your map. The editor will throw errors, but the textures work ingame. That's better/easier than using the "texture select by ID" only to apply a dds texture instead of tga.
what? That doesn't seem to work at all.. It just shows spheres
I convert my small icons from tga to dds still, even though they are so tiny in size. A 64x132 icon I use is 34 kb in size as tga. When I save it as dds, it's actually only 4.25 kb. That's a HUGEEEE difference to me. I'm making over 1200 custom ability icons. If I saved as tga, that's roughly 40 megabytes of data. Saving with dds reduces it only to FIVE (5) MB. This is huge to me. Everything helps.
You might have to convert everything 1 x 1 by yourself. I couldn't find any mass convert programs. Sorry, but gl!
Hey guys, I was wondering if anyone out there knew a way to compress several TGA files to reduce the file size. Losing some quality is okay, but I just really want to find a way to get the image file size down without converting to .DDS
Thanks!
@Terminator8: Go
Really? No one? Bump
.TGA is an uncompressed format, meaning the filesize stays the same unless you change the resolution (image size) of the image. If you do not wish to use a .dds, then your only solution is to reduce the image size (eg 256x256 -> 128x128)
.DDS is a superior file format to use due to it being a compressed format with many options to for image quality or file size efficiency. Even if you don't wish to use this format, I'm still going to recommend it because you can easily shave off at least a third of the filesize while keeping optimal quality.
@Triceron: Go
Ditto with the exception that .TGA can use RLE compression. Its not very efficient though and converting to .DDS is much better. In many cases reducing resolution/dimensions can be perfectly acceptable. IE, 512x512 normal maps for terrain with 1024x1024 diffuse. Also, if a channel is not needed, make sure it is black. IE, leaving duplicate image info in all three of RGB when you only need it in the green channel triples the file size.
Btw, why the reluctance to use .DDS? do you simply not have the ability to save into or work with it?
Well I need the solution to be something I can do in batch, because I have over 4,360 .tgas to compress. How can I use RLE compression? I looked at it a little but I don't think it is readable after? Idk honestly lol.
When I convert all the .TGAs to .DDS, the texture paths are lost. And there is no way I'm going into 3DS Max and reapplying .DDS textures to over 1,765 (and counting) models.
@Terminator8: Go
If you have that many models and that many textures attached... How exactly are you going to publish that O_o
they are split up into multiple .mod files that can be used as model libraries. basically you can choose which theme your map is going to be (like desert, forest, snowy, tropical, etc..) and then pick the corresponding .mod file with the same theme.
RLE is a compression option when saving .TGA files and is available in all editors I have used to save such files. My recommendation is to write a script to open and resave all your files doing this. Honestly though, you should have thought this out ahead of time. You really need to be using .DDS for this, your file size savings are going to be huge.
Look into scripting for 3DS Max, after all, you are only changing the extension.
@AlphaShadows: Go
There is no way to export the .M2 files as .M3 files with .DDS textures. It saves them as .DDS files. As far as I know, there is no way to have "thought this out ahead of time" because I couldn't find a way to efficiently export the models. So now, I'm trying to find a way to reduce filze size the best I can.
@Terminator8: Go
Not sure what you are talking about here... The model files reference texture files and those textures are stored externally... Those files need to be converted to .dds and a script should be written and run to batch change all the paths to reflect this.
I use Blizzard's built in compression for TGA files, simply because for high detailed pixel work in the UI, having a uncompressed format is a lot better. You are looking at say 5-10kb extra for a TGA file compared to DDS for ability icons, the size difference is negligiable. On the other hand, the loading screen that imported is a 2560x1440 DDS file, simply because it would be 2mb extra to import it as TGA, after compression.
TGA is fine for small delicate work, such as icons. Larger files are better suited to DDS ... keep in mind that if you have a lot of imports as Tofu does, then you should create a mod just for import files, so when you update the map people do not need to redownload the mod. ATM, we have the Map > Data Mod > Hero Assets > Game Assets, all daisy chained in the order of less likely to be updated.
Okay, for icons and small files, sure you can say you're looking at a 5-10kb difference, and that is completely acceptable.
However, we're not talking about icons, these are thousands of models (exported from WoW) with thousands of textures attached.
Assuming that the texture sizes are 256x256 ('small' texture size, standard in SC2 is 512x usually) we're talking about 0.78mb uncompressed, 0.50mb RLE. If you take this to .DDS, it goes down to 0.13mb, 128KB for the same 256 texture. We're talking a difference of 370kb here, for one 256x texture map.
Over the long run, you're going to be saving yourself megs and megs of file space for switching to .dds, much more than you would going with RLE compression. You can also use textureswapbyid method to redirect the texture paths to your .dds, which would be a bit of a hassle to do for each asset; but would be much better than creating 10's if not 100's more mods to accomodate the extra filesize. I mean if you were working with 10-20 assets, I wouldn't be pushing this as hard. Considering you're working with a high volume of assets, filesize is a major factor here. This would help with the limit on mod sizes and keep your map stable by using fewer dependancies.
Can you explain what this is a little more? Thanks alot everyone.
http://www.sc2mapster.com/forums/resources/tutorials/20772-data-actor-events-message-texture-select-by-id/
It's basically an actor event that lets you replace textures of any model.
You can even rename the file ending, if for example a model from WoW wants a .tga texture. So save it as compressed .dds and rename the "dds" to a "tga" and import it into your map. The editor will throw errors, but the textures work ingame. That's better/easier than using the "texture select by ID" only to apply a dds texture instead of tga.
what? That doesn't seem to work at all.. It just shows spheres
In the editor or ingame?
@AlphaShadows: Go
I convert my small icons from tga to dds still, even though they are so tiny in size. A 64x132 icon I use is 34 kb in size as tga. When I save it as dds, it's actually only 4.25 kb. That's a HUGEEEE difference to me. I'm making over 1200 custom ability icons. If I saved as tga, that's roughly 40 megabytes of data. Saving with dds reduces it only to FIVE (5) MB. This is huge to me. Everything helps.
You might have to convert everything 1 x 1 by yourself. I couldn't find any mass convert programs. Sorry, but gl!
converting one by one is out of the question. it's not even a matter of dedication.. it would literally take me years.