Blender 3D: Noob to Pro/Deforming Meshes using the Curve Modifier

Understanding the Curve Modifier

edit

The curve modifier lets you use a curve shape to deform a mesh. The mesh will follow every twist and turn of the curve as far as it can bend, depending on how many vertices it has—clearly, the more vertices there are, the more faithfully it can follow the curve.

The curve modifier is also very easy to confuse yourself with if you’re not careful in how you set it up. A common situation is you try to move the deformed object in one direction, but it ends up moving in a completely different direction! This happens when you choose a deformation axis that doesn’t correspond to the predominant orientation of the points in the curve.

There are in fact some predictable rules that govern the behaviour of the curve modifier. Once you understand these rules, you shouldn’t need to keep trying different things at random to try to achieve the effect you want, you should be able to go straight for it.

A Simple Example

edit
 
Grid plus path objects, ready for action

Let’s do an illustrative example to clarify things. Start a new Blender document; delete the default cube, and add a grid object instead, with the default 10×10 subdivision to give it plenty of vertices that can be deformed. Also add a path curve on top of it—this will give you a NURBS curve with 5 points, initially in a straight line. The result should look like at right.

 
Grid deformed by path, default settings

Now  RMB  on the grid, go to the Modifiers Context   in the Properties window, and add a new Curve modifier which you will find in the "Deform" column. Click under "object" in the empty box and choose "NurbsPath".

The grid object should immediately jump a little way in the direction of the negative X-axis. Why?


 

Rule One: The offset of the first point on the curve in its local coordinate system is also used to offset the origin of the deformed shape.

If you select the curve and  TAB  into Edit mode, you should see that, while the origin of the curve’s local coordinate system (the fat orange dot) is in the middle of the curve, the first point (the one at the end of curve in the same direction that the “centipede legs” are pointing) has a negative X-coordinate. Select just that point, and from the Snap menu  SHIFT + S , do “Cursor to Selected”. Now  TAB  back into Object mode, and from Object→Transform do “Origin to 3D Cursor”. This will adjust the origin of the curve’s local coordinate system to that first point (keeping the curve itself in the same place), whereupon the grid object should jump back to its original location.

 

Corollary to Rule One: You will make things a lot simpler for yourself if you change the origin of the deforming curve to coincide with its start point.

You can of course freely move around, add and delete the other points. Just be sure to keep that first point always at the origin of the curve.

 

Now look at the settings for the Curve modifier. Notice those six buttons under “Deformation Axis:”?

 

Rule Two: The Deformation Axis is interpreted according to the local coordinate system of the deforming curve.

When a path curve is created, all its points initially lie along its local X-axis. Since the default for the Deformation Axis is “X”, all works pretty much as you expect. If the two do not coincide, then weird things happen when you try moving things around.

If you really want to mess around, you could go into Edit mode on the curve, select all its points, rotate them to, say, orient them along the local Y-axis, then get out of Edit mode, select the deformed mesh, and change the Deformation Axis on its modifier to Y, and things should still work consistently. But why bother?

 

Corollary to Rule Two: For simplicity, ensure that the Deformation Axis corresponds to the primary orientation of the points of the deforming curve in its local coordinate system. Otherwise, the deformed mesh will be rotated from its undeformed orientation, and will go off at a completely different angle when you try to move it.

As long as you obey the above rules, you can move, rotate and scale the deforming curve in object mode only as much as you like, and the deformation will still behave in a reasonable fashion. Of course, you can do what you like to the deformed mesh in object or edit modes, and this will still be true.

 

Rule Three: The effect of the deformation corresponds to the relative positions of deforming curve and deformed mesh in world coordinates.

 
Fiddling with the deforming path

Select the curve,  TAB  into Edit mode, select the middle point, and move it a little to one side, as at right. You should see the grid mesh immediately bend in a corresponding way.

Now  TAB  into Object mode, select the mesh, and move  G  it around: notice how it tries to follow the shape of whatever part of the curve lies nearest to it. What shape does it take when you move it off an end of the curve? How about to one side?

Alternatively, you can similarly drag the curve instead of the mesh, and the same thing will happen: it is only their relative positions that governs the actual deformation.

Also try changing the scaling radius  ALT + S  and tilt angle  CTRL + T  on particular curve points: note how the former causes the deformed mesh to get wider and narrow at those points, while the latter makes it tilt from side to side.

Another Example

edit

Setting up your Mesh

edit

While this example will be done with a cone primitive, you can use the default cube or another shape of your choosing so long as it can be loop subdivided along the axis you wish to curve. Delete the default cube if you're not going to use it as your base mesh, and add your chosen primitive. In this example, we'll be using a Cone.

 
A basic cone in Edit Mode

Do everything with the 3D cursor at the center.

  • Set your view to the X-Y Axis (Top View) by pressing NUM7, the 7 on the keypad.
  • Press Shift+A > Mesh > Cone
  • A smaller number of vertices are needed, since this cone will become just the tip of the finished shape.
  • Reduce the number of vertices to 12.
  • Press TAB to enter Edit Mode, or choose Edit Mode from the bottom of the 3D viewport.
  • Switch views to the Z-X Axis by pressing NUM1 (1 on the keypad). Your screen should now look something like the picture at left.
  • If your cone is selected (one or more vertices are yellow) press AKEY (Select/Deselect All) until they are deselected.
  • Select the point of your Cone with the RMB and drag it upwards with the blue arrow. You can hold down the CONTROL key if you want to constrain the scaling to set units. For this example, 5 squares of height were added to the cone.

Subdividing the Cone

edit
 
Extruded cone
  • Go to front view by pressing NUM1

The best way to do it is by selecting the side edges and subdivide them by pressing WKEY then clicking on Subdivide, after that you can select the number of cuts you want. You need at least "5" segments. The more segments you have, the smoother your curved cone will be. be sure you have "Limit selection to visible off" and to first deselect all "A key" and you are in "edge select" mode

  • You can also do: still in Edit Mode, press the NUM8 repeatedly to rotate your view to the underside of your cone. Select the center vertex of the circle, and hold down CONTROL, then press the +KEY on the keypad. This will select all of the adjacent vertices of the base. Then extrude using the EKEY Pull the new vertices away from the cone a distance at the Z-axis and click the LMB to set them in place. Press the SKEY and widen the new base of the cone a bit.

Making a Curve

edit
 
  • In Object Mode, Z-X orientation ('NUM1'), make sure you have nothing selected and press Shift+A > Curve > Bezier Curve
  • Rotate your curve 90° (holding down the CONTROL key to make it rotate in 5° intervals) Note- or just R-KEY and then type 90, so that it lines up with your cone. Move it off to one side so that its not hidden by your cone.
  • Go into "wireframe"
  • Grab the center vertex of each end and adjust its rotation (RKEY) until you have a nice shallow dome shape.
  • Scale the curve in size (SKEY) until it is larger than your cone.
  • The name is highlighted in the "Outliner" Window: "BezierCurve"


Applying the Curve to the Mesh

edit
 
Modified cone
  • Select the cone in Object Mode. Choose in the "Properties" Header the "modifiers" tab and click "Add Modifier"
  • Click the Add Modifier button and choose Curve from the popup list.
  • Under Object tick the empty box, and select the name of the "Bézier Curve" (it will be "BezierCurve" without the quotations if you left it as the default.)
  • Notice the six buttons underneath, They are X, Y, Z, -X, -Y, -Z. They affect which plane the curve deforms. For this example, you'll need to select the X button.
  • Move your Cone so that it overlays the curve in the '3D View" windows, and notice how it follows the Bézier Curve.
  • You can modify the Bézier Curve as well as the cone repeatedly until you are happy with the design.
  • If you switch to Edit Mode, notice that the cone returns to its straight orientation.
  • To apply the deformation to the mesh permanently, in the Modifiers panel, click the Apply button next to your Curve modifier.
  • Move the curve up 'till the cone is around the curve