This Cyber Monday Tuts+ courses will be reduced to just $3 (usually $15). Don't miss out.
In today's tutorial, you'll learn how to create a realistic toothbrush using Maya. Chandan will start by taking you through the modeling process using tried and true poly modeling techniques where you'll learn how to create a detailed subdivision ready mesh using Maya's built in modeling toolset. From there you'll learn how to create the necessary shaders, setup the scene for rendering, apply Depth Of Field and finally how to render out and composite your render passes using Photoshop.
In this tutorial, we will be creating a Toothbrush in Maya using polygon modeling techniques. So let’s start and click on Create > Polygon Primitives > Cube.
Then create a poly Cube on the grid with the Subdivisions Width, Subdivisions Height and Subdivisions Depth values set to 4.
To make the workflow easier, you can turn off the Grid option inside the Display menu.
Now press ‘F11’ on the keyboard to jump into Face mode and then select a half portion of the cube vertically. Then press the ‘Delete’ key to delete the selected part.
Now with the half cube selected, go to the Edit menu and click on the ‘Duplicate Special’ options box.
In the Duplicate Special Options box, turn on the ‘Instance’ radio button, set the value of X Scale to -1.0000, and then click on the ‘Duplicate Special’ button.
Now, you can see the half portion of the poly cube appears on the opposite side as a mirrored object. The beauty of this process is as you only need to modify the first half portion, and the same modification reflect on the opposite/mirrored part too.
So press the ‘F9’ on the keyboard to jump into Vertex mode and then try to edit the mesh to create the shape of the toothbrush head.
Now, press ‘F11’ on the keyboard to jump into Face mode and select the bottom faces as shown. Then go to the Edit Mesh menu and click on the Extrude command.
Extrude the faces just like what's being shown in the image below. It should be in a curved path.
Now, press ‘3’ on the keyboard to see the mesh in smooth shade mode. But you'll notice that the center of the extruded faces look as though they are divided into two separate parts. So we have to correct this problem.
To amend this problem, first select one side of the poly mesh and go to Show>Isolate Select and then check On the ‘View Selected’ check box.
Now, select all the inside faces and press the ‘Delete’ key to Delete the selected faces.
After deleting the faces, again go to Show>Isolate Select and this time turn Off the View Selected check box. Now you won’t see that problem again, since we have deleted the problematic faces.
Following the same process, keep extruding the edges to form the shape of a tooth brush body. You can either design it in your own way or follow some reference of a tooth brush design.
Now look at the bottom of the brush hand. The area is hollow, so we need to fill it up. So, with one half of the brush body selected, go to ‘Edit Mesh’ and click on the Append to Polygon Tool.
With the Append to Polygon Tool selected, first click on an edge and then click on its correspondent edge, then press the Enter button to finish creating the new poly face.
Now, double click on the edge to select the border edges. With the border edges selected, go to the Mesh menu and select the Fill Hole command to fill the selected border with faces.
After filling the hole, we need to complete the edge loop too. So, go to the ‘Edit Mesh’ menu and select the ‘Split Polygon Tool’.
With the ‘Split Polygon Tool’ selected, click and drag on the edges to insert new edges as shown in the images below.
Now, we will add some more details to the body of the tooth brush. So, go to the Edit Mesh menu once again and choose the ‘Insert Edge Loop Tool’.
Insert several edges on the neck of the tooth brush as shown in the image below.
After inserting the edges, press ‘F11’ to jump into Face selection mode and select the faces as indicated in the following image.
With the faces selected, go to the Edit Mesh menu again and choose the Extrude command. After applying the Extrude command, pull it a little bit outward to add some thickness.
Now deselect two rows of the pre-selected faces as shown in the image below, and then press the ‘G’ key to repeat the previous Extrude command.
Now it should look something like this.
Now the same problem we saw in the step 9 has re-appeared. So, once again select the unwanted faces and press the Delete key.
The problem gets solved and the brush looks like this.
With the Insert Edge Loop Tool selected, keep inserting more edge loops to add more details to the brush body. You can also use the Split Polygon Tool to add the edges manually.
In this way we have completed adding the necessary cuts for more detailing.
Now, press ‘F11’ to jump into Face selection mode, and then select the indicated faces which will be extruded later.
Now extrude the selected faces slightly.
Now press the ‘F8’ key to jump into Object mode to see whether we have extruded the faces properly or not. It seems, we need to give some more depth to the extrusion at the corners.
So with the poly mesh selected, go to the Edit Mesh and select the Insert Edge Loop Tool once again.
Then insert edge loops to the corners of the faces as shown in the image below.
Now, press ‘3’ on the keyboard to see the result in smooth shade mode. And you can clearly see that it looks much better than before.
Now, let’s work on the bristles. But before that we need to make the bristles base pad. So, first press ‘F11’ to jump into Face selection mode and then select the front faces of the toothbrush head. After that, go to the ‘Edit Mesh’ menu and click on the ‘Duplicate Face’ command.
When we apply the Duplicate Face command, the duplicated poly mesh gets deleted automatically. But an entity of the duplicated faces become separated. So drag it in Z-axis a little bit.
Now to get back the other half portion, first select both objects and then go to the ‘Edit’ menu and click on the ‘Duplicate Special’ command. Now you will get the other half portion on the opposite side again.
Select the newly duplicated poly mesh which will be edited to become the bristles base pad and then press the ‘F9’ key to convert it into Vertex selection mode. Then arrange the pad area according to the shape of the head.
Now press the ‘F10’ key to jump into Edge selection mode and select the outer border edges. Then go to the ‘Edit Mesh’ menu and select the Extrude command.
Now, drag the boarder edges inward on the Z-axis so it's something similar to what's shown in the image below.
Now, to make the tongue cleaning pad on the back side of the brush head, press the ‘F11’ key to jump into Face selection mode and then select the indicated faces. Then go to the ‘Edit Mesh’ menu and click on the ‘Duplicate Face’ command like we did previously.
This makes a duplicated entity of the separated faces. We will now use it as the tongue cleaner pad.
So with the tongue cleaner pad selected, go to the ‘Edit Mesh’ menu select the Insert Edge Loop Tool.
Now insert several horizontal edge loops as shown in the following image.
Select each alternate edge by double clicking on it and then pull them out on the Z-axis a little bit.
Now again select the entire outer border edge and push it back a little bit inside the toothbrush head mesh.
Now, we have to combine both the bristles pad and the tongue cleaning pad together. So with these two separate entities selected, go to the ‘Mesh’ menu and then select the ‘Combine’ command.
With the bristles pad selected, press ‘F9’ on the keyboard to jump into Vertex selection mode and then select the middle vertices on both sides. Then go to the ‘Edit Mesh’ menu and click on the Merge command to merge the selected vertices.
Following the same technique, combine the rest of the meshes like the tongue cleaner pad and the tooth brush body.
Now, we will create the bristles. So, go to Create>Polygon Primitives and select Cylinder.
Drag and create a thin cylindrical stick with Radius of 0.01, a Height of 3.7, and the Subdivision Axis set to 12. The rest of the parameters can be left at default.
With the cylinder selected, press Ctrl+D to make a duplicate copy of it, and just like this make about 36 more duplicate copies and arrange them all together to form like a round bundle of sticks.
With all the cylinders selected, go to the ‘Edit’ menu and click on the Group command to make a group of the duplicated cylinders.
When we make the group, it’s transform gizmo moves to the origin. So, to keep the transform gizmo in the center of the group, first select the group and then go to the Modify menu and click on the Center Pivot command.
This command shifts the transform gizmo to the center of the bristle group. Now place the bristles group at the top of the bristles pad as shown.
Now, with the bristles group selected, press Ctrl+D again to make more copies of it and then arrange all the bristles groups as shown in the image below.
Now, we will apply several different material shaders to apply to the different faces of the tooth brush. For that, we will have to extract several faces from the main tooth brush body, like the grip of the tooth brush. So, press ‘F11’ on the keyboard to jump into Face selection mode and then with all the upper hand grip faces selected, go to the ‘Mesh’ menu and click on the Extract command.
The selected faces get extracted as a separate mesh entity. Now, it will be easy to apply a different material shader to it.
To open the Hypershade widow for material shaders, go to Window>Rendering Editors and click on Hypershade.
This opens the Hypershade window. Click on the Blinn material tab to create a material shader node in the work area.
Double click on the blinn1 node to open the Common Material Attributes editor. Here click on the Color box to choose the desired shade of color.
Now choose something like this Red color in the ‘Blinn Color’ window and then press the ‘Done’ button.
For the floor surface, we have to create a material shader with some reflection. So, being inside the mental ray material group, select the mb_glossy_reflection node.
And also create a ‘mib_illum_bilin’ shader node to support the ‘mb_glossy_reflection’ node.
Now, with the ‘mib_illum_bilin’ shader node selected, press and hold the middle mouse button and then drag and drop it onto the ‘mb_glossy_reflection’ node’s Base Material inside the mb_glossy_reflection node attribute. And keep the Reflection Color as White.
Now, with the hand grip mesh selected, right click on a material and select Assign Material to Selection in the fly out menus to assign the material to the selected object.
Following the same process, we have assigned different materials to the different meshes separately.
Also apply the ‘mib_glossy_reflection’ material node to the floor.
Here I have placed the brush on the surface and also created 3 spotlights in the scene.
To render in mental ray, first click on the Render Settings button to open the Render Settings window.
In the Render Settings window, click on the Render Using drop down arrow button and then choose mental ray as the renderer.
Before moving ahead, set the desired camera angle for the rendering.
Now, to generate Depth Of Field, first go to the View menu in the panel menu bar and select the Camera Attribute Editor.
In the Camera Attribute Editor, click on the Lens Shader checker icon inside Mental Ray. It opens the ‘Create Render Node’ panel. In the Render Node panel, first click on Lenses and then select Physical_Lens_dof.
In the Physical_Lens_dof parameters, keep the Plane value at -10.00 in this case (otherwise you can keep the values according to the object's distance from the camera.) Also keep the Radios value at 0.080.
For final rendering, open the Render Settings window. Inside the Quality tab, open the Raytrace/Scanline Quality stack and keep the Max Sampling Level at 4 and then in the Multi-pixel Filtering stack, set the Filter to Gauss.
Now hit the Render button, and you will get the final rendered image which should look something like this. The depth of field is there but some shadow depth is missing.
So, to get better shadow depth in the rendered image, we also have to render a separate Ambient Occlusion pass. So, create one Surface Shader.
And also create a ‘mib_amb_occlusion’ node.
Now, click with middle mouse button on the ‘mib_amb_occlusion’ node and drag it onto the the ‘Surface Shader’ node. And then choose ‘Default’ in the fly out menu items.
With the ‘mib_amb_occlusion’ node selected, keep the Samples value at 256 in the Attribute Editor and then drag down the Bright slider a little bit and drag up the Dark slider a little bit too.
Now, with all the brush objects and the floor plane selected, apply the ‘mib_ambient_ occlusion’ shader onto them. The scene looks dark now.
Now, render the scene with the previous render settings applied and you will have the ambient occlusion pass ready.
We now have two passes- a Diffuse pass and the Ambient Occlusion pass. Now we will composite them together in Photoshop.
Open Photoshop and import the passes and arrange them as shown in the image below. Put the Ambient Occlusion pass above the Diffuse pass.
Change the AO Pass layer’s Blending mode from Normal to Multiply. And now you can see the shadow depth in the image.
So, this is the final output of the toothbrush image. I Hope you have enjoyed the tutorial!