Learn to create realistic shaders - Chapter 1

Look inside the opening chapter of Learn to create realistic shaders, using 3ds Max and V-Ray…

Welcome to this new tutorial series! In the next three installments of this tutorial we'll be creating complex materials and shaders for a control panel full of buttons, switches, levers, knobs and any other sort of machinery-related object.

We will also set up the lighting for our scene, together with some critical rendering parameters and options. We will use 3ds Max 2013 and V-Ray for the rendering.

Let's get started by having a look at the 3D scene I have provided (Fig.01). It's composed of a simple square room with a big opening on one of the side walls. Some sort of machinery is lying near the north wall of the room and it's got a quite complex control panel, which is the focus of our tutorial.

Fig. 01_

Fig. 01_

In this first part we will just create materials and shaders for the biggest objects (the machinery itself, the walls, the floor). We will not be covering the rendering setup here, since we will talk about that in the third and last part of the tutorial, so don't worry about rendering in this phase. We will just set up a basic lighting with one V-Ray light and some GI to better see how our materials react to light.

If you render the scene, you'll get something similar to Fig.02.

Fig. 02

Fig. 02

As you can see, basic lighting has been set up for you. It's composed of a simple V-Ray light pointing down from the ceiling. In the Render Setup panel, the GI is enabled (Irradiance and Light Cache) and the scene has been rendered through a V-Ray physical camera (Fig.03).

Fig.03

Fig.03

If you want to check or modify the V-Ray light or the V-Ray physical camera, just go to the Display tab of the Command Panel and uncheck the Lights and Cameras options in the Hide by Category rollout. This will show both the light and the camera, which were hidden to avoid clutter in the scene.

Let's start creating the material for the object called "Machine_Desk", shown in Fig.04.

Fig.04

Fig.04

We want to give the whole scene an overall worn and used-looking feel, so we'll need to create shaders to recreate that atmosphere. The basic material of the machine is obviously metallic, but we also want it to be covered with some sort of paint. In order to obtain this kind of material we need to use a VRayBlendMtl material.

Select one of the slots in the Material Editor, give it an appropriate name (such as "Machine_Desk") and click on the Standard button to pick a different kind of shader. In this case, a VRayBlendMtl shader (Fig.05).

Fig.05

Fig.05

The VRayBlendMtl allows us to create a multi-layered surface, composed of a basic material and up to nine different "coat" materials. All of these can be blended together using a texture map. In our case, we just need a basic material (metal) and another one (the paint) to be blended through a texture.

Let's start creating the basic metal material. Click on the None button of the Base material slot and pick a VRayMtl material from the Material/Map Browser (Fig.06).

Fig.06

Fig.06

Name this material something like "Machine_BaseMetal" and assign the Machine_BaseMetal_01.jpg texture (which is included with this tutorial) to the Diffuse slot of the material (Fig.07).

Fig.07

Fig.07

Click on the Map slot next to the Reflect color (leave it black) and assign an Output map from the Material/Map Browser that will open. Go to the Output map properties and reassign the same Machine_BaseMetal_01.jpg texture we used for the diffuse color. Set the Output Amount to something like 0.25 (Fig.08).

Fig.08

Fig.08

The Output map allows us to control the amount of output for a certain texture, so here we're using it to control the amount of reflection of our metal base material. A value of 1.0 for Output Amount means you are fully using the texture "as is", while lower values will dull the texture itself, making the material less reflective in this case. That's fine because we don't want our metal to have mirror-like reflections.

Another good thing to do when creating metal materials is to change the shader type in the BRDF rollout of the Material Editor. Set it to Ward and change the Anisotropy value to about 0.9 (Fig.09).

Fig. 09

Fig. 09

Move the time slider to frame 1. A keyframe for the V-Ray physical camera has been set for you to zoom in on the machine's desk. Render the scene to check how our metal material is reacting to the light (Fig.10).

Fig. 10

Fig. 10

Let's move on to the paint material. Go up in the material hierarchy and reach the root blend material. Click on the first Coat materials slot and assign a new VRayMtl material from the browser. Name it "Machine_Desk_Paint" and assign the Machine_Desk_Paint_01.jpg texture in the Diffuse slot (Fig.11).

Fig.11

Fig.11

Set the Reflect color to a medium gray (not too bright) and the Refl. Glossiness to about 0.8. Tick the Fresnel Reflections option and click on the L button next to it. Also, set the Fresnel IOR to 1.8. The higher this value, the more reflective the material will be. We don't want it to be as reflective as the metal material we did earlier (Fig.12).

Fig. 12

Fig. 12

Now that we have both the base and coat material, we can go on and assign a blend map to the root material. Go back to the Machine_Desk_Blend material and click on the Blend Amount rollout next to the first coat material we created earlier.

Assign a new bitmap and pick the Machine_Desk_Blend.jpg texture. This texture will drive the blend amount from the base material to the coat material: where the texture is pure white, it will display the coat material and where it's pure black it will display the base metal (Fig.13).

Fig.13

Fig.13

Now render the scene again using different camera positions (just move the time slider from 0 to 1 or vice versa to use my pre-defined camera positions) and have a look at how the blend material appears in the scene (Fig.14).

Fig.14

Fig.14

Now we need to create the same material for the bottom part of the machine. We can just duplicate the blend material we created for the desk (just drag and drop it to the next free slot in the Material Editor). Rename the duplicated material something like "Machine_Bottom_Blend". Also, rename its coat material to "Machine_Bottom_Paint"; we can leave the Machine_BaseMetal as is.

We also need to change the blend map, since we're working with a different object with different UVs. Assign the Machine_Bottom_Blend.jpg texture to the Blend amount slot of the blend material. Don't forget to assign this new material to the right mesh in the scene, and render again (Fig.15).

Fig.15

Fig.15

You can assign the same materials to the other machine on the left. It would be a good exercise to duplicate the materials, renaming them and creating your own blend maps for the new objects. We can use the same materials and maps, but that would look too similar and so it would be nice to have one different map per object, but I'll leave that to you.

Let's continue creating the material for the front and desk panel. Nothing fancy here: it's just a simple VRayMtl material with it's own textures for the Diffuse and Bump channels.

Next create a new VRayMtl material, then assign the Machine_Panels.jpg texture in the Diffuse slot and the Machine_Panels_Bump.jpg in the Bump slot. Set the bump value to something like 15 (it strongly depends on the distance from the camera, so let's just start with a low value and then we'll see once we set up the final rendering). Assign this new material to both panels (and do that for the other machine on the left, too). Render the scene again (Fig.16).

Fig.16

Fig.16

The final rendering camera will be focused on the control panel itself and all its elements (switches, buttons, etc.,) so we don't need to give particular attention to other objects in the scene like the other machine on the left, the walls or the floor. Nonetheless, some of these objects may be within the picture and anyway they could help us with reflections and light diffusion. So we'll give them some basic materials, just in case.

Create a new VRayMtl material and name it "Walls". Assign the Walls.jpg texture in the Diffuse slot and the Walls_Bump.jpg texture in the Bump channel. Set the bump value to a very low one; for example 5. To give some more realism, we can also make this material reflective; in nature, every material reflects the light somehow, even those material that you would not classify as "reflective".

Drag the same texture you used for the bump into the Reflection slot and set the Refl. Glossiness to a very small value like 0.33. Assign this new material to both the wall object and the floor, and render again (Fig.17).

Fig.17

Fig.17

This concludes the first part. In the next one we'll focus on smaller objects and details, and create materials and shaders for them.

Related links

Buy this eBook here
Take a look at our full range of eBooks

Fetching comments...

Post a comment