From VsWiki
Jump to: navigation, search


This is probably the most difficult operation in modelling, and accordingly, it is, and probably will remain, my longest tutorial. Be sure to read the beveling tutorial; otherwise you won't understand why the thing we do in this tutorial looks so good.

So, you got two complex, smooth-shaded meshes, such as a ship's fuselage and a wing, or a partially embedded engine. You can leave them interpenetrating each other, if that looks good enough; but to paraphrase good old Moses, "You can tell rookie modellers because they just throw a bunch of shapes, leave them like that, and the ships look like they are glued together."

But if you use boolean ops, chances are you'll end up with gazillions of triangles, and it will shade very weirdly.

The ship I will use for this tutorial is a work in progress as of this writing. I was just about to start welding the control tower, and it occurred to me to save screenshots of the process, and make a tutorial out of it.

Here's a pic of the ship before welding the tower:


First of all, ensure that the two shapes to weld are separate objects. Separate one of them by highlighting it and pressing P, if necessary. Also make sure your two shapes are looking good; shading properly. It will be very diffucult to edit the mesh once the two parts are put together. First thing we need to do is isolate the parts of the mesh we want to work with. Working with the entire ship's mesh will likely result in mistakes that you might not discover till much later, such as moving something while a vertex or facet is selected on the other side of the ship, that you didn't intend to move...

So, highlight the faces of the fuselage that are near the tower:


Press P to separate them. Got to Object mode, with Tab, and select the newly separated polys, and the tower, and move them, by pressing M, to another layer. Any empty layer will do. Now switch to that layer.


I'd already cut the tower, by the time I thought of writing this tutorial, but I hadn't yet cut the main body's mesh; so we'll do so now. Problem is, we can't see the edge of the tower... What to do?


Transparent mode doesn't help us, because the tower has too many lines, and it's not easy to tell which of the lines are edge lines.

What we'll do is move the tower down momentarily, --just by 0.01 in Y seems to be enough in this case. Just be sure to write down the number, as we'll need to move it back up by the same amoung...


Now we can see the edge, so highlight the polygons and press Shift-K, for the cut tool, and follow the outline as closely as possible; then select all the polys to remove...


... and press X to delete them. Unfortunately, we only get vertices where the cut line crosses existing edges, and straight lines in between.


We'll select any line needing an extra vertex, press W for the extra menu, and then Subdivide. But the new vertex needs to be moved, and if we move it by eyeball, it will end up causing shading artifacts. Accuracy is everything in this rough trade...

My trick, in this situation is to select a vertex in the same polygon, Shift-S -> Snap Cursor to Selection, and then select the vertex I want to move, and move it by scaling to cursor:


This guarantees the vertex moves along the same plane as the polygon from which it originated. But more than one scaling may be necessary to get it the vertex to the right place...


Okay, granted, that's not a vertex in the same polygon, where I have the cursor, but almost :)... And I do the same for the vertex at the front...


Now, the other two vertices to the right and below aren't doing much, so I shift-select them...


And W -> Merge -> At first. But now I can take those triangles, select them...


...and turn them into a quad with F.


And the same with the next two triangles. Just keep going, cleaning up as you go.


But you may need to switch views sometimes, to understand what you're doing...


What were we doing, anyways? Ah, yes, moving vertices so that they align (vertically only) with the tower's edge vertices.

Here in a side-view (front is up), I see that the highlighted vertex doesn't line up with the nearest tower vertex (slightly up and to the left of it). Well, up is to the right in this view, so vertical alignment is horizontal alignment... So I will use the same trick: I put my cursor on another vertex in the same polygon, and I scale to cursor (you may need to press "." (period) to set the cursor as scaling center), and move it by scaling:


Keep doing this till all vertices line up with vertices of the other mesh, and cleaning up as you go. Once done, the mesh should look clean and mostly consisting of quads, and preferably with most edges radiating from the cut line, rather than arriving at it at a shallow angle. I have one shallow angle line there, on the right, but there's nothing I can do about it, really.


So now [Tab] back to Object mode, select both meshes and Ctrl-J to Join them. Actually, NO, first move the tower back up by 0.01, or as needed, to compensate for when we moved it down to see the edge. Then Join them:


Tab back to edit mode. The vertices should be so close together as to look as one, but they aren't joined yet. So start joining them together, one pair at a time, using W -> Merge -> At Center...


...but we may run into trouble sometimes, like extra vertices in one mesh or the other.


Just select the edge needing an extra vertex, W -> Subdivide, then select the pre-existing vertex, then select the new one, and W -> Merge -> At first.


But we don't want all those shallow angles to the cut line, so, to make the edges radiate from the cut line, select two triangles and Ctrl-F to Flip them...


Select the next two triangles and flip them...


Select the next two triangles and flip them...


Very good. If all went well, it should look horrible :)


Yep, this is all you'd get from a boolean operation, in terms of shading... But we want better than that, don't we? But we don't want to go the route of subsurfing everything just to get one weld to look right; and it wouldn't look right, anyways.

So what do we do?

Our next step is to make a cut parallel to the weld line. Select all the polys to cut. You can just select one and use Ctrl-Alt-Shift-F.


And cut along:


And clean up after yourself:


Now we want to make another parallel cut, on the other piece:


Trust me. Just do it:


And clean up --i.e.: Join vertices, join triangles into quads, etc.


Let's have a look at it now, in Object mode (Tab):


Not too bad, eh? What a difference those two cuts made! If you don't know why, it means you haven't read my beveling tutorial. I told you to read it first...

But it's still not good enough; and Blender's renderer won't shade smoothly across surfaces at 90 degree angles, so we're not done yet.

Select the entire welding edge:


Go to the Mesh menu, Scripts -> Bevel Center. Put the bevel quantity down to 0.01, press Bevel, then move the slider one tiny bit at a time, until about one third of the whole width of the weld is taken up by the bevels:


Bevel Center works like a charm, but it does a few weird things, though: Turns your geometry to flat shading, changes your materials, flips your normals, so after pressing Exit to get rid of the Bevel Center panel, press Ctrl-+ to select the whole welding area...


... and W -> Set Smooth; Ctrl-N; and find the original material, and Assign it agin, if necessary; then...


... then it should look pretty good ...


If so, then select it in Object mode, and send it back to the layer it came from:


Select the rest of the ship and Ctrl-J join them; then Tab to Edit mode, select all polygons on both sides of the separation line,


and Remove Doubles. The whole thing should be back in one piece, now.


And it should look better than any boolean, subsurfing or normal map tricks you may have heard of...


But don't get carried away, now; sharp edges look better in some places. Use common sense.