[Question] The trick for getting TGA selection and hud images?
-
EOD_Security-2252
- Posts: 804
- Joined: 2008-06-10 23:08
[Question] The trick for getting TGA selection and hud images?
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
Thanks
Informally retired modder - Projects: Artillery Shell IED,PSC Faction
-
red.murder1
- Posts: 126
- Joined: 2008-07-25 16:00
Re: The trick for getting TGA selection and hud images?
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
Alternatively you could save it as a DXT3 8.8.8.8 ARGB .dds with no MIP maps
-
Brummy
- Posts: 7479
- Joined: 2007-06-03 18:54
Re: The trick for getting TGA selection and hud images?
Just rename it. It'll still work.
-
EOD_Security-2252
- Posts: 804
- Joined: 2008-06-10 23:08
Re: The trick for getting TGA selection and hud images?
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 -

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?
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 -

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?
Informally retired modder - Projects: Artillery Shell IED,PSC Faction
-
red.murder1
- Posts: 126
- Joined: 2008-07-25 16:00
Re: The trick for getting TGA selection and hud images?
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
Then rename it from a .tga to a .dds
-
turnpipe
- Posts: 274
- Joined: 2008-01-27 19:25
Re: The trick for getting TGA selection and hud images?
Thats the trick i reckon.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 -
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?
-
EOD_Security-2252
- Posts: 804
- Joined: 2008-06-10 23:08
Re: The trick for getting TGA selection and hud images?
Turnpipe, that's not the trick, my stuff is like that. Thanks red, I would guess it probably is the atlas files.
Informally retired modder - Projects: Artillery Shell IED,PSC Faction
-
red.murder1
- Posts: 126
- Joined: 2008-07-25 16:00
Re: The trick for getting TGA selection and hud images?
Atlas files are annoying
-
EOD_Security-2252
- Posts: 804
- Joined: 2008-06-10 23:08
Re: The trick for getting TGA selection and hud images?
Yes, yes they are. I had to deal with them to get my flags to work already,
Informally retired modder - Projects: Artillery Shell IED,PSC Faction
-
e-Gor
- Retired PR Developer
- Posts: 3752
- Joined: 2006-03-06 22:40
Re: The trick for getting TGA selection and hud images?
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.
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.
-
EOD_Security-2252
- Posts: 804
- Joined: 2008-06-10 23:08
Re: The trick for getting TGA selection and hud images?
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.
Informally retired modder - Projects: Artillery Shell IED,PSC Faction

