PDA

View Full Version : Problems with transparency in modified files...


conus00
05-10-08, 09:04 AM
Hello all,
I have just recently joined this site... I actually "stumbled upon" this site while I was looking for GWX and I am really impresed by it. Anyway here's my question:
I am fairily new to modifying files and "skinning", nonetheless I consider myself being good in Photoshop. Recently I have been running into this problem: When I modify any files which use "layers" the transparency does not work anymore. I am assuming that the surrounding of the object has to be a certain color to be transparent. Even though I triple-checked the values of the "transparent" color against the original file I am still getting solid black instead of transparent.
I don't know if I am expressing myself good enough it is kinda hard without pictures. If I could post pics it would be much easier.

Anyway, what am I doing wrong? Is there some trick to it?
Just for the record here is the process I have been using:
1. convert the .dds file to .jpg using DDS Converter 2
2. modify the bitmap in Photoshop (CS3 Extended)
4. convert .jpg back to .dds
5. install the mod using JSGME

I would really appreciate any insights on this. It must be something trivial but I cannot figure it out...
Thanks!

Nisgeis
05-10-08, 10:28 AM
Hi Consus, welcome aboard! As far as I know, you can't have transparency in a texture file, it is interpretted as black and I don't think there is a transparency colour key, like in a GIF. I'd check to see, but I just installed Vista to do some troubleshooting, so I don't have any of my tools. You can set opacity through the material properties in the .dat file (using silent 3ditor) where the texture is set up, but it will apply to the whole texture. If you want to put in a real limber hole, instead of just having it black, you'd have to edit the 3d model to remove that section. if you wanted a window, which reflected, you'd have to make a 3d window object and make it transparent and give it a light map.

Someone correct me if they know better please.

conus00
05-10-08, 10:41 AM
Yes, I uderstand that, but here's the problem: I have changed only small details on the part of the file which is gonna stay "solid" so the properties in corresponding .dat file which (I assume) describes which portions of the bitmap will become transparent/semi-transparent (like a mask) should stay unchanged as well...
The HEX value of the surrounding "black" in the modified bitmap is exactly the same as in the original file. Where the original file is transparent the modified one shows solid black...

Here are two examples.
This is how the file is supposed to look like (original file):
http://www.mediafire.com/imageview.php?quickkey=1dzapcxzxze&thumb=4
And here is how it looks like (modified file):
http://www.mediafire.com/imageview.php?quickkey=hjhzxzx2ejz&thumb=4

And again:
(original):
http://www.mediafire.com/imageview.php?quickkey=9yndeev3md9&thumb=4
(modified):
http://www.mediafire.com/imageview.php?quickkey=ujtxujfpym9&thumb=4
(http://www.mediafire.com/imageview.php?quickkey=ujtxujfpym9&thumb=4)

Nisgeis
05-10-08, 10:53 AM
The .dat file only has options to make the entre texture opaque or not, not portions of it. The only exception to this is light sources, which are transparent in the black portions. If you set a portion of a light source's file to transparent, the whole texture becomes solid and also rather odd thinigs can happen (none of which are good).

This is becoming rather abstract, it would help if you said what files you were altering and what you were trying to do.

conus00
05-10-08, 11:03 AM
This is becoming rather abstract, it would help if you said what files you were altering and what you were trying to do.
Ok, please check the links at my original post....
These are screen captures of the problem I am getting.

Also, here are two samples if you want to compare them in the Photoshop.
(original) http://www.mediafire.com/imageview.php?quickkey=xnj2djz1bdz&thumb=4
(modded) http://www.mediafire.com/imageview.php?quickkey=ohyzz0eob0z&thumb=4

conus00
05-10-08, 12:02 PM
What happens if you replace the black "transparent" part with an alpha channel ?
Good idea. I just tried it but no dice. I also opened one of the original files to look at it again and there is no alpha channel either...

Nisgeis
05-10-08, 12:52 PM
Ah, these are 2d graphics, I thought you were talking originally about 3d. The 2d graphics support the alpha channel for masking purposes. What may be happening is your conversion to bitmap (or is it jpeg) is removing the alpha channel (not sure if BMP supports transparency). Get the dds plugin for photoshop, or get gimp with the dds plugin. Not sure if PNG supports alpha channels, but you might try converting the dds to PNG or TGA instead of bitmap. It's also possible that you are stripping out the alpha channel when you convert to dds, you need to save as DXT3 (default for the game I think) or DXT5. DXT1 doesn't support transparency.

Google dds plugin and you should get the nVidia plugin listed for photoshop.

conus00
05-10-08, 10:59 PM
Ah, these are 2d graphics, I thought you were talking originally about 3d. The 2d graphics support the alpha channel for masking purposes. What may be happening is your conversion to bitmap (or is it jpeg) is removing the alpha channel (not sure if BMP supports transparency). Get the dds plugin for photoshop, or get gimp with the dds plugin. Not sure if PNG supports alpha channels, but you might try converting the dds to PNG or TGA instead of bitmap. It's also possible that you are stripping out the alpha channel when you convert to dds, you need to save as DXT3 (default for the game I think) or DXT5. DXT1 doesn't support transparency.

Google dds plugin and you should get the nVidia plugin listed for photoshop.

You nailed it. It was indeed a problem with a alpha channel. The problem was that using DDS Converter 2 I forgot to turn the DXT3 on so it was not creating alpha channels. Also while saving TGA I saved them as 24-bit instead 32-bit (required to keep alpha channel) which was screwing up the conversion back to .dds file...

Anyway, I got it all figured out so I am working on some upragdes for SH4 now.

Mod, please close this thread.