Hi
I've been doing some backdrop trees for a project. We will be using DDS textures for our 1bit alphas. We won't be using the .tga format. Since according to our programmer you can't tell if it's 1bit or interpolated alpha using a .tga format. Codewise that is. Now i've been trying a series of different settings using nvidias DDS format. All i get is a huge black outline on my backdrops. Like someone went in with a black magic marker and made thick thick outlines.
Here is the colormap for the backdrop:
And here is how the alpha channel looks:
Now the funny thing is that when i'm looking at the file through the small thumbnail. The background looks black!
I've checked and checked again when i save the file. In the DDS preview window, both 2D and 3D preview. It does NOT! have a black background. I've serched Nvidias Page for any solution but i havn't found any. Read through a lot of documentation but havn't found any.
Replies
>> that`s waht I`d use if it`s 1bit alpha
If you already tried that, please ignore
Thank you vik for your reply
As it happened, it was an issue with the way the engine processed the textures and it actually made the transparent alpha area black in the RGB channels. Sadly we didn't get a workaround for it and just had to put up with it best we could
Thank you for your reply Talon
(yup was a screen grab)...
Dekard: Is that a viewport grab? My trees looks like that in Maya. no black outlines there. It's only when i load them into the engine.
I've had the same problem here so I've done some investigations...
The black outline is black because of your world background which is surely black too.
Others colors can appear too, depending of the 3D engine and objects which are behind your transparent one...
In most cases, it is a sorting problem ( objects with objects ).
Your developers have to code a better sorting function here.
A)
Textures using 1bit or explicit alpha will render the areas with 0-alpha as a default black background. Discarding any color information in order to be able to compress the texture more.
The engine processes the texture in some strange way. My reasoning here is that it either destroys the current mips and creates it's own. And that it there defaults the 0-alpha areas of the background color to black.
What would be very intressting would be to se if there are any other game engines out there who actually uses the DDS format for their texture. I don't think i've actually modded for one that has.
Thank you Funshark for your reply
if you import a 1 bit alpha texture into unreal3 it doesn't cause this problem for some reason and i figure its saved it as a 1 bit dds inside the unreal packages so there can be engine side solutions to the problem !
the problem indeed is that it will turn all the alpha areas black in the r g and b channels probably for extra compression efficiency and i am also sure that you cant tell the nvidias plugin to do something else.
so figure out an engine side solution
or
make two textures a no alpha dxt1 texture and a 2 bit 1 Chanel texture and tell it via the shader to use that as the alpha
Our engine ( DirectX based ) uses DDS principaly and i can affirm you it was a sorting issue. Because developers have corrected the problem.
If the sorting is correctly done, you don't see any border on your alpha.
Then, I've never seen a background color ( other than black ) in a DXT1 DDS; created with the ATI or Nvidia plugin. If someone has succeeded in this task, please tell me
And if you wan't to do something special to any of your miplevels. You can just load the DDS into Photoshop and check the option 'Load Mipmaps'.
Phew...
Problem solved and much learned.
Thank you everyone who has replied to this thread
*edit*
Found some more intressting information about DDS compression.
Enjoy the reading: http://developer.nvidia.com/object/real-time-normal-map-dxt-compression.html