Page 1 of 1

DDS Semi-Transparency

Posted: 21.07.2006, 19:28
by Yusuf.JR
Hello all,
I was trying to save a DDS (DXT1) with semi-transparency and it does not seem to work for me.
In photoshop I create an alpha channel and clear only a portion of the image to be 100%-transparent. The other portion I would like to be semi-transparent?€¦so I tried to select an opacity percentage, but no matter what percent I accept the final result is fully transparent.
If that makes any sense?€¦can anyone help?

Posted: 21.07.2006, 19:55
by chris
DXT1 only supports opacities of 0% and 100%. For textures with semi-transparent areas, you should use either DXT3 or DXT5. Generally DXT3 works better for textures with sharp edges between transparent and opaque regions, while DXT5 is preferred for textures where there are slowly varying opacity gradients.

--Chris

Posted: 24.07.2006, 23:34
by Yusuf.JR
Thanks Chris,
I have tried both DXT3 and DXT5, and I get the same result, 0% or 100% transparency. Not the semi-transparency I am looking for.
I did some research online and found that photoshop might not be compressing the alpha channel improperly. I have photoshop 6.0. There might be an upgrade for 7.0 that has the fix, but I would need it for the version of photoshop I currently own.
I tried a suggestion of using Graphics Converter 3.0 to create my semi-transparent DDS file, but no luck. Same result. 0% transparency or 100%.
Input on this matter would be greatly appreciated.

Posted: 25.07.2006, 11:31
by selden
You might try creating the image using one of the command line utilities. ImageMagick's command would be something like

Code: Select all

composite -compose CopyOpacity alpha-channel.png rgb-image.png -type TrueColorMatte final-rgba-image.png


(Of course, you can specify a .TGA file for output and use nvdxt to convert that to DDS if you want.)

Posted: 25.07.2006, 22:17
by dirkpitt
Yusuf.JR wrote:Thanks Chris,
I have tried both DXT3 and DXT5, and I get the same result, 0% or 100% transparency. Not the semi-transparency I am looking for.
I did some research online and found that photoshop might not be compressing the alpha channel improperly. I have photoshop 6.0. There might be an upgrade for 7.0 that has the fix, but I would need it for the version of photoshop I currently own.
I tried a suggestion of using Graphics Converter 3.0 to create my semi-transparent DDS file, but no luck. Same result. 0% transparency or 100%.
Input on this matter would be greatly appreciated.


It appears you are on Mac OS X. If this is the case, you cannot run nvdxt as selden suggests. However, I have made an experimental DXT 1,3,5 compression tool that uses the Squish library. Please private message me if you'd like to try it out.