Author Topic: Compression Issues with DDS and normal maps.  (Read 4632 times)

0 Members and 1 Guest are viewing this topic.

Compression Issues with DDS and normal maps.
I ran into a rather annoying issue with DDS, DXT5_nm to be precise.  When a normal map is compressed it processes some very nasty artifacts that I can't seem to get rid of them.  Panel lines that are diagonal produce some nasty aliasing thats very noticeable ingame ruining my texturing work  :(.  Photoshop's plugin, nvcompress and even Compressonator produce the same results.  The only DDS format I found not to produce as noticeable errors is Compressonator's D3D10 BC5 format.

Are there any other image formats supported for normal maps?  Keldor suggested png support, but neither it nor tga seem to work. 

Heres an example:
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: Compression Issues with DDS and normal maps.
I'm not entirely sure, but I think u8888 (uncompressed) may be supported for normal maps.

 
Re: Compression Issues with DDS and normal maps.
I've already tried u8888 (ARGB) and doesn't seem to accept it. (no normal map detail is shown ingame).  It does however produce a clean normal map.
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Re: Compression Issues with DDS and normal maps.
For u8888 to work, you must copy the NM output Red Channel to the Alpha Channel.
Then color Red and Blue channels solid black.
Then save as u8888.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 
Re: Compression Issues with DDS and normal maps.
For u8888 to work, you must copy the NM output Red Channel to the Alpha Channel.
Then color Red and Blue channels solid black.
Then save as u8888.

Thanks!!! That works, now I'll just script it  :)

Edit: Is it possible to do this before creating the orignal dds file?
double edit: nevermind, answered that one myself, yes, just add a alpha channel to the orignal map.
« Last Edit: February 10, 2009, 11:43:44 pm by Scooby_Doo »
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Compression Issues with DDS and normal maps.
i wish fs supported 88VU or 88AL formats for normal maps. be a lot better than wasting a bunch of 8 bit channels. video cards have such ridiculously large amounts of memory now. as games started using dxt1 and 5 en masse i noticed a lot of washed out color. when it comes right down to it dxt compression is just an upsampled 565 format. while i have no problem using dxt1 for a diffuse texture, the development of dxt5_nm as a texture format was more of a cheap hack of a format than an acceptable solution (i blame john carmack, lol). seems since that format was established texture memory on the average video card has doubled.

im also looking at this format, supposidly its the same size as dxt5, but stores the "colors" (and by that i mean uv data) as 8 bit rather than is a 6 and 8 bit respectively (dxt5_nm). essentially all it does is compress both chanels in the same way dxt5 compresses its alpha.

another thing you might want to try, is to copy the green channel to red and blue, or make red and blue 50% grey instead of black. it might remove thr artifacts while keeping the benifits of a compressed texture. only 2 rgb (565 mind you) colors get stored for each pixel block, more color divergance (resulting from red and blue being 0) might result in the converter calculating darker than required color samples for the 2 interpolated colors, causing the normals to lean one way or the other when the 2 bit clor table tells em to use an intrepolated color.
« Last Edit: February 11, 2009, 10:04:20 pm by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 
Re: Compression Issues with DDS and normal maps.
Actually 3dc also suffers from compression issues too.

Also sorry neither of those tricks seemed to help, aliasing is still there, unless I did something really wrong.
« Last Edit: February 11, 2009, 10:23:12 pm by Scooby_Doo »
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Compression Issues with DDS and normal maps.
all compression formats are gonna suffer compression issues no matter how use slice it. 3dc is just taking the idea behind dxt5_nm and improving it, slightly, in that the horizontal channel has the same bit depth as the vertical. but heres the kicker, if fs2 supports a 2 chanel format for normal maps, then you would have the choice between 3dc and uncompressed 88.

you know if i were to have to choose between dxt5_nm and 8888 id probibly pick the former and double the resolution. since the compression ratio is 4:1 if you use dxt5. you might consider doubling the resolution of the image and going with the compressed format.
« Last Edit: February 11, 2009, 10:45:59 pm by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

  
Re: Compression Issues with DDS and normal maps.
Also take a look at D3D10 BC5 format.  It produces a very nice end result and about the same size as DXT5 and 3DC.
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Compression Issues with DDS and normal maps.
bc5 is technically the same as 3dc, from wht ive read :D

if youre gonna go with 8888, it would be better to use one of the 32 bit 2 channel floating point formats.
« Last Edit: February 11, 2009, 10:51:46 pm by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 
Re: Compression Issues with DDS and normal maps.
bc5 is technically the same as 3dc, from wht ive read :D

if youre gonna go with 8888, it would be better to use one of the 32 bit 2 channel floating point formats.

Oh, I can't seem to read 3DC files, infraview doesn't support it.
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Compression Issues with DDS and normal maps.
well the headers are probably different :D

bc5 is the newer standardized version of the format.

i actually find it amusing that nvidia tools call it by ati's name, while ati tools call it by m$'s name
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN