Key Light
Fill Light
Kicker Light
All Lights
|
|
NORMAL MAP SPECULAR SHADER - 3 LIGHTS
SPECS:
HARDWARE:
|
DirectX 9 or higher
|
TEXTURES:
|
- Diffuse Texture
- Normal Map Texture
- Specular Texture (color specular mask)
|
INPUTS:
|
- Ambient Color
- Diffuse Color
- Specular Power (shininess)
- Light 1 Color
- Light 1 Position
- Light 2 Color
- Light 2 Position
- Light 3 Color
- Light 3 Position
|
PASSES:
|
Three
|
UPDATED:
|
11/26/05
|
DOWNLOAD: (right click and choose "save target as...")
Normal Map Specular Shader - 3 Lights
Normal Map Specular Shader - 3 Lights with Transparency
COMMENTS:
This shader is just like the Normal Map Specular shader except it also includes support for three point lights. It closely approximates the Blinn software shader of Max or Maya.
Because this shader supports three point lights, it's more expensive that the Normal Map Specular Shader. It uses three passes, one for each light whereas the Normal Map Specular Shader does everything in one pass.
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 control the color of the specular high light per-pixel with the Specular Texture. Each pixel of this texture will determine the color of the specular highlight at that spot on the model.
This shader supports normal maps that are created in either positive or negative Y format. Just check the "Flip Normal Map Green Channel" box to switch between types.
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.
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
|