Using the IFW2_SpecialFX Surface Shaders

Introduction
IFW2_SpecialFX now includes the ability to have a new rendering system take over from the standard Lightwave shading. To see how this works you need to understand how an object is shaded. Initially, the object is shaded with a flat constant color based on the intensity of the ambient light source. Next, the diffuse shading takes place based on the position, intensity and color of the lights in the scene. Finally, any specular highlights are added to the final output color. Again, this is based on the position, intensity and color of the lights in the scene. The various components of the shading can be seen below:

X + =
Ambient   Diffuse   Specular   Final
IFW2 Ambient
IFW2 Diffuse
IFW2 Oren Nayer
  IFW2 Diffuse
IFW2 Oren Nayer
 
IFW2 Anisotropic I
IFW2 Anisotropic II
IFW2 Blinn
IFW2 Specular
IFW2 Phong
IFW2 Velvet
IFW2 Strauss
   

Step One - Using the Diffuse
The first two shaders to understand are the Diffuse and Oren Nayer Shaders. These are both diffuse shaders which have the ambient function built in. The first parameter to understand is Parameter 9. This controls the amount of Diffuse. When it is zero the diffuse function is used in conjunction with the color and alpha maps to color the object as with all the IFW2 textures. However, when this value is non-zero it acts much like the diffuse value found in the standard Lightwave shaders. A small value gives a flat shaded surface with the shading becoming rounder as the value increases. Parameter 8 is the ambient value and works like the Luminosity value found in the standard Lightwave shaders. The higher the value the brighter the object will become. Some examples are shown below:

Parameter8 (Ambient) = 1.00
Parameter9 (Diffuse) = 1.00
Parameter8 (Ambient) = 1.00
Parameter9 (Diffuse) = 0.50
Parameter8 (Ambient) = 1.00
Parameter9 (Diffuse) = 0.01
Parameter8 (Ambient) = 5.00
Parameter9 (Diffuse) = 1.00
Parameter8 (Ambient) = 5.00
Parameter9 (Diffuse) = 0.50
Parameter8 (Ambient) = 5.00
Parameter9 (Diffuse) = 0.01

The Oren Nayer shader works in the same way except that diffuse function is much rougher. This means that this shader is better for surfaces that spread the light out making it look inherently flatter, i.e. like the surface of clay. Note: For completeness a separate Ambient shader is included.

Step Two - Specular
The specular shaders work in more the same way as the diffuse shaders. That is Parameter 9 controls their application. When this value is zero the specular function is used in conjunction with the color and alpha maps to color the object as with all the IFW2 textures. When the value is greater than zero then the specular function uses Color 1 as then color of the specular highlight. The difference with this mode of operation is that the specular highlight color takes into account the light color. Parameter 8 controls how metallic the object appears. As mentioned when this value is zero then the specular highlight is Color 1. However, as this value is increased the highlight color becomes more the color of the object. More importantly, account is taken of the angle between the light and the object so that the highlight becomes brighter at grazing angles. Some examples of the available specular shaders as shown below:

Anisotropic I Anisotropic II Blinn Phong Specular
Param 8 (Metal) = 0.0
Param 9 (Specular) = 1.0
Param 8 (Metal) = 0.0
Param 9 (Specular) = 1.0
Param 8 (Metal) = 0.0
Param 9 (Specular) = 1.0
Param 8 (Metal) = 0.0
Param 9 (Specular) = 1.0
Param 8 (Metal) = 0.0
Param 9 (Specular) = 1.0
Param 8 (Metal) = 1.0
Param 9 (Specular) = 1.0
Param 8 (Metal) = 1.0
Param 9 (Specular) = 1.0
Param 8 (Metal) = 1.0
Param 9 (Specular) = 1.0
Param 8 (Metal) = 1.0
Param 9 (Specular) = 1.0
Param 8 (Metal) = 1.0
Param 9 (Specular) = 1.0

It is important to remember that the specular shaders can be used with IFW2 shading system or Lightwave's internal shading system.

Step Three - Special Cases
It is intended that the reflection and transparency of the surface is still controlled by the internal Lightwave shading system. However, this can cause problems with the application of things like the specular highlight. The best example of this is the fact that if you make the object fully transparent and add, say, the Blinn shader then the highlight will not shown up. The way to over come this is to make an alpha map to control the transparency based on the specular function, in this case the Blinn shader. The alpha map will control the transparency so that the object becomes more opaque closer to the center of the specular highlight so that the highlight becomes visible.


Home Order About Pricing Mail Home Home Back