|
|
|
|
Back to Tutorials |
|
|
|
|
|
Creating and Texturing a Gear - Part 2
|
|
|
|
|
|
Preparing
the UV Layout |
|
|
|
|
|
The process of laying out a 2D
representation of all the 3D faces is called UV unwrapping.
Fortunately Blender contains some very powerful tools to unwrap a mesh
and I strongly recommend you check the Blender Wiki and do some of the
many unwrapping tutorials to see its full capabilities.
Before you unwrap a mesh you need to have some understanding of how you
will create the 2D image to use as the texture and where most of the
detail needs to be.
Creating the textures for a machined metal surface needs to take into
account the direction of cut that created the profile.
On our gear model we have three distinct areas as detailed on the
coloured gear opposite. |
 |
A gear like this would normally be machined from either a casting that
is generally the correct profile with a little bit of surplus metal in
the areas that need to be machined, or from a metal disk cut from a
bar. This gear is machined from a casting
Because the gear is
made from a casting the recessed area of the gear represented
by
the red area would be left as cast with a fairly rough sand cast
finish. The face and bore of the gear would be turned on a lathe giving
radial tool marks around the gear, represented by the yellow area. The
gear teeth would be cut on a gear hob and the key-way broached out of
the bore, both using a linear cutting stroke represented by the
blue colour.
|
|
|
|
|
|
Because there is such a distinct difference
between the machined and as
cast surface, texturing is best done using two different methods. The
texture of the sand cast area can easily be recreated using Blenders
procedural textures, whereas the machined regions are more
suited to
image based textures. As we are employing two different texture types
we need to use two different materials. Applying different materials to
areas of the same mesh is done using the Editing Context buttons in the
Link and Materials panel.
Because
the gear doesn't have a material yet, press the New button indicated,
the material indices will change from 0 Mat 0 to 1 Mat 1 and
a
default grey material will appear to the left of the Material indices.
Click New again and the numbers will change to
2 Mat 2. |
 |
We now have two materials associated with the gear but only
the first one is assigned to the gears faces. If you now go to the
Shading context, Material sub context buttons and in the
material
panel change the colour to red. Then go back to the Edit buttons Link
and Material panel, the material displayed to the left of the Material
Indices should now be Red. |
|
|
|
|
|
 |
If you click the arrow to the left of 2 Mat
2 the numbers will change
to 2 Mat 1 and the red material change to grey. The numbers 2 Mat 1
mean two materials are assigned to the gear and you have material 1
selected. We now need to assign the second (red) material to the cast
area of the gear.
| Paint select BB the faces in the
recessed section on both sides of the
gear and then in the Link and materials panel click the right arrow
next to the 2 Mat 1 to select the red material. Press the Assign
button, this will assign the second material to the selected faces,
which will now turn red. |
 |
We will later changes this red material to give the appearance of a
sand cast, iron surface.
|
|
|
|
|
|
|
Before we start to unwrap the gear we need
to open a UV/Image
Editor window. If you still have a Scripts window open you can
change
this to the UV/Image Editor.
With the faces of the cast selection still selected go into front view
and wire frame Z
and Box
select the top and bottom face vertices, include the vertices on the
centre of the bevelled edge.
Go back to face select mode and paint deselect BB-MMB the faces of
the bore and key-way. |
 |
|
|
|
|
|
|
With all the faces now selected, go
into top view and scale the view SW
so the gear occupies approximately half of the view. Pan the gear Ctrl MMB so it sits
towards the bottom left corner of the view.
 |
Press U
to
open the UV Calculation menu and select Project From View. This takes
the selected faces and lays them out as they appear in the 3D view.
In
the UV/Image Editor window you will now have a 2D layout of the
selected faces. The top face is stacked on top of the bottom face. |
 |
You can use blender manipulation commands, RMB to select, Grab, and Scale on the UV points in the
UV/Image Editor window. Once you know the
commands in one window they usually carry over to all the
others, |
|
|
|
|
|
|
The gear teeth are a little more tricky to layout
because we can't get all the teeth parallel to the view.
To
enable us to use some of Blenders automatic unwrapping tools we need to
mark the mesh at the points where the unwrap can split the UV layout
into sections,
rather than making a single skin which would be very stretched and
distorted.
Alt-RMB
select the loop of vertices in the centre of the bevel between the top
face and gear teeth. Press Ctrl-E
to bring up the Edge Specials menu and select Mark Seam. The seam will
get an orange highlight. Do the same on the bottom face seam. |
 |
|
|
|
|
|
|
 |
We now need to mark a seam on the one side of
each of the gear teeth.
Select
the three edges to the side of a gear tooth so you have a seam touching
the marked seams we have created in the centre of the top and bottom
face bevels. Again press Ctrl-E
and Mark Seam.
Repeat this on all the gear teeth.
| What
we have created is a group of faces for each gear tooth. The groups
will be individually laid out in the UV/Image Editor |
 |
|
|
|
|
|
|
|
Select the four edge loops Shift-Alt-RMB that form the gear
teeth and half the bevel.
Press U to open the UV
Calculation menu and this time select Unwrap. |
 |
|
|
|
|
|
|
Blenders unwrap tool will layout each gear tooth as a
ladder frame
of vertices in the UV window. As we are going to create an image
texture for the grain of the metal that is very fine, we can stack each
tooth on top of each other to gain the most detail from the image. The
teeth will need an image texture with the grain running vertically.
 |
As mentioned above most of Blenders commands are
also used in the UV window.
You will need to straighten up the vertical edges of each tooth by Box selecting the top two rows of
vertices and moving them G on
the X-axis. |
 |
You can select all the vertices of a gear tooth by Link selecting. In the UV/Image
Editor Link select will deselect all the other vertices that are not
part of the linked group.
|
|
|
|
|
|
 |
Link
select each gear tooth, straighten the verticals, scale it to
approximately the same size as the tooth in the top left corner, then
move it over the top tooth.
The teeth with the faces stacked vertically will need to be Rotated 90 degrees
| You
should end up with all the teeth stacked up in the top left corner.
They don't need to be exactly on top of each other, just all roughly
the same size and in that area. |
 |
|
|
|
|
|
|
|
 |
Select
the top and bottom edges of the bore (edge select mode) and key-way and
the vertical edges between the bore and key-way as indicated, then Ctrl-E Mark Seam.
Paint select the face of the bore BB
(not the key-way faces) and Unwrap |
 |
|
|
|
|
|
|
Blender will unwrap the
bore into a row of faces across the UV/Image Editor
 |
You
will need to rotate the faces into the vertical plane because we are
going to set the image texture with a vertical grain, which must run
around the bore of the gear.
Before rotating the faces you will need to re-align the vertical edges
as we did with the gear teeth. |
|
 |
|
|
|
|
|
|
 |
Finally
select the faces of the key-way and Unwrap them. Straighten up the
faces and scale them to approximately the same height as the gear teeth.
Move them into the top right corner of the UV/Image Window. |
 |
|
|
|
|
|
|
If you now select All in the 3D view all the gears
faces will be represented in the UV/Image Editor.
The
layout isn't making the best use of the available area at the moment,
but we now have four distinctive parts that can be easily selected and
scaled to suit the image texture we create. |
 |
|
|
|
|
|
|
In Part 3 we will move away from Blender and make an
image texture of the surface grain and machining scratch marks using
Gimp.
|
|
|
|
|
|
|
|
|
|
|