PDA

View Full Version : Alphas not saving


asouza
06-02-2005, 05:54 PM
Hi folks I've been having this really strange problem when saving dds files with Photoshop (v7.0) and the nVidia plugin (v7.27).

After creating or editing an alpha channel in Photoshop I can't seem to get the alpha channel to save properly. I've been saving it in DXT1 ARGB 1bit Alpha like everyone has mentioned on these boards. But instead of saving the alpha channel seperately, the plugin seems to be applying the transparency to the file. This leaves me with a RGB file with black for the transparent portions of the image.

I've tested this by saving the file in DXT3 and DXT5 and this saves the alpha just fine. Unfortunately weapons need to have the 1bit alpha format.

Is this some strange bug with this newer version? Is there some option I should or should not be selecting. There are quite a few options and I'm not sure what should be modified.

asouza
06-05-2005, 03:08 AM
OK I'll try a different approach. Can you folks tell me what software and their versions that you're using to create mods with transparency? Perhaps the versions I'm using are not communicating properly.

inkblaster
06-05-2005, 06:53 AM
To make the transparency stuff personally I just have piggviewer 1.61 to export a BMP, as I'm usually dealing with patterns or what not, then use GraphicsCoverter3 (http://translate.google.com/translate?hl=en&sl=ja&u=http://homepage1.nifty.com/open-prog/warehouse.html&prev=/search%3Fq%3Dgraphicsconverter3%26hl%3Den%26lr%3D% 26client%3Dfirefox-a%26rls%3Dorg.mozilla:en-US:official_s%26sa%3DG) to make a new .DDS file with all the alpha channel goodness.

Been a while since I used it, there may be better info on the web, but yeah, save the mess of opening alpha channels and saving things right and blah blah blah.

Since I'm too lazy to look for a tutorial, here's the gist.

You export to a BMP with Piggviewer, to create an image, it's easy when dealing with patterns, let's take a cape pattern 5 like in my other post.

Now, I manipulated that image a little, but it's just a black and white image, the main part is white and the jaggedy edge is black. I save it as cape_pattern_5.bmp, and also save it as alpha.bmp

I open cape_pattern_5.bmp in GC3, and then open alpha.bmp in GC3 as Alpha Channel, and you'll see the black area is now transparent.

Simple enough, now how to save?

Under Format you want to pick the second selection, and then the DXT1 1 bit alpha channel, and then file->save, and use the .DDS extension. I think it's the second selection, may be the 1st. Fiddle with it till you get it.

And then open Piggviewer again and do the make texture from .dds file.

But yeah, basically in the alpha channel bmp black is transparent, white isn't, so that's how you finagle that.

it's late, I sleep now.

asouza
06-07-2005, 01:18 PM
Thanks for your post Inkblaster. Doug Rogers over at nVidia explained to me that I was an idiot and had no idea what I was doing. OK no, he didn't exactly say that, he was much nicer about it. . .

In DXT1, if a pixel is transparent, the color *must* be black. Either a pixel has transparency or is has color, there is no other option. This is why is it called a premodulated alpha, the alpha is already multiplied by the color.

DXT3 and DXT5 store alpha in a separate block, so they do not influence color.

I was saving the file to DXT1 format and then I was opening it up again to check it. Silly me didn't realize that the plugin was applying the alpha as a black region like it's suppose to. I thought there was suppose to be a seperate channel like in DXT3 and DXT5 formats.

So it seems that my setup was working just fine, I was just outsmarting myself. :cry: Lets see if I can create some half way decent mods now!