Creating a snow material using procedural textures

In this recipe, we will create a snow material, as shown in the following screenshot, and also fake a slight and cheap Subsurface Scattering effect:

Creating a snow material using procedural textures

The snow material as it appears in the final rendering

Getting ready

Start Blender and open the 9931OS_Snow_start.blend file.

In this file, there is a prepared scene with a Spheroid (the usual Cube with a four-level Subdivision Surface modifier), a Suzanne (press Shift + A and navigate to Add | Mesh | Monkey) with a Subdivision Surface modifier as well, and the famous Stanford bunny (http://en.wikipedia.org/wiki/Stanford_bunny), leaning on a subdivided, displaced, and smoothed Plane renamed Snow_ground. Suzanne is Blender's mascot and an alternative to free test models such as the Stanford bunny itself. By the way, I thought of grouping them in the same scene to have different shapes to test the material.

In the file, there is also a Plane working as mesh-light and a Spot pointing in the opposite direction to try to enhance the translucency of the snow.

How to do it...

Let's start creating the snow material:

  1. Go to the World window and click on the New button. Then click on the little square with a dot on the right side of the Color slot. From the menu, select Sky Texture.
  2. Go to the Material window and select the Snow_ground item in the Outliner. Click on the New button in the Material window under the Properties panel or in the Node Editor toolbar. Rename the material as Snow_01.
  3. Press Shift and select the Spheroid, Suzanne, and the Stanford bunny. Then select the Plane to have it as the active object. Press Ctrl + L and go to Materials.
  4. Put the mouse cursor in the Camera view and press Shift + Z to set the Viewport Shading mode to Rendered.
  5. In the Material window under the Properties panel to the right, under the Surface subpanel, switch the Diffuse BSDF shader with a Mix Shader node. In the first Shader slot, select a Diffuse BSDF shader, and in the second slot, select a Glossy BSDF shader.
  6. Set the Roughness value of the Glossy BSDF shader to 0.300.
  7. Add a Fresnel node (press Shift + A and navigate to Input | Fresnel) and a Math node (press Shift + A and navigate to Converter | Math). Set the IOR (short for Index Of Refraction) value of the Fresnel node to 1.300. Then connect its Fac output to the first Value socket of the Math node. Set the second Value to 10.000 and the operation mode to Divide. Finally, connect its Value output to the Fac input socket of the Mix Shader node.
  8. Add a Translucent BSDF node (press Shift + A and navigate to Shader | Translucent BSDF). Set its color values to 0.598 for R, 0.721 for G, and 1.000 for B.
  9. Select the Mix Shader node, press Shift + D to duplicate it, and paste it between the first Mix Shader node and the Material Output node. Connect the Translucent BSDF node's output to the second input socket. Set the Fac value of the second Mix Shader node to 0.300. Here is a screenshot of the basic shader for your reference:
    How to do it...

    The basic shader for the snow material

  10. Add a Noise Texture node (press Shift + A and navigate to Texture | Noise Texture) and press Shift + D to duplicate it. In the Properties panel of the Node Editor window (press the N key to make this appear if necessary), label them Noise Texture01 and Noise Texture02.
  11. Add a Texture Coordinate node (press Shift + A and navigate to Input | Texture Coordinate) and a Mapping node (press Shift + A and navigate to Vector | Mapping). Connect the Object output of the Texture Coordinate node to the Vector input of the Mapping node. Then connect the Vector output of the Mapping node to both the Vector input sockets of the Noise Texture nodes.
  12. Add a Math node (press Shift + A and navigate to Converter | Math) and press Shift + D to duplicate it three times so that you obtain four Math nodes. Label them Math01, Math02, Math03, and Math04.
  13. Connect the Noise Texture01 node's Fac output (the gray one) to the first Value input of the Math01 node and set the second Value to 2.000. Set the Operation to Multiply.
  14. Connect the Fac output of the Noise Texture02 node to the first Value input of the Math02 node and let its second Value be the default, which is 0.500. Set the Operation to Multiply.
  15. Now connect both the output of the two previous Math nodes to the input Value sockets of the Math03 node. Set the Operation to Add.
  16. Connect the output of the Math03 node to the first Value input of the Math04 node. Set its Operation to Multiply and let the second Value be the default, which is 0.500.
  17. Connect the Math04 node output to the Displacement input socket of the Material Output node.
  18. Now go to the Noise Texture02 node and change the Scale value to 15.000. Leave the other values (also for the Noise Texture01 node) as they are (that is, 5.000 for Scale, 2.000 for Detail, and 0.000 for Distortion).
  19. Go to the Mapping node and set the Scale value to 0.500 for all three axes. Now the Blender UI will look like what is shown in this screenshot:
    How to do it...

    The bump pattern

  20. Add two Frames, label them SNOW COLOR and SNOW BUMP, and parent the appropriate nodes to them as shown in the following screenshot:
    How to do it...

    The overall vision of the snow material network

How it works...

As usual, to understand the creation of this material more easily, we will divide it into two stages: the first stage for the general color and consistency of the snow, and the second stage to add bumpiness to the surface. These stages are explained in detail as follows:

  • First stage: We just made a basic shader by mixing the Diffuse BSDF and the Glossy BSDF shaders by the IOR value of the Fresnel node. The Fresnel output value is divided by the Math-Divide node to obtain a softer transition (try to change the second value from 10.000 to 1.000 to see a totally different effect). Then we also mixed a bluish Translucent shader but gave predominance to the basic shader by setting the factor value in the second Mix Shader node to 0.300. The Translucent shader gives the appearance of light seeping through snow and showing in the shadowed areas of the object, working as a very fast and cheap Subsurface Scattering effect.
  • Second stage: We added two Noise Texture nodes with different scale values to simulate the bumpiness of soft snow. The first two Multiply-Math nodes set the influence of each noise separately. These values were merged by the Add-Math node and piped in one more Math node, set to Multiply as well, to establish the overall weight of the bump effect that, being directly connected to the Displacement input in the Material Output node, affects all the shaders in the network.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.126.33