One of most important concepts with the IFW2 Textures is the idea and application of color maps. A color map is defined
as being Color1 to Color8 and Blend1 to Blend8. These 16 parameters define and control the application of color for any
given pattern. Now, with a single shader a color map can easily be generated with up to eight colors. But, what if a color
map was required with more colors?
First of all imagine this is the color gradient we want to create :
As you can see this can not be done using the eight colors available.
|The first thing to do is set up the first eight colors so add IFW2_Gradient and select Linear. Adjust the size and position so that you get a single gradient running along the length of the object. Then set up the first eight colors, red to white using the table above. Then set the blends to the following values, 0%, 10%, 20%, 30%, 40%, 50%, 60% and 70%. The image on the left shows how the gradient should look.|
||To add the extra colors to the gradient we are going to use the "Use Last Layer" feature. This allows a texture to use the results of the last texture as its basis. This means we can use it to extend the gradient without having to re-calculate it. Just to prove that it works add IFW2_Noise and check the "Use Last Layer" on the Bump Tab. Now the first thing to remember is the 70% of the gradient is already used and we don't want to overwrite the texture function. Now, make Color3 White, Color2 Black and Color3 Grey as detailed in the table above. Then make Blend1 70%, Blend2 80% and Blend3 100%. As we just mentioned we want the underlying gradient to show through up to 70%. To do we use the alpha mapping so make Alpha1 100% and check the Affect Layer check box. To see how this works view the alpha map using the Preview Alpha. You will see that where the alpha map is white no color modification will occur and where its black our new gradient colors will be applied. The first image on the left show how the alpha map would look if it were applied to the object and the second shows the final gradient.|
|To layer the gradients we used an alpha map to control the layer opacity. This was done to show the use of the alpha maps. Another method that could have been used would have been to uncheck the enable color check box for Color1 (White) in the second shader. This effectively tells the color map to use the underlying color rather than the specified color. This means that the gradient from the previous layer would show through achieving the same results as the alpha map method for much less effort.|