LogoBEN CLOWARD - Technical Artist
Color
Color

Normal
Normal

Diffuse
Diffuse

Specular
Specular

Complete
Complete

  NORMAL MAP SPECULAR SHADER

SPECS:
HARDWARE:
DirectX 9 or higher
TEXTURES:
- Diffuse Texture
- Normal Map Texture
- Specular Mask (diffuse alpha channel)
INPUTS:
- Ambient Color
- Diffuse Color
- Specular Power (shininess)
- Light Color
- Light Position
PASSES:
One
UPDATED:
11/26/05

DOWNLOAD: (right click and choose "save target as...")

Normal Map Specular Shader  Normal Map Specular Shader


COMMENTS:

  • This shader is just like the Simple Normal Map shader except it also includes support for specularity - for shiny objects. It closely approximates the Blinn software shader of Max or Maya.

  • Because this shader supports specularity, it's more expensive that the Simple Normal Map shader and it requires DirectX 9 hardware.

  • You can control the shininess of the shader with the Shininess value. A higher value will make the specular highlight smaller and a lower value will make the highlight broader. Additionally, you can include an alpha channel with the diffuse texture where each pixel of the alpha channel controls the brightness of the specular at that point on the surface.

  • Normal Map compression is an option that you can use with this shader. Copy the red channel of your normal map to the alpha channel. Then delete the red and blue channels and save your normal map in DXT5 DDS format. Put your compressed normal map in the DXT5 Normal Map slot for the shader. Then choose "Compressed" as the technique instead of "complete."

    Updates (11/26/05):

  • Vectors in world space to fix Max 8 lighting bug.
  • Added option to flip the green channel in the normal map.
  • Added a specular mask texture so you can color the spec mask per pixel.


    INSTRUCTIONS:

    For instruction on how to apply this shader to your model in 3DS Max, read my tutorial - HLSL Shaders in 3DS Max.

    For instruction on how to create normal maps for this shader, read my tutorial - Creating and Using Normal Maps.

    If you'd like to use some of my textures with this shader instead of making your own, you can find them here.

    ADDITIONAL:

    If you have trouble getting this shader to work correctly in 3DS Max, send me an email. I'll see If I can help. Also, I'm an artist - not a programmer. If you are a programmer or know more about shaders than I do and you find something in this shader that is poorly written, broken, etc, I'd love to hear from you. I've mostly taught myself how these things work so if you have some pointers for me that would be great!!


    Return to the list of Shaders

  • HOME BLOG PORTFOLIO RESUME RESOURCES CONTACT
     

    Free Content Sponsors: