Learn how to render like Pixar, part 2
Unlock the secrets of Pixar's Renderman with VFX artist Rusty Hazelden
Rusty Hazelden takes us through the next instalment in his series
For over 30 years Pixar's Renderman has been used in the film industry to render movies featuring ground-breaking animation and visual effects. In this four-part tutorial series, we're going to discover how to harness the power of Renderman for Maya by taking an animated shot from start to finish, and learn all of the techniques required to create a photorealistic animation. No steps are left out and every detail is explained with easy-to-follow, stepby-step instructions.
Creating photorealistic renders has never been easier. In this series we're going to begin with untextured objects in Maya, and learn how to create surface materials, set up lights, adjust camera attributes, customise the render settings, and batch render the animation to disk using Local Queue as a series of EXR images.
By the end of the project, you will have a solid understanding of the workflow used to light and render a dramatic night-time scene using Renderman for Maya.
Along the way, you will learn numerous tips and tricks that will come in handy on your next Renderman project.
In part two of this tutorial series, we're going to learn how to create the look of plastic, wood and metal materials using the versatile Pxrsurface shader. We're also going to discover how texture maps can be used to add realism to metal materials by adding a layer of tarnish.
01 OPEN THE MAYA SCENE
Let's continue from where we left off in Part 1 of the tutorial series. Go ahead and open your Maya scene from the end of Part 1. We're going to create a wood material for the floor. Zoom out a bit in the perspective view so the floor and the work light are both visible. Select the Floor object and assign a Pixar surface material by clicking the icon in the Renderman shelf. Rename the material ‘Wood_material’ so it has a more descriptive name.
02 CREATE OLD WOODEN PLANKS
To create a convincing wood material, we're going to use a texture map of old wooden planks and combine it with a bump map. Let's start with the bump map. In the Attribute Editor, scroll down and expand the Globals section, then click the map icon next to the Bump attribute. Clicking on the map icon will open the Create Render Node window, which lists all sorts of render nodes that can be used to build advanced shading networks.
03 THE PIXAR BUMP NODE
Since we're going to use a greyscale bump map, select the Pxrbump node from the Render man> pattern> bump section in the Create Render Node window. Then select the Floor object in the Outliner and navigate to the Pxrbump tab in the Attribute Editor. In the Pattern section click the map icon next to Input Bump. Then in the Create Render Node window click on the Maya ‘File’ node. Select the File tab in the Attribute Editor and then click the folder icon next to the Image Name field.
04 ADJUST TEXTURE PLACEMENT
In the sourceimages folder, select Wood_bump.tex and click Open. Rename the file node ‘Wood_bump_file’ so it is easier to identify later on. When you have a scene with multiple texture files make sure to give each of the file and texture placement nodes descriptive names. Switch to the ‘place2dtexture’ node. Change the Repeat UV values to 4 and 4. This will tile the texture across the floor surface. Set the Rotate UV to 130.852. Change the Offset to -0.056 and 0.779. This will translate the texture in the UV space.
05 BUMP IT UP A NOTCH
Switch back to the Pxrbump node by clicking the Show Output Connection button twice in the Attribute Editor. This will display the Pxrbump node attributes. The bump map has added simulated surface relief to the floor. Bump maps work well on objects that are flat or far away from the camera. If a curved object is very close to the camera, the bump mapping effect might not be as convincing. In these cases, the more computationally expensive displacement mapping approach should be used. Let's adjust the
Pxrbump node's Scale value to modify the strength of the bump effect. Reduce the Scale to a value of 0.05 for a more subtle effect.
Select the Floor object in the Outliner and then switch to the Wood_material in the Attribute Editor. We're now going to add a texture map to the Diffuse lobe of the Wood_material. In the Diffuse section, click the map icon next to the Color attribute. Click on the File node in the Create Render Node window.
On the File node, click the folder icon next to the Image Name field. Select the texture file called Wood_diffuse.tex and click Open. Rename the File node ‘Wood_ Diffuse_file’.
07 SHARE YOUR TEXTURE PLACEMENT NODES
Now we're going to open the Hypershade to adjust the texture placement of the Wood_material. We're going to share the data from one texture placement node with both of the file texture nodes. Select the Wood_material in the Hypershade, and click the Graph Input and Output Connections icon. Now we're going to share the Wood_bump place2dtexture node with the Wood_diffuse node. This will provide the same UV placement data to both texture maps so the bump and diffuse textures will be aligned.
08 MAKE THE CONNECTIONS
Delete the place2dtexture node connected to the Wood_ Diffuse node. Then select the place2dtexture node connected to the Wood_bump node. Hold down the Command key on a Mac, or the Control key on Windows, and middle-mouse drag this node onto the Wood_diffuse node. When you release the mouse button it will make all the required node connections automatically. Now we can close the Hypershade and the wood material is complete.
09 THE CORD MATERIAL
Let's create a material for the work light cord. Adjust the view so the cord fills the frame so we can see it up close. The cord is going to be coloured orange and it will have electrical safety information written along it using a texture map. The perspective camera will need to be moved pretty close to the cord in order to make out these fine details. Select the Cord object and then click on the Pixar Surface icon in the shelf to assign a new material and rename name it Cord_material.
10 TEXTURE MAP THE CORD
In the Diffuse section of the Cord_material, click the map icon next to the Color attribute. Then click on the File node in the Create Render Node window. Click on the folder icon next to the Image Name field. Select the texture file called Cord_text.tex and click Open. Give the File node the more descriptive name of Cord_text_file so we can easily locate it in the Hypershade.
06
ADD A DIFFUSE TEXTURE
At this point, the texture map has been applied to the cord and in a later step, we're going to adjust the texture placement.
11 MAKE IT ORANGE
With the Cord_text_file tab displayed in the Attribute Editor, scroll down and expand the Color Balance section. Then click on the Color Gain swatch. To make this an orange coloured cord, type 16 in the Hue field, type 1 in the Saturation field, and leave Value set to 1. This will apply a colour correction to the otherwise black and white cord texture map. As a result, the background colour of the cord will now be orange rather than white.
12 START THE RENDERMAN IPR
Now we are entering a phase where it would be useful to see updates in the Maya Render View using the Renderman IPR renderer. This will give us a more accurate view of the scene lighting and materials. The view of the scene provided in the Maya Viewport is good for modelling and animation but the Renderman IPR should be used when developing materials. The IPR will update in real-time as we make changes to material attributes. Start an IPR render by right-clicking on the IPR Clapboard icon in the Renderman shelf, and select the ‘persp’ camera.
13 TILE THE CORD TEXTURE
With the Renderman IPR running in the Maya Render View, we can now easily make changes to the Cord_text_file texture placement node and see the results instantly. Let's switch to the place2dtexture tab in the Attribute Editor and adjust the repetition of the texture map using the Repeat UV attributes. Change the Repeat UV values to 1 and 20. This will tile the cord texture along the V axis of the cord surface 20 times. Now we have an orange cord material with electrical safety information written along it using a texture map.
14 SHINY PLASTIC REFLECTIONS
Right now the cord material is coloured orange, but it just doesn't quite look right. To give it a shiny, plastic appearance we're going to adjust the Primary Specular Lobe. Click on the Show Output Connection button twice to switch back to the Cord_ Material in the Attribute Editor. The cord is made of a durable thermoplastic, suitable for outdoor use, so let's change the Specular Fresnel Mode to Physical and set the Edge Color attribute to white. This will make the cord surface more reflective. Set the Roughness attribute to 0.3 to lightly blur the reflections.
15 BUMP THAT CORD
To add more realism to the electrical cord we are going to add the appearance of ridges to the plastic cord. Since this cord is going to be seen from a reasonable distance in this shot, we can get away with a simple bump map once again, rather than a more costly displacement map. Let's create a bump map. Expand the Globals section, and click the map icon next to the Bump attribute.
16 THE CORD BUMP TEXTURE
In the Create Render Node window expand the Renderman> Pattern>bump section and click on the Pxrbump node. Switch to the Pxrbump tab in the Attribute Editor. In the Pattern section, click the map icon next to Input Bump. Click on the File node. In the Attribute Editor, click the folder icon next to the Image Name field.
In the source images folder select Cord_bump.tex and click Open. Rename the File node ‘Cord_ Bump_file’.
17 THE REFLECTOR MATERIAL
Next, we're going to create a metal material for the reflector. Adjust the perspective view, so we're looking at the back of the reflector surface. Select the Reflector object and then click on the Pxrsurface icon in the Renderman shelf to create a new material. Let's rename it Metal_material. Drag the Diffuse ‘Color’ slider to the left, to set the colour to black. This material will be reflective, so let's set the Specular Fresnel Mode to Physical. Drag the Edge Color slider all the way to the right. This will set the Edge Color swatch to white. Now we have a highly reflective black material.
18 MAKE IT METALLIC
Click on the Extinction Coefficient swatch. Set the Hue and Saturation fields to 0. Then set the Value or V field to 2. Raising the Extinction Coefficient above zero changes the surface appearance from a dielectric material, to that of a metal material. Common values for a metallic material vary from 1 to 3. Now the metal has a bright chrome-like appearance and is very reflective. The image seen in the reflections of the metal material are provided by the dome light's environment texture map.
19 AGE THE METAL
Right now the metal surface of the work light reflector is so shiny it looks brand new. To fit into the rest of this outdoor scene, we need to age the metal material to make it appear like it has been around for a few years. Metal surfaces often rust or tarnish when they're exposed to the elements, so in this project we're going to add a layer of tarnish. Let's use a texture map to add tarnish to the Metal_material. Click the map icon next to Edge Color. Then select the File node in the Create Render Node window.
20 TARNISH TEXTURE MAP
In the Attribute Editor, click the folder icon next to the Image
Name field. Select the texture file called ‘Tarnish_specular.tex’ and click Open. Click on the IPR Clapboard icon in the Renderman shelf to refresh the Maya Render View. Rename the File node to the more descriptive name ‘Tarnish_ File’. Then click the Output Connection button in the Attribute Editor to switch back to the Metal_ Material tab.
What we have is still a bit too reflective for an aged metal surface, so let's use the roughness control to blur the reflections slightly. Set the Roughness to a value of 0.35.
21 BENT NAILS
Now we're going to create a corroded metal material for the shedload of bent nails that are strewn throughout the scene. Adjust the perspective view in the Maya Viewport so the front of the work light is visible. Set the Current Time to frame 169, so the R_nail object is resting on the floor. Then select the Bent_nails group in the Outliner and click on the Pixar Surface icon in the Renderman
shelf to create a new material. Let's rename it Nail_material.
22 THE NAIL TEXTURE MAP
Now the nail material is a flat grey colour. To age the material and improve its realism, we're going to add a texture map to make it appear heavily corroded. Let's apply the texture map to the Diffuse lobe of the Pixar surface material. Click on the map icon next to the Diffuse ‘Color’ attribute. In the Create Render Node window, click on the File node. Then click on the folder icon next to the Image Name field. Select Nail.tex and click Open. Rename the file node Nail_file. Click the IPR Clapboard Icon to refresh the Maya Render View. Then click the Output Connection button to switch back to the Nail_ Material tab in the Attribute Editor.
23 ADD SOME TWINKLE
Set the Specular Fresnel Mode to Physical. Drag the Edge Color slider to white, and then click on the Extinction Coefficient swatch and set the value to
2. Now the nails have a shiny metallic appearance. Let's add a texture map to the Specular Edge Color attribute to break up the specular highlights a bit. Open the Hypershade and select the Nail_material. Then click the Show Input and Output Connections button to re-graph the shading network. We're going to reuse the existing Nail texture and map it to the Specular Edge Color attribute. Connect the Nail.tex ‘Out Color’ attribute to the Nail_material ‘Specular Edge Color’ attribute.
24 NAIL THE LOOK
Click on the shading group name and change it to the more descriptive name ‘Nail_sg’. Then close the Hypershade. Now that we have assigned the nail texture to the Specular Face Color attribute there are patches of shiny metal visible on the corroded nails. Select one of the bent nails in the Maya Viewport and switch to the Nail_ Material in the Attribute Editor. Change the Roughness value to 0.3. Let's save our Maya scene and we will continue this project in Part 3 of the tutorial series. •