Trying to paint a stripe down the side of a complex mesh

Hopefully this will be an easy one, but I’m not sure how to go about this.

Here is the knob that I’m modeling:

Here is what I’ve got so far: .blend file here

And here’s a sample of the mesh:

Notice how there is a stripe down the side of the real knob? I have the materials all set with the knob to make it look fairly realistic, how would you go about getting that stripe on there? I don’t think I’ll be able to just change the material of some of the faces on the mesh like I did for the center of the knob since they’re not lined up. Since the knob is made of 2 joined meshes, I don’t know if I can unzip them and attempt some sort of UV texture action, either. Any suggestions?

This is where a UV test grid can come in handy. With your mesh unwrapped open a UV/Image editor window and Image>New, then select UV Test Grid. Then View>Paint Tool. Now start painting on the test grid to see which areas of the grid correspond with the mesh. You only get one level of undo when painting so make your strokes count. You can see paintig on the mesh interactively by going into textured view mode in the 3D window with ALT+Z. When you’re satisfied that you have the correct points marked use Image>Save Image As. Now export your uv layout. Import the layout and test grid into a 2D image editing app where you have more control, stack them on top of each other and apply your line to the necessary portion of the layout but on a separate layer finally saving the image with the layout and test grid layers disabled and in a format that supports alpha. Import into Blender and use this as your map.

I don’t know what you see but it looks more like an overexposed anisotropic specular highlight, can’t you just set the specularity to tangent coordinates and set a specular ramp shader that has blue in it?

A cheat way is to assign one of the wedges’ faces a white material, and the rest black, using Multiple Materials.

The vertex paint way is to go into Vertex Paint mode and paint the stripe, since the vertexes line up with the way you want the stripe to go.

The UV paint way is to UV unwrap it, create a new black texture, and paint the stripe manually using 3D texture paint.

<see wiki for more info on these three methods>

Easy way to do this,
in edit mode, go to face select mode, select the faces you want white.
press p, separate selected, add new material (white).
Then once all textures are complete, as this cannot be changed later,
press ctrl/j to join the mesh with the nice crisp white line in place.
texture baking may be a option at this point also, but not needed.
You may in edit mode need to convert triangles to quads on your mesh.
m.a.

Attachments


Yoinks! Too many verts!

Try this:
http://home.comcast.net/%7Emichaelthomasgreer/blender/knob.jpg
Click for knob.blend.zip.

Hope this helps.

[edit] Oh yeah, in this case you could make the stripe just as suggested. But for a really complex mesh you can map the texture (like a decal) using another object as proxy. See the Blender Manual here for more.

You sir. . . are a GENIUS!! Thanks, Duoas!!

It took me quite a while to crank out that embarrassing excuse for a knob. I’d hate to bug you further, but being that yours looks so much better than mine, could you give me a quick & dirty description on how you went about making that shape?

Thanks again!!

:ba:

It’s pretty much all in the blend.

First I counted the number of “finger dents” in the knob (seven). 360 /7 = 51.429 degrees. So the knob is constructed out of 7 wedges.

Then, knowing something about the subsurf algorithm, I estimated that each section could be reasonably divided into eight: 5 parts for the “finger dent” and 3 for the rest.

Look on layer 2 and you’ll see the completed wedge shape. After adding a couple of extra ridges along the “non-finger-dent” part so that it has a nice crease, and after wiggling a few vertices around where the pipe connects with the base, I placed the 3D cursor at the center of the object, selected all vertices, duplicated, and rotated 51.429 degrees. Repeat six times. Select all. Remove doubles. Adjust a few loose vertices. All done.

Hope this helps.