|
Page 11 of 12
Last time, we took a look at cubic, linear and spherical mapping, but I ran out of pixels, and we didn't cover cylindrical mapping. Cylindrical mapping, like linear mapping, maps a design smoothly across the facing area of a shape, but smears on the top and bottom lip of a cylindrical shape. But we will solve this problem in this week's lesson, and also explore a little bump mapping. And we'll get a little more into the types of images you'll want to create to make 3D objects look more visually complex. Additionally, we'll take a whack at bump and transparency mapping.
First, you need to open trueSpace, and create a cylinder that's about the proportions of a soft drink can.
1.) Use the document upon which you worked last time. On the toolbar, click+drag on the objects pull-down and then release the cursor when it's over the cylinder icon. You'll probably need to choose a different view (top view is good) and then move the cylinder so it's in front of the camera. You can delete the other shapes in the scene. You might also want to scale the cylinder. Now, the cylinder is not the correct proportions but that's not an immediate concern. We want to apply UV mapping next.
2.) Click+drag on the Material Library icon on the toolbar's pull-down menu (or just click on the UV mapping tool if it's on the top) and then choose the UV mapping tool. Click on the cylinder on the UV mapping panel, and then choose the Object rotate tool on the toolbox's object move pull-down. Carefully, with both mouse buttons depressed, rotate the wireframe (mapping wireframe) so that the wireframe is perched symmetrically on the cylinder shape. Then, using the right mouse button, drag on the wireframe so that the orange highlight is perfectly to the right of the object and wireframe. See figure 45.

The mapping on the cylinder will start at the right (the orange part of the UV mapping wireframe should be at a 3 o'clock position if you look at the scene from overhead...oh, and you can switch views before committing to the UV mapping—this is not a "modeful" UV mapping step.
3.) Let's move to a side view. The scale tool always acts relative to your view on an object. Therefore, because the cylinder needs to be taller to be a soft drink can, a side view and a tug straight up (not side to side in the least) while holding the Object Scale tool and the left mouse button will increase the height only of the cylinder. See figure 46.
4.) Take a break for a moment and download figure 47; crop the image using your favorite image editor (save it to Targa, BMP, or JPG format) and let's look at what I've done and why.

The proportions of the design are around 300 pixels wide by 225 pixels high. This seems to work for mapping a shape that is roughly soft drink can in proportions. This is not a magic number, and I'm sure through experimenting, you can come up with optimal mapping dimensions. This sounds nuts, but why not take the label off a real can and measure it?
The can design has a repeat of twice, once for the front and once for the back of the can. You need to do this with cylindrical and spherical mapping if you want to put a "decal" (a piece of signature or label design) on a surface of a 3D object.
The design ends at the right edge where it begins at the left edge. That is, I kept the solid red at the left and right edges of the can.
Even though it's only be a pixel or two, I kept all design elements away from the top and bottom of the design. This is because unless you map the cylinder using the UV tool perfectly to the cylinder, there will be some smearing over the top and bottom lips of the cylinder. And it's darned hard to do this perfectly.
Let's map the soft drink label, or better still, create your own design. It's okay; I'll sit here and wait while you do it.
1.)Right-click on the funnel icon on the toolbox, and then click the texture icon on the shadermaps panel. The Texture Map panel pops up and if you click on the top button, you can search your drive for that soft drink can design (label).
2.) Set the repetitions to 1 U and 1V.
3.) If you like, increase the reflectivity of the can's surface. You can apply surface properties to the cylinder with a bitmap on the cylinder, or without one.
4.) With the cylinder chosen, left-click on the funnel icon to apply the surface properties to the cylinder, and you can see the results onscreen before you, or in figure 48. Play with the lighting a little, too. The higher the gloss (smoothness or reflectivity), the less light arrives back at the camera after bouncing off the shiny object.
|