Page 1 of 1

[Question] The trick for getting TGA selection and hud images?

Posted: 2008-08-21 20:26
by EOD_Security-2252
What's the trick for getting HUD images (like weapon selection, etc.) to be accepted by BF2 in the TGA format. Usually, I'll get the error about the HUD image not being there if I leave it in TGA (even though I told the weapon to use the TGA file in the tweaker file). And, PR itself can use TGA images for their HUD images. How do they do it? (DDS images look so crappy compared to TGA)

Thanks

Re: The trick for getting TGA selection and hud images?

Posted: 2008-08-21 21:12
by red.murder1
You've got to flip it upside down and rename it to a .dds,don't ask why
Alternatively you could save it as a DXT3 8.8.8.8 ARGB .dds with no MIP maps

Re: The trick for getting TGA selection and hud images?

Posted: 2008-08-21 21:18
by Brummy
Just rename it. It'll still work.

Re: The trick for getting TGA selection and hud images?

Posted: 2008-08-21 21:46
by EOD_Security-2252
Wait, why would I rename it when I'm not replacing anything?
And red, you're is seriously confusing. Do I just add .dds to the file's name, even though it's a TGA file format?
Overall, I'm not trying to figure out anything but how to make TGA files work, I don't want to use DDS.

See PR's hud files -
Image
All TGA files (even if the selection) and none of them are upside down, and they don't have DDS anywhere in the name. How do they do it?

Re: The trick for getting TGA selection and hud images?

Posted: 2008-08-21 21:56
by red.murder1
Those are loaded from the atlass,flip the .tga upside down in photshop and save it as a 32 bit .tga
Then rename it from a .tga to a .dds

Re: The trick for getting TGA selection and hud images?

Posted: 2008-08-22 15:00
by turnpipe
EOD_Security-2252 wrote:Wait, why would I rename it when I'm not replacing anything?
And red, you're is seriously confusing. Do I just add .dds to the file's name, even though it's a TGA file format?
Overall, I'm not trying to figure out anything but how to make TGA files work, I don't want to use DDS.

See PR's hud files -
Image
All TGA files (even if the selection) and none of them are upside down, and they don't have DDS anywhere in the name. How do they do it?
Thats the trick i reckon.

Re: The trick for getting TGA selection and hud images?

Posted: 2008-08-22 18:23
by EOD_Security-2252
Turnpipe, that's not the trick, my stuff is like that. Thanks red, I would guess it probably is the atlas files.

Re: The trick for getting TGA selection and hud images?

Posted: 2008-08-22 18:25
by red.murder1
Atlas files are annoying

Re: The trick for getting TGA selection and hud images?

Posted: 2008-08-22 18:34
by EOD_Security-2252
Yes, yes they are. I had to deal with them to get my flags to work already,

Re: The trick for getting TGA selection and hud images?

Posted: 2008-08-23 13:42
by e-Gor
You don't need to use an atlas to get them to show up ingame.

The simplest way is to save as .dds (no mipmaps, dxt5 compression if it's got alpha, dxt1a if it hasn't). However, as dds is a fairly lossy compression, this reduces image quality - particularly a bad idea if you're wanting to generate an atlas in future (see later).

The best way for temporary testing is to rename the file to have a .dds extension. For example, if your image is called icon.tga, rename it to icon.dds. Do not resave the file, just right click and rename. You don't need to flip the image if you're saving with the right tga options (one option is for where the origin of the image is). If it turns out upside down ingame, use different file format options for the tga instead of flipping the image itself.

If you're going to release anything or have large numbers of new images, you're best off generating an atlas. This reduces memory usage and increases performance. The process is too complicated for me to say here, but there are tutorials around. Just make sure you rename any files back to .tga before you generate it, or they won't be included.

Re: The trick for getting TGA selection and hud images?

Posted: 2008-08-23 14:02
by EOD_Security-2252
Thanks egor, I am currentlying making this for final, not testing so I don't want to use dds. I kind of borrowed from PR's meme 40 atlas (so I knew the coordinates to use), and everything's working fine now.