Making Icons on Photoshop Cs4 - exporting tga walpha

Post » Fri May 04, 2012 7:53 pm

1. I'm trying to make icons for new items in my mod. I have the images cropped with a transparent background. I have tried it with a black background as well. I have added an alpha layer. I've hit fill on the background of the alpha layer.

I can't cs4 to save the image to .tga with the alpha intact... it just turns into a solid image.

I have not been able to find a fix or a tutorial for this.

I was going to give them to a friend who said she could do it, but her gimp cannot read photoshop files, and saving to any other format seems to remove the transparency.

I would like to solve this problem in my desired image editing software, photoshop, rather than switching and learning new software such as gimp or paint.net.

2. Also... does an icon have to be 32x32, or can it be 64x64?

thanks!
User avatar
Queen of Spades
 
Posts: 3383
Joined: Fri Dec 08, 2006 12:06 pm

Post » Fri May 04, 2012 10:10 am

Easy first... it has to be 32 x32.

I don't know about savintg icons in tga... I only save them in .dds (DXT 3 or 5). The thing about dds is that the transparency is exported fine, usually, but... if you open them and save them again, the transparency is lost. So, the best thing is to make and export your dds and save the psd in case you want to do further editing. Then you open the psd version, edit it and save it to overwrite the unwanted original.

I can't help much with new versions of Photoshop, I run an old one that lets me click on help to export a transparent image and it does all the work. I don't even add alphas. but I'm sure people here can help with that. It's funny that old software is easier than new, isn't it?
:)
Neil
User avatar
Andrew Perry
 
Posts: 3505
Joined: Sat Jul 07, 2007 5:40 am

Post » Fri May 04, 2012 6:51 pm

Yeah, honestly, when I want to export in dds format a huge menu with many many different options opens up, and I did not have success with exporting with alphas in dds either. I have photoshop elements on win7, and I have a dds plugin, but my main image editing software is on OSX and I haven't found a .dds plugin for that yet. So, for me, no dds plugin for CS4. My older photoshops no longer function on the newer operating system, so I can't investigate that option.

Thanks again, though.

In the end, if no one knows how to do it, I will try to find someone that can do it for me. I don't like being a modder and having to bother people for icons, but such is life so far.
User avatar
Ashley Hill
 
Posts: 3516
Joined: Tue Jul 04, 2006 5:27 am

Post » Fri May 04, 2012 12:02 pm

That big ol' menu of dds options can be intimidating,bringing out the FUD factor in all of us. Really though, most of those options will already be at the correct setting, and the only thing you really have to look at is to be sure to generate mip maps, and the DXT choice. For icons, I use DXT 3 though DXT 5 is also supposed to work. The difference between the two is an unknown to me, but it has to do with the way alphas are handled.

Also, don't look at the little icon window in the CS object window too closely, always check to see what the icon looks like in-game instead. DDS is the way to go, tga will get you no respect among Morrowind modders.... It's a very unpopular choice. I'm kinda busy right now, but later on ( a few days ) maybe I could make icons for you if you can't figure it out.
User avatar
Harry-James Payne
 
Posts: 3464
Joined: Wed May 09, 2007 6:58 am

Post » Fri May 04, 2012 7:54 pm

tga will get you no respect among Morrowind modders.... It's a very unpopular choice.

Why is that? They both seem to function equally well as far as I can tell. Bethesda used .tga for their icons.

If a modder tells me "you're doing it wrong" but provides no reason why that is, I'm not worried about their respect, honestly.

However, I do want my mod to be as good as I can make it, so if you have moment to give me the facts about tga vs dds, I'm willing to learn.

I just tried to export in .dds format as you instructed, and it totally changed the shape of the icon and distorted it. Generate Mip Maps was already checked, so I left that alone. I tried DXT3 and DXT5 and they both produced a rectangle shape with the backgrounds filled in with various colors. Or, were you saying that it's supposed to look distorted, and will look right in-game?
User avatar
Kelly Osbourne Kelly
 
Posts: 3426
Joined: Sun Nov 05, 2006 6:56 pm

Post » Fri May 04, 2012 12:07 pm

Also, don't look at the little icon window in the CS object window too closely, always check to see what the icon looks like in-game instead.

Oh, for crying out loud! Thank you for pointing this out. All this time I have been assuming that I was doing it wrong because of how it showed up in the CS. Yes, it works under DXT3. The CS apparently can't display it properly.

But, I'm still curious about the tga vs dds debate and the reasons behind it.

Thanks!
User avatar
Andrea P
 
Posts: 3400
Joined: Mon Feb 12, 2007 7:45 am

Post » Fri May 04, 2012 9:10 am

Glad to hear it's working out! :)

Tga tends to be "lossy" meaning the quality deteriorates comparatively faster each time it's saved. It also tends to be a larger file, thus taking up more room. That's not something that most people pay attention to these days given the huge sizes of downloads that are available, but it does add up in terms of overhead. Last but not least, the mip maps that distort the view in the object window, give a sharper 3d image in game, especially in larger uses like a... tree for instance, where the dds is used for the trunk and foliage.

There may be other reasons as well, but these are the ones I'm most familiar with.
User avatar
Lucky Boy
 
Posts: 3378
Joined: Wed Jun 06, 2007 6:26 pm

Post » Fri May 04, 2012 3:09 pm

Okay, thanks for explaining that. So, for icons, it really doesn't seem to matter. The dds is 2 kb and the tga is 4 kb.... and we don't have to worry about 3d images in your inventory. ;) So, if I *did* use a .tga for an icon and it worked, I could reasonably consider it trolling if a fellow modder got upset about that extra 2 kb file size.
User avatar
Siobhan Thompson
 
Posts: 3443
Joined: Sun Nov 12, 2006 10:40 am

Post » Fri May 04, 2012 11:58 am

It might be considered trolling if all we are talking about is one icon. However, when you consider that some people run a couple of hundred mods, and many mods can have hundreds of icons (NoM for example has quite a lot), you are now talking about making a 20 mb icon folder into a 40 mb folder. A lot of people just don't want that unneeded overhead in their game.
User avatar
Sara Johanna Scenariste
 
Posts: 3381
Joined: Tue Mar 13, 2007 8:24 pm

Post » Fri May 04, 2012 4:02 pm

Understood. I'm creating 6 icons. But,, I'm using .dds format anyways....

and windows tells me that my icons folder is 28.1 MB (51.4 mb size on disk). I see it does add up!

Thanks for all the info!
User avatar
Mandy Muir
 
Posts: 3307
Joined: Wed Jan 24, 2007 4:38 pm

Post » Fri May 04, 2012 6:50 pm

Here's my 2 cents on tga and dds. Of course dds is much more powerful and really is just better to use as a general rule for images requiring alpha. But, tga is a much smaller result in file size than dxt 5 usually, and produces nice solid edges for images that dont need partial transparency (i.e. clothing items whose parts in the image are either completely visible or not visible at all [ black and white in the alpha channel ]). tga doesnt seem to work well at all for alphas with shades of gray (partial transparency or gradually fading edges). So if I need my image alpha to be exclusively "black and white" meaning "totally there or totally not there" I use tga. So how do you make a .tga without hassles? Well...

I also have a lot of struggles with making final dds and tga versions in gimp. I find dxtbmp, a small, easy to install (and free) program tool, to be the solution. (just search internet with keyword "dxtbmp"). This program loads your dds or tga and splits out the image and alpha channels for you next to each other on the same screen. Then you can export each part separately into paint or whatever bmp editor you prefer. Then you can cut and paste into gimp or irfanview as needed, when you are done, dxtbmp lets you import the result back in (again separately for the alpha and actual image) and saves up the tga accurately. (and DXT1, 3, 5, etc as well). In other words, if you prefer doing your art editing in bmp format at first like me, dxtbmp is probably the way to go to convert your bmps into tga or dds.

PS: for images that you like to have a solid edge and you want to use tga, but you need partial transparency over the whole image, you can still use tga by changing the mesh alpha in nifskope under NiMaterialProperty (as long as there is also a NiAlphaProperty there). This alpha value ranges from 0 to 1.0 where 0.5 would be "halfway transparent".
User avatar
Beast Attire
 
Posts: 3456
Joined: Tue Oct 09, 2007 5:33 am

Post » Fri May 04, 2012 2:17 pm

Since I have an hour to kill I am going to post a detailed methodology of how I would make an icon as a targa. If it helps anyone understand it was worth it, if not, oh well. This will assume you have: paint (installed automatically on any windows machine), gimp (free powerful image editor), and dxtbmp (free, see above post) - optionally irfanview (free).

- Locate an existing .tga icon in Data Files/Icons/... Open with dxtbmp. Go to menu "Image" and select "Send to Editor". The image without alpha has now been opened in a paint window for you called "norm.bmp". Now you can either draw your new icon image in paint, or draw it elsewhere or use one you made/edited previously and just paste it into this paint window - dont worry about the alpha stuff for this part, just make sure it looks how you want it to look overall as a 32x32 image itself. Now save it (important - do not "save as" as that will change the directory and dxtbmp wont be able to reload it) - just "save" - don't close this window yet as you need it for later steps. Now back to dxtbmp window and "Image -> Reload after Edit".

- (Optional) If you find your image used in the above step needs color/brightness corrections, paste it into irfanview and then pick "Color Corrections" or "Enhance Colors" depending on what version you have. Irfanview provides a one-stop shop for changing RGB, gamma correction, brightness/contrast, etc as opposed to gimp's which has your color tools spread out into different dialogs. I know gimp's is more powerful, but I find not being able to do all my (simple) color edits under a single preview session a bit irritating at times. When done, copy and then paste it back into your "norm.bmp" paint window, save, and reload after edit in dxtbmp as described above.

- Now for your alpha. Start up gimp, and paste your image from "norm.bmp" into gimp. Now from your gimp layers box, create a duplicate layer, and select it. Click the eye icon to make it not visible for now. Now select the visible layer (the one that still has an eye icon). Now, in the gimp image window (where the image is displayed), fill it with all black. Next go back to gimp layers box and click the eye icon so that both layers are visible (both show an eye icon). Now click the topmost layer (should be the all black one but it doesnt matter what order they are in really). Adjust the visibility slider for the topmost layer to about 60-70% so that you can "see through" the black layer a little. This black layer is your alpha layer and will be referred to as such henceforth. Now, using the pencil tool in gimp, set it to 1 pixel dimension and make sure white is the selected color (look for the intersecting black and white boxes at the lower part of the gimp toolbox window, and click the tiny arrows thing until white is the top box). Make sure the alpha (black) layer is selected in the gimp layers box. Now, in the gimp image window you can start clicking around the edge of your "real" image which you should be able to see partially through the alpha layer. In other words you are tracing the edge of your "real image" pixel-by-pixel with the white pencil tool. (zoom in your view as needed). When completely traced, now fill in the inside pixels with white as well. When you are done, the parts of your "real" image that you want to be visible should look "lit-up". Now you need to get this alpha image you just drew into dxtbmp. The "refresh alpha" feature in dxtbmp sometimes creates errors in the alpha layer so dont use it. Instead, use a workboard bmp. I personally use a file named "1alphaworkboard" so it's at the top of the textures directory and thus easy to scroll to. In other words, from gimp, copy your alpha layer, paste it into paint (make sure it stays 32x32), and save as a new file name. Now in dxtbmp use "Import alpha channel" and select the file you just saved as. Now you have both your "real" image and your alpha image loaded into dxtbmp. Save from dxtbmp as the file name you want for this new icon. And that's it, before closing any windows - view the finished tga you just saved and make sure it looks as expected (see below)

- (optional) Open your new tga file with irfanview, which shows you how the finished product will look with all alpha transparency applied. Much faster than loading photoshop or gimp.
User avatar
Jeremy Kenney
 
Posts: 3293
Joined: Sun Aug 05, 2007 5:36 pm


Return to III - Morrowind