Modeling a Pencil in Blender

Modeling a Pencil in Blender

Moeling a Pencil in Blender Part 1In this tutorial we will be using Blender to model a pencil in a traditional form, and in this process we will learn some basic that will allow us to obtain professional results.

1.- The main pencil body

First, we need to add a Cylinder so press the following sequence in order to add it:
shift+A,M,Y.

Common pencil bodies have 6 Faces, so we need to set the Vertices property to 6 in order to match our beloved pencil main shape.

Now we need to set the Radius property to 0.065 and the Depth property to 3 (remember this is not a 1 to 1 scale model).Modeling a Pencil in Blender 00

Remember to set our new Item Name property to “Pencil” just to make everything neat and simple.

Modeling a Pencil in Blender 01

Now we need to apply some Bevels to our model in order to get some flat surfaces on the Edges of our main shape, so when we apply a Subdivision Surface Modifier we don’t lose the 6 Faces of our model.

Select the Pencil model and enter Edit Mode (Tab key), select all the Vertices by pressing the A key, now enter the Bevel short cut:( Ctrl+b,) Now before you do anything enter the Offset value of 0.006, press Enter key and exit Edit Mode (Tab key).
If everything is done correctly, it should look something like this.

Modeling a Pencil in Blender 02

Modeling a Pencil in Blender 03

 

At this point we  are done forming the main pencil body, the next step is to model our Pencil tip. Which  is supposed to be wood and lead.

 

2.- Building our Pencil tip

This is where things get interesting because we are going to start working with Vertex and Faces to model our Pencil tip.

First rotate the model until you can view the bottom face of the pencil like in the image below:

Modeling a Pencil in Blender 04

Enter Edit Mode (Tab key) and change the Selection Mode to Face Select:

Modeling a Pencil in Blender 05

Face Select

Select the bottom Face:

Modeling a Pencil in Blender 06

 

We need to Grab this Face -0.05 in the Z axis, in order to do this press the G key then Z key then enter the value of –0.05 press Enter key. This is what you’re model should look like ( and if not try again.)

Modeling a Pencil in Blender 07

 

Now we need to Extrude this Face in to the tip of the Pencil so press the E key then enter a value of 0.17 next press the Enter key then press the S key and enter a value of 0.38 after that press the Enter key now press the E key again and enter the value of 0.11 and press Enter key then press S key and enter a value of 0.37 and finally press the Enter key. You should have something like this:

Modeling a Pencil in Blender 08

 

Now we need to add some Loop Cuts in order to emulate the area where the Pencil paint meets the wood tip of our Pencil.

Enter the shortcut for Loop Cut Ctrl+r move the mouse cursor over the upper part of the Pencil until you can see a pink line that cuts the pencil body half now click that point and enter a value of 0.987 and press Enter key. It should look something like this:

Modeling a Pencil in Blender 09

 

Now we need to add another Loop Cut between the new cut and the old one, so again enter the Loop Cut short cut (Ctrl+r) and click the pink line that will be in the middle of new cut and the old one, click that point and finally press Enter key. It should look something like this:

Modeling a Pencil in Blender 10

 

Now we have to add another Loop Cut to the upper part that will be used to make U,V coordinates don’t worry too much about it we are going to cover that later so just go and enter the Loop Cut shortcut Ctrl+r again and try to make it just like the next image:

 

Modeling a Pencil in Blender 11

 

Now we have the Pencil tip but is not natural as its all flat; we need to play a little with the z axis vertex in order to make it look like a Real Pencil so please change the Selection Mode to Vertex Mode:

Modeling a Pencil in Blender 12

Vertex Select

Go and select the Vertex and play a little with them until you get something like the image below:

Modeling a Pencil in Blender 13

 

3.- Modeling the Eraser

Firstly make sure you are not on Edit mode of the main Pencil body. Use the Tap key to exit it if you are.

Now make sure the 3D cursor is at the center of the scene, if it’s not then use the shortcut Shift+s and select Cursor to Center at the popup menu.

Let’s add a Cylinder that will be the metallic part of our beloved eraser, you should already know how to do this but in case you forgot here are the steps:

shift+A,M,Y

Then set up the properties as shown in the image below so it will be in the proper size.

Modeling a Pencil in Blender 14

 

Now we need to move this new Cylinder to the top of the pencil so please press the G key then Z key and then enter the value of 1.56, it should look something like the image below:

Modeling a Pencil in Blender 15

 

Now our pencil is coming to life. We are going to make the tiny holes that attache the metallic part to the pencil. There are a lot of holes but we are going to make just 2 of them and then apply some simple tricks.

Enter edit mode (Tab key) change selection mode to Face:

Modeling a Pencil in Blender 16

Face Select

Select 2 Faces as shown in the image below:

Modeling a Pencil in Blender 17

 

We need to delete all other Faces, in order to do that follow the next steps:
Invert the selection (Ctrl+i,) press X key and select Faces from the popup menu. You should have something like the next image:

Modeling a Pencil in Blender 18

 

You may ask why are we adding a Cylinder if we just need 2 Faces ? Well, I found it’s the easiest way to have everything in place that we need.

Now we need to add some Loop Cuts, I bet you remember the Loop Cut shortcut but in case here it is again Ctrl+r, we need those Loop Cuts to make some squares at the top and at the bottom of our current Faces and a tinier one at the bottom to make a little slope, so please try to get something like the following image:

Modeling a Pencil in Blender 19

 

Notice that when we do the Loop Cuts the selection mode turns to Edge, please set it to Face again and select the top left Faces as shown in the next image:

Modeling a Pencil in Blender 20

 

This is where our first hole is going to take place. Now in order to make it we need to enter Extrude and Scale values so long story short enter the next sequence:
Press E key, enter the value of -0.0025, press Enter key, press S key and enter the value of 0.25, Press E key, enter the value of -0.004, press Enter key, press S key and enter a value of 0.5. If everything goes okay you should have something like the next image:

Modeling a Pencil in Blender 21

 

Repeat these steps for the bottom Face and you should have something like this:

Modeling a Pencil in Blender 22

 

Don’t worry about the overlapped Faces, when we add the Subdivision Surface Modifier they are going to disappear.

Now let’s add some Loop Cuts so we can start getting ready to give it some detail, for this metallic part in some steps ahead, remember the short cut it Ctrl+r.

Try to match the next image:

Modeling a Pencil in Blender 23

 

Now select the very top 2 Edges and press the E key,  then press Z key and enter the value of 0.03. You should have something like the following image:

Modeling a Pencil in Blender 24

 

Select all of the top Faces as shown below:

Modeling a Pencil in Blender 25

 

Now press the G key, press Z key and enter the value of -0.033
You should get something like this:

Modeling a Pencil in Blender 26

 

Now we are going to get back the Cylinder form and at the same time replicate all the modifications we did. In order to do tist we are going to take advantage of the Spin Tool.

So please select all of the Faces with the A key, then enter the Spin shortcut Alt+r and set up it just as the following image:

Modeling a Pencil in Blender 27

 

You should have something like this:

Modeling a Pencil in Blender 28

 

Cool right ? But don’t feel like a pro just yet as this is totally a mess still :), if you play around with the Faces and Vertex you will see some are all broken in pieces and some overlapping. Now it is nothing to worry about as we have the mighty Remove Doubles tool to help us in such situations.

Select all of the Faces with the A key and then press the Space bar, start typing “Remove” and you should see Remove Doubles in the popup menu, Select it and Tadaaaaaaaaa !!!!.. Now there are no more overlaps or any more broken Faces.

Modeling a Pencil in Blender 29

Vertices Removed

By the way you should see a notification on the top of blender UI  .

Notice there is a hole at top and bottom of this model, we need to close them in order to do that change selection mode to Edges:

Modeling a Pencil in Blender 30

Edge Select

Select all of the top edges by holding Atl key+Right Click over one of the edges and finally press the F key, you should see there is no more hole:

Modeling a Pencil in Blender 31

 

Repeat this for the bottom hole and you should see something like this:

Modeling a Pencil in Blender 32

 

Now we are going to add some details using these Loop Cuts we added last time.
Do not unselect this and press S key and enter a value of 1.15 you should have something like this:

Modeling a Pencil in Blender 33

 

Change selection mode to Faces:

Modeling a Pencil in Blender 34

Face Select

Select the nearest Face loop as shown below (Hold Alt key + Right Click):

Modeling a Pencil in Blender 35

 

Now press E key, press Enter key, press S key and enter the value of 1.04 and press Enter key, again Press E key, press Enter key, press S key and enter the value of 1.04 and press Enter key now press S key, Press Z key, Enter a value of 0.5 and finally press Enter key.

If everything is okay you should have something like this:

Modeling a Pencil in Blender 36

 

Now repeat all of those steps with the left 2 Faces Loops and you should have something like the image below:

Modeling a Pencil in Blender 37

 

We need to add 2 Loop Cuts to the top of this model, go ahead and try to make something like the image below:

Modeling a Pencil in Blender 38

 

Now scale them up and down a little bit so you get something like the image below (use the S key and move the mouse a little to affect the scale value):

Modeling a Pencil in Blender 39

 

Now we are going to make the final part of this model I mean the actual Eraser, in order to do this please change selection mode to Face:

Modeling a Pencil in Blender 40

Face Select

Select the top Face as shown below:

Modeling a Pencil in Blender 41

 

Now press E key and enter the value of -0.0197, press Enter key, Press S key and enter the value of 0.97, press E key, press Enter key, Press S key and enter a value of 0.97, press Enter key, Press E key again a enter the value of 0.005, press Enter key, Press E key again and enter a value of 0.104, press Enter key, press S key and enter a value of 1.02, press Enter key.

If everything is okay you should have something like the image below:

Modeling a Pencil in Blender 42

 

You may ask “all of those steps to do this? I can do it with a single Extrude and that’s it” but there are some tiny faces on that area we can barely see and they are required in order to preserve the shape when we come to add the Subdivision Surface Modifier.

Now let’s just add some Loop Cuts to the eraser that will help us to preserve this tip shape when we add the Subdivision Surface Modifier, try to match the image below.

Modeling a Pencil in Blender 43

 

And now we are done, with the modeling part of this tutorial.

If you go and add the Subdivision Surface Modifier to both of out objects set the steps to 4 and make a fast render you should have something like:

Modeling a Pencil in Blender 44

 

Cool isn’t it ?

4.- Building Materials

It’s time to create our pencil’s materials.

First of all, we are going to use Cycles Render Engine, to do this lets change the render engine on the top of the Blender UI window.

From this:

Modelling a Pencil

Changing Blender Render

To this:

Modeling a Pencil 02

To Cycles Render

Now we need to split our window so we can have both the 3D View and the Node Editor windows open. Click and drag subdivision button:

Modeling a Pencil 03

Subdivision Button

In order to get something like this:

Modeling a Pencil 04

Divided Window

Move the mouse to the right view and press the T key to hide the tools panel. In the right turn the 3D view icon:

Modeling a Pencil 05

3D View Icon

To the Node Editor Icon:

Modeling a Pencil 06

Node Editor Icon

If the properties panel is enabled, hide it by pressing the N key, we are not going to use it. Make sure the shader nodes icon is selected:

Modeling a Pencil 07

Selected Shader Nodes Icon

Now that we have this setup, lets rock with the materials.

4.1 – Pencil Carbon

On your left 3D View select your pencil body.

Modeling a Pencil 08

Selecting Pencil

Then, go to the right panel and select the material tab and then add a new material. Name this material “Carbon” and then enable the preview window. You should have something like this.

Modeling a Pencil 09

Creating Carbon Material

You will notice we have some nodes on our Node Editor View:

Modeling a Pencil 10

New Nodes

These are our shader nodes and we are going to change them to build each one of our shaders for each material on our pencil.

A carbon pencil tip is usually black, so we will change the diffuse color property from white to black.

Modeling a Pencil 11

Changing Diffuse Color from White to Black

Make sure to give a look at the preview window so you can understand how our shader is working. Now add a Glossy shader by pressing SHIFT+A. This will give you an “add” panel with a list of available nodes.

We need to go for the Shader -> Glossy BSDF

Modeling a Pencil 12

Selecting Shader Glossy BSDF

Now our Glossy shader is on the node editor, but we see no changes in our preview. This is because we still need to tell the shader to go right to the “surface material output,” but not just the glossy. We need both glossy and diffuse  shaders to be mixed, for this we need the Mixed Shader Node. Add the node by pressing SHIFT+A and selecting Shader -> Mix Shader.

Modeling a Pencil 13

Adding the Mixed Shader Node

Now our Mix Shader is on, but we still need to link the nodes. In order to link them we need to hold the left mouse button and drag the tiny green dots to their correct node link.

Modeling a Pencil 14

Tiny Green Dot

Link them as shown in the image below:

Modeling a Pencil 15

Node Link Placement

Notice how our shader is working, we are going to change some values on our nodes to fix the metallic look to the material to a more dark version.

For the Glossy node set the “Roughness” to 0.492, which will affect how hard the shining effect will be set over our material’s surface.

Set the Mix Shader’s Factor to 0.6, this value will represent the balance of the two shaders when mixed together.

Modeling a Pencil 16

Node Values

You will notice that not much has changed. This is due to the material’s properties, as we need it to reflect the light and shine in a specific way and not all over the surface. We will emulate this effect by adding a new node called Fresnel.

Add the Fresnel node. Look for in Add -> Input -> Fresnel, link the Fac node to our Glossy Normal Input Node and set the IOR value to 7.1.

Modeling a Pencil 17

Newly Added Nodes

Now our material seems to be black all the way, but in reality the Fresnel we added works with the camera’s view vector which allows our material to look as polished carbon.

Modeling Pencil 18

A Rendered Preview of the Material

Remember that you can change your 3D View to render preview from solid:

Modeling a Pencil 19

Changing Render View from Solid

To rendered:

Modeling a Pencil 20

Rendered View

Make sure to set a light source so you can see better results.

4.2 – Wood for the Tip

Every pencil has an exposed wood tip. We will create this wood shader.

Add a new material to our pencil object and name it “wood tip.”

On your left 3D View enter edit mode and select all the faces that are supposed to be the wood tip like this:

Modeling a Pencil 21

Faces to Select

Now select the wood tip material and click the “assign” button in order to assign this new material to those faces.

Modeling a Pencil 22

“Assign” Button

Modeling a Pencil 23

Rendered Preview

We will now change the diffuse color and add some wood strips, so change the color to something like this:

Modeling a Pencil 24

Changing Diffuse Color

The material will take a light pink color, but wood needs a variation of color. In order to do that we need to add three more nodes to our shader.

*Noise -> The one that will handle the wood strips by emulating noise with a given value.

*Diffuse -> The one which will handle the noise factor output and turn it to a diffuse color.

*Mix Shader -> Which will mix all the other nodes together

Stup the nodes like in the image below:

Modeling a Pencil 25

Wood Material Setup

We link the noise factor output to the diffuse color input and not the color because we do not need a color, but rather a grey scale noise.

The material may not look exactly like wood yet, but wait until you see it in action:

Modeling a Pencil 26

Render Preview of Wood

Quick Tip: For this Render Preview I placed two light sources and ambient occlusion active as shown in the image below. The preview sampling is set to 50.

Modeling a Pencil 27

Rendering Preview Setup

4.3 – Pencil Paint Materials

We are going to build two materials for the pencil paint. One will be for the border between the pencil’s painted outside and the wooden material inside.

4.3.1 – Pencil Paint Materials

Go ahead add a new material and name it “Residual Paint.” Setup the nodes like this:

Modeling a Pencil 28

Node Setup for Residue

Now assign this material to the faces that are supposed to be using this material.

Modeling a Pencil 29

Faces to Assign Residue Material

4.3.2 – Pencil Paint

Add a new material slot and select the wood tip material. We will base the Pencil Paint material off of the Wood one we made earlier.

Modeling a Pencil 30

Selecting Wood Tip Material

See the “2” near the cursor? The “2” represents the number of users the material has, and states that the material is being used two times on the pencil’s body. We will need to make a clone of this in order to edit it. Click the “2” button and to make it unique, rename it to “Pencil Paint.”

Modeling a Pencil 31

Making the Material Unique

Now go to the node editor and change the values of the nodes to match this setup:

Modeling a Pencil 32

Material Pencil Paint Setup

Then add a Fresnel node and set the IOR to 1.5 and link it to the Mix Shader input.

Modeling a Pencil 33

Adding Fresnel Node

Nect we’ll add a Glossy Shader and a Mix Shader. Set them up as shown below:

Modeling a Pencil 34

Pencil Paint Node Setup

Now enter edit mode and assign the material to the appropriate faces:

Modeling a Pencil 35

Render Preview Pencil Paint

4.3.2.1 – Adding a Custom signature To Your Pencil

This is optional, but most of the pencil providers print a signature on their pencils.

We will first need to set some UV coordinates to the pencil’s body, in order to assign it a texture in the correct place.

Set your 3D View to the front view (Numpad 1), then enter edit mode and select one face just like this:

Modeling a Pencil 36

Selecting a Face for UV Coordinates

Then press CTRL+E and select Mark Seam. Double tap the “A” key to select all faces. Then press the “U” key to open the UV Mapping panel and select Unwrap.

Modeling a Pencil 37

Unwrapping Pencil

Now let’s change our right view from Node Editor:

Modeling a Pencil 38

Node Editor Icon

To UV/Image Editor:

Modeling a Pencil 39

UV/Image Editor

The signature should be provided by you. I made the Blender World signature on GIMP.

Modeling a Pencil 40

Creating a Mask in GIMP

Make sure its black and has an alpha channel on it. Save it as a png file.

Make another version of this signature to be like the image below:

Modeling a Pencil 41

Different Version of the Image

A background and grey Signature. Save it as displacement png.

Let’s load the Mask image on Blender UV/Image Editor in order to do that lets click on the image button and select Open Image or simply enter Alt+O while the mouse is over the UV/Image Editor. Find the image file and open it. You should have something like this:

Modeling a Pencil 42

Adding Image to UV/Image Editor

Now select the face that you will place the signature and mark it with Seams:

Modeling a Pencil 43

Marking Seams

Find the selected face on the UV/Image Editor and edit it to be something like this:

Modeling a Pencil 44

Placing Face with Image

Try to place the face with the signature.

Let’s get back to our Node Editor View:

Modeling a Pencil 45

Node Editor Icon

Add a texture coordinate node and an image texture connect the nodes and configure them as shown below:

Modeling a Pencils 46

Signature Node Setup

Remember you are adding these to the pencil paint material.

If  everything is ok you should be see your render preview window with something like this:

Modeling a Pencil 47

Render Preview

We just add a little displacement to the pencil body to match the signature to show that it has been carved (I know this displacement of the image is not  a proper Build, but it will work for this example).

Add another Image Texture node and a Mixer Shader. Load the mask image on the Image Texture Node and connect them as shown below:

Modeling a Pencil 48

Setting the Signature Mask

You should have a render preview just like this:

Modeling a Pencil 49

Render Preview Signature

Modeling a Pencil 51

Render Preview Signature Close Up

4.4 – Metallic Materials

We are now going to make two materials for the metallic tip of our pencil. One will be “Goldy” and the other “Red.”

Add a new material to our pencil model.

name it “Goldy.”

Modeling a Pencil 51

Adding “Goldy” Material

Remove the diffuse material and add two Glossy nodes, one Bright/Contrast Node, one Fresnel Node, and one Mixer Shader Node. Then connect them and configure them as the image below:

Modeling a Pencil 52

“Goldy” Node Setup

The color I chose has these values:

Modeling a Pencil 53

“Goldy” Color Values

Remember that you are free to play around with these values.

Now, to make our Scarlet metallic color, create a copy of our “Goldy” material and name it “Red.” Change the color value from gold to red.

Modeling a Pencil 54

Setup for Red Metallic Material

Now we have to assign these new materials to the our pencil’s coordinated faces. Enter edit mode on our pencil’s metallic model and select the faces as shown below:

Modeling a Pencil 55

Faces to Select

Make sure you have the materials we just created on this geometry. If you did not, add them as material recipients and select the materials off the list.

Select the “Goldy” material and click “Assign.”

This will now appear on the render preview:

Modeling a Pencil 56

Render Preview of Metallic Tip

Now select the faces we want to be red and assign the material to them:

Modeling a Pencil 57

Assigning Red Material

The geometry can now be smoothed. Click on the Smooth button under the shading properties.

Modeling a Pencil 58

Changing Shading

Add a Subsurf Modifier to the geometry:

Modeling a Pencil 59

Adding Subsurf Modifier

The Render Preview will look something like this:

Modeling a Pencil 60

Render Preview

4.5 – Eraser Material

Go ahead and add a new material to the geometry and name it Eraser.

Modeling a Pencil 61

New Eraser Material

Add a Fresnel node and a Mix Shader node, clone the Diffuse node or add a brand new one.

Connect the nodes as shown below:

Modeling a Pencil 62

Eraser Material Node Setup

These are the color values I used:

Modeling a Pencil 63

Eraser Diffuse Color Value 01

Modeling a Pencil 64

Eraser Diffuse Color Value 02

Now assign the new material to the eraser tip as shown below:

Modeling a Pencil 65

Assigning Eraser Material

The Pencil should come out something like this:

Modeling a Pencil 66

Render Preview 01

Modeling a Pencil 67

Render Preview 02

Modeling a Pencil 68

Render Preview 03

The pencil may seem cartoon-ish, but remember that we only have a simple lighting setup and no surface to place the pencil on.

Here is an example of a full scene:

Modeling a Pencil 69

Render Pencil Full Scene

Modeling a Pencil in Blender

Notice how the light, shadow, and reflections work to give us a realistic group of pencils.

Now it’s time for you to create your own scenes.

Happy rendering everyone!