Creating an ice material using procedural textures
In this recipe, we will create a semi-transparent ice material that will look like this:
The ice material as it appears in the final rendering
Getting ready
Start Blender, load the 9931OS_start.blend file, and perform the following steps:
Delete the UV/Image Editor window by joining it with the 3D view.
Select the Plane item, go to Edit Mode, and scale it eight times bigger (press Tab, then press S, enter the digit 8, and press Enter). Go out of Edit Mode and move the Plane 1 unit upward (press Tab, then press G, enter the digit 1, press Z, and finally, press Enter).
Select the Cube and press N to make the Properties panel visible. Go to the View subpanel and check the Lock Camera to View item. The borders of the Camera view turn red, which mean that you can directly use the mouse to move, zoom in, and adjust the position of the Camera around the selected object (the Cube in this case) to obtain a view similar what is shown in the right half of this screenshot:
Next, uncheck the Lock Camera to View item.
Go to the World window and set Color to black.
Select Sun Lamp in the Outliner, and in the Object data window, set the Strength value to 3.000, Size to 1.000, and the Color values to 0.900 for R, 0.872 for G, and 0.737 for B.
Select the Cube, go to Edit Mode, and press the W key. In the Specials pop-up menu, select Subdivide. Press the F6 key, and in the Subdivide pop-up panel under the 3D Cursor position, set Number of Cuts to 2. Go out of Edit Mode.
Go to the Object modifier window and assign a Subdivision Surface modifier to the Cube. Switch from Catmull-Clark to Simple. Set the Subdivisions levels to 5 for both View and Render. Check the Optimal Display item.
Assign a Displace modifier, and in the Textures window, click on New and select the Voronoi texture. Set the Size value to 1.20. Back in the Object modifiers window, set the displacement Strength to 0.050.
Assign a new Displace modifier and select Voronoi texture again, but this time, set the Size value to 0.80. Set the displacement Strength value to 0.075.
Assign a third Displace modifier, select the Voronoi texture, and leave the default size (0.25) as it is. Set the displacement Strength value to 0.020. Here is a screenshot of the displaced Cube primitive for your reference:
A screenshot in the Solid viewport shading mode of the displaced Cube primitive
Switch the Camera's Viewport Shading to the Rendered mode.
How to do it...
After preparing the scene, we are going to create the material:
Select the Cube and click on New in the Material window under the Properties panel or in the Node Editor toolbar. Rename the material Ice_01.
In the Material window to the right of the screen, under the Surface subpanel, switch the Diffuse BSDF shader with a Mix Shader node. In the first Shader slot, select a Glass BSDF shader, and in the second slot, select a Transparent BSDFshader.
Set the Glass BSDF shader's color totally white and the IOR value to 1.309. Set the Transparent BSDF shader's color values to 0.448 for R, 0.813 for G, and 1.000 for B.
Add a Fresnel node (press Shift + A and navigate to Input | Fresnel) and connect it to the Fac input socket of the Mix Shader node. Then set the IOR value to 1.309.
Add a Glossy BSDF shader (press Shift + A and navigate to Shader | Glossy BSDF). Set the color to pure white and the Roughness value to 0.050.
Select the Mix Shader node and press Shift + D to duplicate it. Connect the output of the first Mix Shader node to the first Shader input socket of the duplicated one, and the Glossy BSDF shader output to the second Shader input socket. Add a Layer Weight node (press Shift + A and navigate to Input | Layer Weight) and connect the Facing output to the Fac socket of the second Mix Shader node.
Add a Voronoi Texture node (press Shift + A and navigate to Texture | Voronoi Texture). Set Coloring to Cells and the Scale value to 25.000.
Add a Noise Texture node (press Shift + A and navigate to Texture | Noise Texture) and set only the Scale value to 25.000.
Add a Math node (press Shift + A and navigate to Converter | Math) and set Operation to Maximum. Connect the Fac output of the Voronoi Texture and Noise Texture nodes to the first and the second Value input of the Math node.
Add a Bump node (press Shift + A and navigate to Vector | Bump). Connect the Maximum-Math node output to the Height input of the Bump node, and its Normal output to the Normal input sockets of the Glass BSDF and Glossy BSDF shaders.
Set the Strength value of the Bump node to 0.250.
Add an RGB Curves node (press Shift + A and navigate to Color | RGB Curves) and paste it between the Maximum-Math and the Bump nodes. Set the point in the little window of the node interface at these coordinates: 0.25455 for X and 0.28125 for Y. Click on the little window to create a new point and set its coordinates to 0.74091 for X and 0.26250 for Y.
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 the Vector input sockets of both the Voronoi Texture and Noise Texture nodes, as shown in the following screenshot:
The quite simple network of nodes for the ice material
How it works...
This time, we started by mixing a Glass BSDF shader and a Transparent shader node, modulated by a Fresnel node, and we set the IOR values of both the Fresnel and the Glass BSDF to the refraction value of ice. We also added a Glossy BSDF shader to provide specularity, mixed by a Layer Weight node set on Facing (because the more a mesh normal faces the point of view, the more evident the specular effect is).
Then, using mixed procedural textures, we created the bump effect to perturb the surface of the object (note that the bump also affects the material's refraction).
See also
Here are some links to lists of IOR values that can be used in mixing the Diffuse BSDF component with the Glossy BSDF component through a Fresnel node: