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!

Saturday, February 19, 2005

Working on Normal Mapping Tutorial Again

After several months of working on my shaders, and crunch time at work, I'm finally getting back to work on my Normal Mapping Tutorial. You can find what I've written so far here. My current goal is to have the whole tutorial completed by Saturday the 26th of February. That gives me one week.

Once the tutorial is done, I will add more of my HLSL shaders to the shaders section.

If you have any requests for textures, shaders, tutorials, or other additions that you'd like to see on the site, just leave a comment

Tuesday, February 15, 2005

3DS Max 7

I finally got the full version of 3DS Max 7 installed at work. (We've been waiting to upgrade until our current project was done.) Up until now I've just been using the beta version of Max 7 to test my shaders. It turns out that the multi-subobject bug that I mentioned in my previous post was only a problem in the beta version. The final release version fixes that problem along with a host of others. That's great for me! I spent a good portion of the day playing with the real-time shader features.

I made a new stone wall texture with a normal map and an offset map. It looks really cool. I'm going to add it to my texture archive in the next few days. Here's a screenshot:

Stone Wall Texture

Sunday, February 13, 2005

DX9 Shader Material Bug in 3DS Max

I've recently been building a scene in 3DS Max that uses the HLSL shaders that I've written. I apply the shaders with Max's DX9 Shader material. (I've written a tutorial on using HLSL shaders in Max here.) After working on the scene for a few weeks the viewport performance became very slow and I was no longer able to work in shaded mode. I was discouraged thinking that I would no longer be able to use Max for my HLSL shader platform because it was just too slow.

Instead of giving up I decided to do some performacne experiments. After testing a few different theories I discovered that the frame rate in the viewport was related directly to the number of DX9 materials I was using in a multi-subobject material. If my model only had one multi-subobject material, my frame rate was more than 100 fps. If I had two subobject materials the frame rate dropped to 50 fps. At 4 subobject materials the frame rate went down to 25, and at 8 the frame rate was around 12. See the pattern?

I decided that this must be a bug in the way max handles DX9 shader materials as subobject materials so I chopped up my scene so each object only had one material assigned. Now the frame rate is great and I can work again. This is kind of annoying since multi-subobject materials are part of my work flow, but I can live with this work around for now.

If anyone else has had this problem or knows more about it, I'd love to hear from you.