Saturday, February 26, 2005

Almost Done

Ok, so in my last post I said my goal was to have my 2nd normal mapping tutorial done by today. I've worked hard on it this week, but I still have one page left to write. I'm not quite done, but I'm hoping to have some more time tonight to finish it up.

In the process of writing the part of the tutorial that talks about normal mapping compression, I got interested in the subject. I think my next big shader project will be to convert all my shaders so that they can used DXT5 compressed normal maps. Then I can offer both formats for download. I'd also like to create a Photoshop action that converts a regular tangent space normal map to a DXT5 compressable one.

Last night I was reading GPU Gems and found some cool techniques for making realistic looking skin. I want to try that too! There's just too much stuff to try and not enough free time!

2 Comments:

Anonymous Daniel said...

I can see the advantage of using compressed normal maps, here is a quote by Rober Duffy which seems relevant :

"One thing of note on the normal map compression is that generally speaking if you DXT a normal map you get really crappy results. NVIDIA hardware supports palettized compression which yields good compression and normal maps retain hard and round edges really well. Unfortunately this compression does a poor job in other cases and you end up getting splotchy areas. ATI does not support the palettized compression so we needed a better solution. ATI had done some research on various methods of normal map compression and we ended swapping the red and alpha ( which is zero in the case of a normal map ) channels. This effectively allows the compression to do a much better job and is just one extra instruction in the fragment program to move the alpha channel into the red channel."

Not that this really resolves anything, but I'd been considering using palettized textures for normal map compression, however its unsupported under ATI its seems. DXT5 seems like the way to go as you suggest, since in the case of parallax mapping you'd also want to store the offset map in the alpha channel, but with palettized textures that wouldn't work.

February 27, 2005 2:23 PM  
Blogger Ben Cloward said...

Hey, cool - my Blog's first comment! Thanks Daniel. And to go right along with what you said, I just uploaded the new versions of all my shaders with DXT5 "swizzled" normal map compression support.

For the offset mapping shader, I put the height map in the red channel and the red channel in the alpha channel.

I added the compression as a different "technique" so if you put the uncompressed normal map in its slot and the compressed normal map in its slot you can switch back and forth between them simply by changing technique - a good way to compare quality.

March 08, 2005 12:01 AM  

Post a Comment

<< Home