Project 1: Shading Networks

Goal To create a complex shading network.
Prerequisite Exercises

We are going to create a complex shading network that will be the material for a burning log. We want the log to flicker and change over time and so a static texture will not suffice.

  1. Create a new Blinn shader and apply it to a sphere. Map the following bark texture into the Color. Bring up the shading network in the Hypershade. To keep things coherent, you will want to rename your shading nodes to more useful names. This will help you and others understand the network if you need to modify it later. You can rename a render node by selecting it and changing the name in the Attribute Editor. Rename the Blinn burning_log_mat, the File node bark_tex, and the 2D Placement node image_placement_2dCoord.
  2. Our material doesn't look burnt at the moment. Lower the Eccentricity, Specular Roll Off, and Specular Color of burning_log_mat so that it looks more like wood. In the Color Balance area of bark_tex's attributes, lower the Color Gain until the wood looks sufficiently burnt.
  3. When recreating a natural phenomenon, it is always good to have reference. Notice how the flames seem to move in the cracks. To create these cracks, we want to have a shader that is white where the shader will be wood and black where the fire should be. There are many ways to do this, but we will use a 3D Crater Texture node.

    Temporarily assign the color of the Crater texture to burning_log_mat so that you can see what it looks like on the sphere. In the Crater texture's attributes, set Channels 1 and 2 to white and Channel 3 to black. Adjust the other attributes until the texture produces nice looking cracks. Notice that the texture changes when you move the sphere. This is because 3D textures are generated based on the geometry's relative position to the 3D Placement object (The green cube in the image below). To make sure the texture doesn't change when you move the geometry, place the 3D Placement object as a child of the geometry.

  4. For the fire in the cracks, create a Ramp that varies from black to orange to bright yellow and back again. You will want to adjust the V Wave, Noise, and Noise Freq attributes of the Ramp to create a more organic look.
  5. To combine our bark and fire textures we will use a Layered Texture node (Not to be confused with a Layered Shader), which can be found under "Other Textures" in the Hypershade's node type list. In the Attribute Editor of the Layered Texture there should be a red box with a default green texture. Middle-click the bark texture in the Hypershade and drag it into the red box. Drag the fire texture in next. Delete the green texture by clicking the X beneath it. If you have somehow removed a texture from the Work Area of the Hypershade, you can find it again under the Textures tab at the top.

    Connect the outColor of the Layered Texture to the burning_log_mat. At this point you should only see wood in the preview. To allow the fire to show through in the cracks we will hook up our cracks texture to the alpha channel of the first layer. The alpha channel determines how transparent something is.

    First we must perform a minor conversion. The cracks texture is generating three values, but the alpha is only one channel. To convert from 3 to 1 (RGB to grayscale), connect the outColor of the cracks texture to the value of a Luminance node. This node can be found under "Utilities" in the Hypershade's node type list. Connect the outValue of the Luminance node to the inputs[1].alpha of the Layered Texture (Input 1 is our bark texture). At this point even the High Quality Renderer will not be able to give a good preview. Render the sphere to see how it looks.

  6. Our log material is looking better, but our fire is rather flat. We can fix this by adding some glow to the fire. Glow is essential for any material that acts as a light source like fire does. We only want our fire to emit glow, so our first attempt would be to connect the outValue of the crack_luminance to the glowIntensity of the burning_log_mat. However, if you look at the first image below, we can see that this is the opposite of what we wanted. In this case the bark is glowing, not the fire.

    Create a Reverse node and connect the outValue of crack_luminance to inputX of the Reverse node. If you connect the outputX of the Reverse node to the glowIntensity of the shader, you should get an image like the second one below. We can see that the correct part of the shader is glowing, but the glow is a bit too intense. Too much glow makes your objects look radioactive.

    To dampen the glow a bit, connect the output of the Reverse node to input1 of a Multipy Divide node. Connect the outputX of the Multiply Divide node to the glowIntensity of the shader. To dampen the glow, change the values of Input 2 in the Multiply Divide node to 0.5. That finishes the work on the shading network.


  7. The last step is to animate the fire so that it moves beneath the bark. This can be done easily enough by animating the Offset and Rotate UV attributes of the 2D Placement node for the fire. When you are done, render out 90 frames (3 sec) and composite them into a movie file in After Effects.
Turn In You will be graded on the following: Turn in the following: