|This tutorial describes how to make a chain-link fence texture. The main lesson to learn from this is the layering of shaders, particularly those with transparency.|
|The first thing to do is to make a fence object. So add a box in the modeller and using the numeric dialog set -2m, 0m, 0m for the low XYZ and 2m, 60cm, 0m for the high XYZ. Change the surface name to fence and save the object as Fence.lwo.|
In layout load the Fence.lwo object. Bring up the Surface panel for the fence
surface and add IFW2_Gradient. Next select Linear and make the Frequency 1.0.
Then set the Wave Type to Scallop. In the Axis Tab set the size to 50mm, 50mm,
50mm for XYZ and set the Rotate to 0,0,45 for HPB. Now what we want to do is make
thin strands of wire with transparent gaps between so set Colors 1, 2 and 3 to black
and Color 4 to white. Set the blends points Blends 1, 2, 3 and 4 to 0%, 0%, 80%, 100%,
respectively. Then to make the black parts transparent set the Alphas 1, 2 and 3 to 100%
with Alpha 4 set to 0%, Then check the Transparency check box in the Affect Tab.
Ensure that the Affects type is set to Force so that the object is forced to be
transparent where we what it. Finally, save all of these settings by clicking on the Save
Texture button and calling the file "Fence.IFW". When this rendered the fence
should look like the following:|
|To start the second layer add another instance of IFW2_Gradient. Bring up the panel for this and click on the Load Texture button then select "Fence.IFW". Now that we have the copy of the first layer we need to make the wire go in the opposite direction so set the Rotate to 0, 0, -45 for HPB. Also, change the Affect Type to Layer. This means that the transparent parts of the second Linear shader do not make everything below transparent only parts that are already transparent. Finally, check the Affect Layer check box in the Affect Tab. This ensures that the first layer's colors will shown through by making the colors in the second layer transparent where the wire is transparent. In effect we are telling the second Linear not to overwrite the underlying color in the transparent parts. To see why we do this uncheck it and render. You will notice that the first set of links are now darkened. Also, try setting the base transparency back to 0% and changing the Affects Type for both the IFW_Linear textures. You should now notice that you get different transparency combinations depending on the Affects Type for the first and second layers. This is an important point to remember that when stacking textures the transparency can be controlled to give a variety of different effects by changing the Affects Type.|