DDS Semi-Transparency

General discussion about Celestia that doesn't fit into other forums.
Topic author
Yusuf.JR
Posts: 2
Joined: 21.07.2006
With us: 18 years 4 months

DDS Semi-Transparency

Post #1by Yusuf.JR » 21.07.2006, 19:28

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?

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #2by chris » 21.07.2006, 19:55

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

Topic author
Yusuf.JR
Posts: 2
Joined: 21.07.2006
With us: 18 years 4 months

Post #3by Yusuf.JR » 24.07.2006, 23:34

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.

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #4by selden » 25.07.2006, 11:31

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.)
Selden

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years 1 month

Post #5by dirkpitt » 25.07.2006, 22:17

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.


Return to “Celestia Users”