Cinema 4D / BodyPaint 3D Program Documentation Tutorials Mechanical Modeling Tutorial Working with Boole and Instance Objects
Function available in CINEMA 4D Prime, Visualize, Broadcast, Studio & BodyPaint 3D

Modeling a Pencil

Modeling the tip of the pencil

We will begin by modeling the lead tip of the pencil. The tip of the pencil most closely resembles a Cone primitive Create menu. In the Attribute Manager’s tab Object, set Top Radiusto 5, Bottom Radius to 59 and Height to 250. These values can be modified later if you want to create a thicker and/or longer tip. The Cone Object is pointing upward, i.e., along the positive Y-Axis. The segmentation around the cone is currently set to 36 and can be increase to 72 if a close-up rendering of the final object is later made. Since we will be trimming the bottom of the cone, increasing the Rotation Segments value will result in a better-looking edge. The Height Segments can be left at 7 or 8. In order to make the tip of the pencil look more realistic, enable the Caps option in the Caps tab and set the height and radius each to 5 cm.

The Landscape Object

The bottom edge of the cone will be clipped to create a jagged edge. First, create a Landscape object from the menu Create | Object. In the Attribute Manager, activate the Spherical option to give the Landscape object a closed shape. Next, scale the Landscape Object down so that the bottom of the cone is completely engulfed by the Landscape object (see image below). To scale the object you can activate the Scale tool in the icon palette, click and drag the object’s handles, or manually enter values into the Size fields in the Attribute Manager. Move the Landscape Object down along the Y-Axis, if necessary. Once the Landscape object has been placed correctly, only the tip of the cone - which will constitute our pencil lead - will peer out at the top.

Define the Landscape object’s parameters as pictured above.

Unifying Objects

Create a Cylinder primitive from the Create | Object menu and scale it so its overall length and width is slightly longer and wider than that of the final pencil. So you can set the Radius value to 65 and the Height value to 1800.

Reposition the cylinder vertically so that its top end lies completely within the Landscape object. The purpose of all this is so we can fuse both objects to server as a "hull" from which a helper object will be created from the union (intersection) of these objects. Create a Boole object from the Create menu and make the Cylinder Object and Landscape Object’s Child objects of this Boole object. In the Attribute Manager, set Boolean Type to A union B, which will cause both objects to be fused to a single object. All unnecessary inner surfaces will be automatically deleted. The option is enabled by default. To further optimize all new points of the Boolean object and, if necessary, combine polygons to N-Gons enable the Create single object and Hide new edges options as well (see image above). The boole object should be renamed to ensure a better overview of the objects (double-click on the name in the Object Manager). This name should reflect the object’s function, e.g., ,Negative body (additive)’.

Subtracting Objects

In order to make the tip of the pencil visible we must remove the Boole Object from the cone. To do so, create a new Boole object and set its Boolean Type to A subtract B. The letters "A” (1st) and "B” (2nd) represent the order in which the Child objects are seen by the Boolean operator. Therefore, in order to achieve our desired result, it is important that the cone be the first Child object ("A”) and the unifying Boole Object the second Child object ("B”) with regard to the new Boolean object. Otherwise the bottom part of the Cone object will not be removed. Rename this Boole object as well, e.g., to ,Pencil tip (subtracted)’.

How jagged the pencil tip’s edge turns out is determined by the shape of the Landscape Object. Use the Landscape object’s Seed parameter (Object tab) to modify the shape of the Landscape object. This can be useful if, for example, you are creating several pencils and want to avoid a homogenous look.

Free-form deformation using the FFD object

To prevent the pencil tip from looking too uniform we will apply an object (Create | Deformer) and scale it until it is slightly larger than the tip of the Cone object.

Move the FFD object along its Y-Axis, if necessary, to center it around the tip of the cone.

In the Object Manager, make the FFD Object a Child object of the Cone object. Switch to the Use Point Tool and move the points of the FFD object around to create a non-uniform tip (see image below). In doing so, the cone’s lower edge should remain unchanged. Try to modify the tip of the cone so it looks like it has already been used to write.

Modeling the pencil shaft using Extrude objects

We will now model the shaft of the pencil. We will do so using an Extrude object in conjunction with an n-Side Spline since this will let us most easily modify the hexagonal shape. We will later be able to easily adjust the number of corners, the length and even the rounding of the edges. The Extrude object will allow us to modify the length of the shaft as well as the shape of the rounded edges at its end.

Create an n-Side Spline object from the Create menu. Set its Radius to 43 and leave the Sides parameter set to 6. Enable the Rounding option and set its Radius value to 5. Set the n-Side Object’s Plane to XZ. Next, create a new Extrude object and make the n-Side Spline a Child of the new Extrude object. In the Extrude object’s Attribute Manager settings, set the Movement values to 0, 2000 and 0, respectively. This will create a pencil shaft with the correct length. Move the n-Side Spline along its Y-Axis to a position as shown in the image below (make use of all viewports, if necessary).

By moving the n-Side object up you can later adjust the overall length of the pencil.

Rounding Caps

Switch to the Extrude object: Caps tab and set Start parameters to fillet cap. Set each parameter’s Steps and Radius values to 3, respectively. If the Fillet Type parameter is set to Convex, the object’s bottom edge will be slightly rounded, this rounding (fillet) consisting of three segments. Note that a fillet automatically increases the size of the object’s profile. If you want to avoid this, the Constrain option should be enabled. The end of the Extrude object should be sealed with a simple cap surface without any additional filleting. When working with Boole objects it is important to know that these objects, depending on the Boolean Type used, often only work with objects with a closed volume.

Creating Boolean objects with Instances

Next, we will trim the end of the Extrude object just beneath the tip, thereby matching its irregular edge to that of the tip. We will do this by creating an intersection between the Boole Object being added, the Landscape Object and the Extrude object. Only the Extrude object intersection, which lies within the Landscape Object and its fused Cylinder Object, will remain visible.

In the Object Manager, select the Boole (union) object, then select the Objects| Modeling| Instance. This will create an Instance of the Boole object. To make sure you created an Instance of the correct object, simply select the object in the Object Manager and look into its Reference Object field in the Attribute Manager’s Object tab. If the incorrect object name is displayed in the Reference Object field all you have to do is drag & drop the correct object into the field.

An Instance object can be moved and rotated independently of the reference object. It can even be scaled independently by switching to the Model mode before doing so. When in Use Model Tool mode, an object’s points are not modified, rather its axes are lengthened or shortened. Therefore, objects that contain to editable points can also be stretched or scaled using this mode. For example, a sphere that has not been made editable can be stretched to an ellipsoid or even squashed into a disc. In our example, however, our Instance object will remain unchanged. This bears the advantage that we can, if desired, later modify the shape of the Landscape Object and update the Instance Object accordingly.

Using two objects to create an intersection

Create a new Boole object with the Boolean Type, A intersect B. Enable the Create single object and Hide new edges options here to optimize the geometry. Make the Extrude object (shaft) and Instance Objects Child objects of this Boole Object. Select the new Boole object in the Object Manager and you will see that the top part of the Extrude object, above the Landscape Object, was trimmed. Rename the Boole object to ,Boole (intersect)’. To harden the Extrude object edge, enable the Boole object’s Create Phong breaks at intersections option. If the Extrude object is trimmed at the bottom, the Cylinder object in the Landscape object’s hierarchy must be lengthened or the n-Side object must be moved further up.

Creating a negative shape

What we need to do now is sharpen the tip so it looks more like the actual tip of a pencil. As you can see, only the lead tip is sticking directly out of the shaft and the tapered wood that leads to the lead tip is missing. What we will do is create this section of the shaft using the same cone that was used to create the lead tip - but how? Using the intersection between the cone and the Extrude object would create the shape we need but would also trim off the bottom part of the pencil’s shaft. What we need is a shape that defines the part of the shape to be trimmed off. For this we will also use a Boole Object. All we need to do is remove part of the existing cone from, for example, a simple Cube Object in order to achieve a negative shape - basically like the shape of a pencil sharpener. Select the Cone primitive and subsequently create an Instance Object. We now need to create an object from which the tip can be subtracted (to create the negative shape). The shape we will use is a simple Cube primitive (Create | Object). The exact size of the Cube primitive is not that important - simply make sure that it completely engulfs the Cone Instance. Place the Cube primitive so that the Cone object’s cap surface protrudes slightly from the bottom of the Cube primitive. Subtracting the cone from the cube shape will give us the desired result (see image below).

Create a new Boole object (Create | Modeling) and use the default setting, A subtract B as Boolean Type. As usual, enable the options for creating a single object and hiding new edges in order to optimize the resulting geometry. In this operation, we must pay particular attention to the order in which the Child objects are placed in the hierarchy. Since the Cone Instance object must be subtracted from the cube, the Cube primitive must lie above the Cone Instance in the hierarchy (as Child objects of the new Boolean object). If you accidentally place these objects incorrectly you can simply drag & drop them into the correct order in the Object Manager. Name the new Boole object ,Positive body (subtracted)’.

Completing the pencil model

One more step is required so the shape we just created can be subtracted from the pencil wood. You probably already guessed it - we will use a Boole to do so. For this operation we will use A subtract B as Boolean type.

Create the new Boole Object, this time leaving the Create Single Object option disabled (we’ll explain why later). Make the Boole (shaft) and Boole (negative shape) Child objects of this new Boolean object - make sure the Boole (shaft) object lies above the Boole (negative shape) object in the hierarchy. What’s left is a typical tapered tip of a pencil. The pencil’s shaft remained unaffected.

Click on the link below to open the file with the modeled pencil tip:


Preparing for materials

We left the Create single object option disabled for the last Boole Object we created for the following reason:

If two objects are fused via a Boolean operation their respective materials will be maintained on the resulting Boole object. If, for example, a red sphere is subtracted from a blue cube the result would be a blue cube with a red cavity. If on the other hand a single object is created, all parts will be combined to create that object. Only a single material can be assigned without converting the Boole object to a Polygon object.

Since we definitely want to assign the tapered wood a different material than the pencil shaft it makes sense to leave the Create Single Object option disabled.

Now we can turn our attention to the application of materials. The Boole Lead Tip (subtract) object will be assigned an almost black material since it represents a lead material, and the Boole (taper) object will be assigned a wood material. The remaining part of the pencil can be textured via the Extrude object (shaft). The image above shows what the pencil can look like when textured.

An example of how your pencil can be textured.

Varying the shape of the pencil

All pertinent parameters of our pencil model can be easily edited or even animated. The n-Side Object defines the pencil’s profile shape and the Extrude object defines the pencil’s length. Make sure that the bottom part of the Extrude object is never larger than the Cylinder object. The shape of the tip can be adjusted using the Cone primitive and the irregular transition between the lead tip and the tapered wood section can be adjusted via the Landscape Object. Use the Landscape object’s Seed value to vary the shape’s irregularity in case you want to create multiple pencil models for your scene. Landscape Object’s Y Size parameter controls the amplitude of the irregular transition. Reducing this value to 0 would create a smooth transition between the pencil tip and the tapered wood section. The Width Segments value controls the number of subdivisions in the Landscape Object and can be used to add detail if increased.