From BlenderWiki

Jump to: navigation, search

Curves

Curves and Surfaces are objects just as meshes are objects except they are expressed in terms of mathematical functions, rather than as series of points.

Blender implements both Bézier curves and Non Uniform Rational B-Splines (NURBS) curves and surfaces. Both are defined in terms of a set of “control vertices” (or “control points”) which define a “control polygon”, though each follow a different set of mathematical laws. The way the curve and the surface are interpolated might seem similar, at first glance, to Catmull-Clark subdivision surfaces. The curve is interpolated while the surface is attracted.

A third type of “curve” available here is the polygonal one, which is just a set of straight segments forming an angled line. It does not seem to create a “poly” directly, though, you have to “convert” it from a Bézier or NURBS…

Note that a same object can simultaneously contain Bézier, NURBS and poly curves…

When compared to meshes, curves and surfaces have both advantages and disadvantages. Because curves are defined by less data, they produce nice results using less memory at modeling time, whereas the demands increase at rendering time.

Some modeling techniques, such as extruding a profile along a path, are only possible with curves. But the very fine control available on a per-vertex basis on a mesh, is not possible with curves.

There are times when curves and surfaces are more advantageous than meshes, and times when meshes are more useful. If you have read the pages on mesh editing, and after you read this part, you will be able to choose whether to use meshes or curves.

Working with curves in Blender is fairly simple and surprisingly there are very few hotkeys when creating curves. It is what you do with those curves that really makes the difference. A curve by itself is just that, a curve. But a curve applied to another curve can create very complex objects.

When you have finished reading and learning about Bézier and NURBS curves there are several more advanced examples on the application of curves in the tutorials section for modeling complex objects.

Logo Thumbnail.

There is a Working example that shows how to create an interesting bird-like logo, (Logo Thumbnail). The tutorial covers most aspects of working with Bézier curves including: adding curves, setting up a background image as a template guide and beveling the final curve.

In addition, the Tutorial section has examples on both Skinning and Curve deform techniques.

Finding Curve Tools

Most of the curve tools are regrouped in three panels: Curve and Surface, Curve Tools and Curve Tools1.

You will also find many options in the Select and Curve menus of the 3D view header, as well as in the Specials menu (W).

Visualization

Bézier curve example.
NURBS curve example.

In Edit mode, the curve is drawn as a black line, and in Solid shading (or Shaded, …), the closed curves are filled with a flat surface. 3D curves have additional “arrows” all along the curve, illustrating both the direction and the relative speed of the movement objects will have when following them as path (unless a custom Speed Ipo is defined…).

Each control point is drawn in purple. Bézier “vectors” are materialized with pink lines, whereas NURBS vertices are linked by yellow lines. As with meshes, selected vertices are highlighted in yellow (with a lighter shade for the active element).

Hiding Elements

As in Object mode, you can hide what is selected, and then reveal what was hidden. This is very handy to clean up a bit your views, when you are working on a complex model with thousands of vertices…

To hide, use CtrlAltH, the Hide button of the Curve Tools1 panel, or use the Curve » Show/Hide Control Points » Hide Selected menu option.

To reveal what was hidden, use AltH, the Reveal button of the Curve Tools1 panel, or the relevant option in the same Curve » Show/Hide Control Points menu.

Curve Tools1

As with meshes, this panel of the Editing context has some more visualization options:

N Size
The size of drawn normals! I think this is a “bug” (i.e. something from same mesh panel, that has nothing to do here…).
Draw Handles
Only relevant for Bézier curves, when enabled, it draws the whole control points (with its two handles defining the curve vectors on both sides of the point itself), else only the central vertex is shown.


Undo & Redo

Mode: Edit mode

Hotkey: CtrlZ, Ctrl⇧ ShiftZ, AltU

Curves also have the Edit mode Undo/Redo feature, behaving exactly as with Meshes#Undo & Redo|meshes.

Curve Structure

About U and V coordinates
U and V are the conventional names of parametric “coordinates” components (note that these are the same names as texture ones…). They are used to define the resolution, the “knots” for NURBS, etc., along given “axis”. For curves, only the U component is relevant (as they have only one dimension, they are lines). The V component is used by NURBS surfaces.


Control Points and Segments

Curves are mainly defined by their control points, as described below in their respective section. However, you will sometimes encounter another concept, the “segment” of curve. A segment is defined implicitly by its two adjacent control-points. Unlike with meshes, you can’t explicitly select a segment – you must select its two adjacent control-points.

Curve Resolution

Although these curves are continuous mathematical objects, they must nevertheless be represented in discrete form (set of small segments) from a rendering point of view. This is done by setting a resolution property, which defines the number of points which are computed between every pair of control points (for Bézier curves, it’s a bit more hairy for NURBS…).

You have in fact three resolution settings, two in the Curve and Surface panel, and one in the Curve Tools panel:

  • DefResolU: The resolution applied by default to all curves of the object, both in the 3D views and at render time.
  • RenResolU: The resolution applied by default to all curves of the object when rendering, if not set to zero (else DefResolU is used).
  • Resol U: This setting is only available in Edit mode, it will modify the resolution of the curves (partly) selected currently. Note that it is reset to the DefResolU value each time you modify this setting.
Bézier resolution example.

A separate resolution can be set for each curve by adjusting the DefResolU field of the Curve and Surface panel. The default is 6. (Bézier resolution example) is an example of the same curve, superimposed with the aid of Gimp, showing two different resolution settings. The lighter shaded curve has a low resolution of 4; the curve begins to look linear. The darker curve has a resolution of 12 and is very smooth. Note that high resolutions may look nicer but they can slow down interactive rendering if there is a large number of curves (and/or if these ones have a large amount of control points).

2D and 3D Curves

By default (except for the Path primitive), new curves are “2D”, which means that all their control points will lay in the same plane, the X-Y one in Local space. This allows for example to fill closed curves…

However, you might want to be able to place your control points freely in the 3D space – well, just enable the 3D button of the Curve and Surface panel. Note that you will lose the closed curves filling, and gain the arrows as described above!

Closed and Open Curves

Curves (Bézier or NURBS) are mono-dimensional: they are lines, that never crosses themselves (i.e. control points are only linked to at most two others, forming a continuous line, without any fork…). However, curves can be open (i.e. they start and end points are not linked by a curve segment) or closed. Closed curves are solid, inasmuch that Blender adds a solid flat face inside them (unless they are made 3D).

Béziers

Bézier curves are the most commonly used curves for designing letters or logos. They are also widely used in animation, both as paths for objects to move along and as IPO curves to change the properties of objects as a function of time.

Curve example.

(Curve example) is the most basic Bézier curve you can create. It consists of two control points or vertices, labeled “C”, the curve “B”, handles “H” and an object center “O”.

A handle “H” defines the tangent vector to the curve in point “C” (on its side). The “steepness” of the curve is controlled by the handle’s length (“H” to a “C”). The longer a handle is the steeper the curve (i.e. the more curve wants to hug the handle).

There are four types of handles (Types of Handles for Bézier curves):

  • Free Handle (black). The handles are independent of each other. To convert to Free handles use H. H also toggles between Free and Aligned.
  • Aligned Handle (purple). These handles always lie in a straight line, and give a continuous curve (without sharp angles…). Hotkey: H (toggles between Free and Aligned).
  • Vector Handle (green). Both parts of a handle always point to the previous handle or the next handle (this allows you to create curves made of straight lines!). Hotkey: V.
  • Auto Handle (yellow). This handle has a completely automatic length and direction, set by Blender to ensure the smoothest result. Hotkey: ⇧ ShiftH.
Types of Handles for Bézier curves.

Handles can be grabbed, rotated and scaled exactly as ordinary vertices in a mesh would. As soon as the handles are moved, the handle type is modified automatically:

  • Auto Handles becomes Aligned;
  • Vector Handles becomes Free.


NURBS

NURBS curves are defined as rational polynomials and are more general, strictly speaking, than conventional B-Splines and Bézier curves inasmuch as they are able to exactly follow any contour. For example a Bézier circle is a polynomial approximation of a circle, and this approximation is noticeable, whereas a NURBS circle is exactly a circle. However, a NURBS cannot have real sharp angles in it, unlike a Bézier curve…

NURBS curves require a little bit more understanding of the underlying components that make up a NURBS curve in order to get full use of them. They have a large set of variables, which allow you to create mathematically pure forms. However, working with them requires a little more discussion on the various parts of a NURBS curve.

Note
NURBS are a very complicated topic, I think they might be a good subject for a “Theory” article – written by someone knowing them deeply!


Knots

We start with Knots. NURBS curves have a knot vector, a row of numbers that specifies the parametric definition of the curve (i.e. they describe the range of influence for each of the control-points). Remember the control-points from Bézier curves, NURBS have them too and each control-point affects some part of the curve along that range. The control-points appear as purple vertices.

Note that knots setting concerns only open NURBS, not closed ones.

Default Uniform curve.

(Default Uniform curve) is the default NURBS curve created using the NURBS Curve menu item from the toolbox’s Add menu and is an example of a Uniform curve. The curve itself is drawn in black, labeled “C” and the control-points are drawn in purple; one out of the 4 is labeled “P”.

You can’t manipulate the Knot vector directly but you can configure it using three presets: Uniform, Endpoint and Bezier.

The Uniform button of the Curve Tools panel produces a uniform division for closed curves, but when used with open curves you will get “free” ends, which are difficult to locate precisely.

Endpoint curve.

The Endpoint button sets the Knot vector in such a way that the first and last vertices are always part of the curve, which makes them much easier to place. (Endpoint curve) is an example of applying the Endpoint button to the (Default Uniform curve). You can see that the curve has now been pulled to the end control-points labeled “A” and “B”.

Bezier NURBS, Order 3.
Bezier NURBS, Order 4.

Finally, BezierKnot vector” (I’m not really sure this remains a real knot, in fact…) make the NURBS control points mimic the Bézier control points behavior. This works only with two orders value (see below): 3 and 4.

  • With an Order of 3, all odd points act as a center of a Bézier control point, and all even points act as a Bézier handle. So vertices (1,2,3) define a first Bézier segment, (3,4,5) a second one, and so on…
  • With an Order of 4, all four groups of control points define a Bézier segment, i.e. vertices (2,3,4,5) define a first segment, (5,6,7,8) a second one, etc. Note that here, the first vertice is for some reasons unused…


Order

The Order field of the Curve Tools panel is the “depth” or degree of the curve (i.e. you are specifying how much the control-points are taken into account for calculating the curve shape).

Order 1 is a point and is not an available depth setting, Order 2 is linear (Order 2 curve), Order 3 is quadratic (Order 3 curve), (Order 4 curve) is cubic, and so on. The valid range is 2 to 6. Notice that as the Order rises the curve moves away from the control-points.

Order 2 curve.
Order 3 curve.
Order 4 curve.

If your curve has 6 or more control-points the Order can not be set higher than 6. 6 is the highest Order allowable. If you have less than 6 control-points then the highest Order is limited by the number of control-points. For example, if your curve has 5 control-points then the highest Order allowable is 5.

Always use an order of 5, if possible, for curve paths because it behaves fluidly under all circumstances, without producing irritating discontinuities in the movement. For example, if you have a cube assigned to travel along a NURBS path with an Order of say 2 then the cube will appear to move roughly (or jerky) along the path.

Math Note
Mathematically speaking the Order is the order of both the Numerator and the Denominator of the rational polynomial defining the NURBS curve.


Weight

NURBS curves have a Weight (Curve Tools panel) assigned to each control-point that controls how much each “pulls” on the curve. Think of it as if each control-point has an arm that reaches out and grabs hold of the curve and tries to pull on it. The larger the Weight the more the control-point pulls on the curve, see (Weight of 5) and (Weight of 20). The valid range of Weight settings are 0.1 to 100.0.

Weight of 5.
Weight of 20.

The larger Weight of 20 pulls the curve towards the control-point labeled “C”. Each control-point can have a different Weight setting. As the Weight for a control-point increases the curve will hug the control-points closer. If the Weights are large enough the curve will almost follow the control-points, see (Weight of 100).

Weight of 100.

The control-points can effectively compete with each other. For example, the control-point with the largest Weight will pull the curve towards it and away from the others. If all the control-points have the same Weight then the Weight is effectively canceled, as if none had Weights.

In (Weight of 100) the top two control-points have their Weight set at 100.0, labeled “A” and “B”. The opposite control-points have their Weight at 1.0. You can see that the curve is “pulled” toward control-points “A” and “B”. And at such a high Weight the curve almost follows the control-points.

To see the Weight value of a control-point, select it, open the Transform Properties panel using N, and look at the Vertex W field. The Weight field doesn’t show the Weight!

Preset Weights

A circle NURBS curve.

NURBS curves can create pure shapes such as circles (note that a Bézier circle is not a pure circle). To create pure circles, you must set to specific values the weights of the control-points – some of which are provided as presets in the Curve Tools panel (lower right corner). This is not intuitive, and you should read more on NURBS before trying this.

Basically, to produce a circular arc from a curve with three control-points, the end points must have a unitary weight, while the weight of the central control point must be equal to one-half the cosine of half the angle between the segments joining the points. Lets take an example: if you have three control-points creating a right angle, to get a quadrant, you would set the center point’s weight to cos(90/2)/2 = cos(45)/2 = sqrt(2)/4 ≃ 0.354 (these settings are valid with an order of 4… so you must have at least four control points, as with three points – and hence an order of 3 –, you won’t get a “circular” quadrant!).

The other presets are more useful for NURBS surfaces (to create spheres, cylinders, …).

Primitives

Blender can add five different curve primitives, two Bézier and three NURBS:

  • Bezier Curve adds an open 2D Bézier curve with two control points.
  • Bezier Circle adds a closed, circle-shaped 2D Bézier curve (made of four control points).
  • NURBS Curve adds an open 2D NURBS curve, with four control points, with Uniform knots.
  • NURBS Circle adds a closed, circle-shaped 2D NURBS curve (made of height control points).
  • Path adds a NURBS open 3D curve made of five aligned control points, and with Endpoint knots and the CurvePath setting enabled.




Introduction
What is Blender?
Introduction
Blender’s History
License
Blender’s Community
About this Manual
What's changed with Blender 2.4
Installing Blender
Introduction
Python
Installing on Windows
Installing on GNU/Linux
Installing on Mac
Installing on other Operating Systems
Configuring Blender
Directory Layout
Starting
The Interface
Introduction
Keyboard and Mouse
Window System
Arranging frames
Headers
Console window
Window Types
Screens (Workspace Layouts)
Scenes
Configuration
Modes
Contexts
Menus
Panels
Buttons and Controls
Internationalization
Your First Animation
1/2: A static Gingerbread Man
2/2: Animating the Gingerbread Man
The Vital Functions
Quick render
Undo and Redo
Default scene
Screenshots
Help!
Setting Preferences
Configuring Preferences
Interface
Editing
Themes
File
System
Interaction in 3D
Introduction
Introduction
Navigation
Introduction
3D View
3D View Options
3D View Usage
Camera View
Layers
Local or Global View
Sketch in 3D Space
Introduction to Grease Pencil
Drawing sketches
Layers and Animation
Converting sketches to geometry
Transformations
Introduction
Basics
- Grab/Move
- Rotate
- Scale
- Gestures
Advanced
- Mirror
- To Sphere
- Shear
- Warp
- Push/Pull
Transform Control
Introduction
Precision of Transformations
Numeric Transformations
Transform Properties
Reset Object Transforms
Manipulators
Transform Orientations
Axis Locking
Pivot Point
- Active object
- Individual Centers
- 3D Cursor
- Median Point
- Bounding Box Center
Snapping
Snap to Mesh
Proportional Edit
Data System and Files
Blender's Data System
Blender's Library and Data System
Blender's Datablocks
Scenes
Working with Scenes
The Outliner Window
Appending and Linking
File operations
Introduction
Opening blender files
Saving blender files
Modeling
Introduction
Introduction
Objects
Objects
Selecting Objects
Editing Objects
Groups and Parenting
Tracking
Duplication
- DupliVerts
- DupliFaces
- DupliGroup
- DupliFrames
Mesh Objects
Meshes
- Mesh Structures
- Mesh Primitives
Selecting
- Selectable Elements
- Selection Basics
- Advanced Selecting
- Selecting Edges
- Selecting Faces
Editing
Basic Editing
- Translation, Rotation, Scale
- Adding Elements
- Deleting Elements
- Creating Faces and Edges
- Mirror editing
Vertex Editing
Edge Editing
Face Editing
Deforming Tools
- Mirror
- Shrink/Fatten Along Normals
- Smooth
- Noise
Duplicating Tools
- Duplicate
- Extrude
- Extrude Dup
- Spin
- Spin Dup
- Screw
Subdividing Tools
- Subdivide
- Subdivide fractal
- Subdivide smooth
- Loop Subdivide
- Knife Subdivide
- Bevel
Miscellaneous Tools
Retopo Tool
Sculpt Mode
Multi Resolution Mesh
Vertex Groups
Weight Paint
Mesh Smoothing
Curve Objects
Curves
Selecting
Editing
Advanced Editing
Surface Objects
Surfaces
Selecting
Editing
Text Objects
Texts
Editing
Meta Objects
Metas
Editing
Empty Objects
Empties
Group Objects
Groups
Scripts
Modeling Scripts
Modifiers and Deformation
Introduction
Introduction
Modifiers Stack
Modify
UVProject
Generate
Array
Bevel
Booleans
Build
Decimate
EdgeSplit
Mask
Mirror
Subsurf
Deform
Armature
Cast
Curve
Displace
Hooks
Lattice
MeshDeform
Shrinkwrap
SimpleDeform
Smooth
Wave
Simulate
Cloth
Collision
Explode
Fluid
Particle Instance
Particle System
Soft Body
Lighting
Introduction
Introduction
Lights
Introduction
Light Properties
Light Attenuation
Light Textures
What Light Affects
Lights In Other Contexts
Shadows
Introduction
Shadow Properties
Raytraced Shadow Properties
Volumetric Lights
Introduction
Lamps
Introduction
Lamp Light
- Raytraced Shadows
Spot Light
- Raytraced Shadows
- Buffered Shadows
- Halos
Area Light
- Raytraced Shadows
Hemi Light
Sun Light
- Raytraced Shadows
- Sky & Atmosphere
Lighting Rigs
Radiosity
Introduction
Rendering
Baking
Scene Light
Ambient Light
Ambient Occlusion
Exposure
Exposure
Materials
Introduction
Introduction to Shading
Materials Introduction
Usage
Assigning a material
Material Preview
Material Options
Multiple Materials
Properties
Diffuse Shaders
Specular Shaders
Ambient Light Effect
Color Ramps
Raytraced Reflections
Raytraced Transparency
Subsurface Scattering (SSS)
Strands
Node Materials
Material Nodes
Nodes Editor
Node Controls
Nodes usage
Nodes Groups
Material Node Types
- Input Nodes
- Output
- Color
- Vector
- Convertor
- Dynamic
Vertex Paint
Using Vertex Paint
Halos
Halos
Textures
Introduction
Introduction
UV/Image Editor
Common Options
Texture Stack
Texture Types
Texture Types
Procedural Textures
Image Textures
Video Textures
Texture Nodes
- Nodes Editor
- Node Controls
- Nodes usage
- Nodes Groups
-- Textures Input Nodes
-- Textures Output Nodes
-- Textures Color Nodes
-- Textures Patterns Nodes
-- Textures Textures Nodes
-- Textures Convertor Nodes
-- Textures Distort Nodes
Texture Plugins
Texture Painting
Painting the Texture
- Projection Paint
Mapping
Mapping
Environment Maps
UV Unwrapping Explained
- Unwrapping a Mesh
- Managing the UV Layout
- Editing the UV Layout
- Applying an Image
Influence
Influence
- Material
-- Bump and Normal
-- Displacement
- Particles
- World
World and Ambient Effects
World
Introduction
World Background
Ambient Effects
Mist
Stars
Rigging
Introduction
Introduction to Rigging
Armatures
Armature Objects
Panels overview
Bones
Visualization
Structure
Selecting
Editing
- Bones
- Properties
- Sketching
- Templating
Skinning
Introduction
Linking Objects to Bones
Skinning to Objects’ Shapes
Retargeting
Posing
Introduction
Visualization
Editing Poses
Pose Library
Using Constraints
Inverse Kinematics
Constraints
Introduction
Introduction
Constraints Common Interface
Constraints’ Stack
Transform Constraints
Copy Location
Copy Rotation
Copy Scale
Limit Distance
Limit Location
Limit Rotation
Limit Scale
Transformation
Tracking Constraints
Clamp To
IK Solver
Locked Track
Stretch To
Track To
Relationship Constraints
Action
Child Of
Floor
Follow Path
Null
Rigid Body Joint
Script
Shrinkwrap
Animation
Introduction
Introduction
The Timeline
Markers
3D Views
Animation Editors
Animation Editors
Ipo Editor
Ipo Curves and Keyframes
Ipo Datablocks
Ipo Types
Ipo Editor Interface
Editing
- Ipo Curves
- Keyframes
Ipo Drivers
Action Editor
Editing Action Channels
NLA Editor
Editing NLA Strips
Strip Modifiers
Animation Techniques
Introduction
Animating Objects
- Using Constraints
- Moving Objects on a Path
Animating Shapes
- Shape Keys
- Editing Shape Keys
- Animating Shape Keys
- Shape Keys Examples
Indirect Shape Animation
Animating Armatures
- Stride
Animating Lamps
Animating Cameras
Animating Materials
Animating Textures
Animating World
Physical Simulation
Introduction
Introduction
Dynamics
Force Fields
Collisions
Particles
Particles
Types
Physics
- Newtonian
- Keyed
- Boids
Visualization
Controlling Emission, Interaction and Time
Cache & Bake
Hair
Children
Vertex Groups
Particle Mode
Soft Body
Introduction
Exterior Forces
Interior Forces
Collisions
Simple Examples
Combination with Armatures
Combination with Hair Particles
Reference
Cloth
Introduction
Fluids
Fluid
Using the Game Engine
Using the Game Engine
Rendering
Introduction
Introduction
Camera
The Camera
Perspective (Vanishing points)
Depth Of Field
Render
Displaying Renders
Basic Options
Antialiasing (Oversampling)
Rendering Animations
Panoramic
Render Baking
Using the Command Line
Output
Output
Video Output
Effects and Post Processing
Introduction
Render Layers
Render Passes
Edges & Toon
Stamp
Color Management & Exposure
Depth Of Field
Motion Blur
Render Performance
Rendering Performance
Distributed Rendering
External Render Engines
Introduction
YafRay
Compositing with nodes
Composite Nodes
Introduction
Nodes Editor
Node Controls
Nodes usage
Nodes Groups
Composite Node types
Composite Node types
Input Nodes
Output Nodes
Color Nodes
Vector Nodes
Filter Nodes
Convertor Nodes
Matte Nodes
Distortion Nodes
Editing Sequences
Introduction
Introduction
The sequencer
Usage
Sequencer Modes
Sequence Screen Layout
Effects
Built-in Effects
Plugin Effects
Audio
Audio Sequences
Extending Blender
Introduction
Introduction
Python Scripting
Python Scripting in Blender
Setting up Python
The Text Editor
A working example
References
Python Scripts
Script Catalog
Bundled Scripts
Plugins
Blender's Plugins System
Texture plugins specifications
Sequence plugins specifications
Game Engine
Introduction
Introduction
The Logic Editor
Usage
Game Properties
Sensors
Introduction
Sensor Types
Controllers
Introduction
Expressions
Actuators
Introduction
Action
Camera
CD
Constraint
Edit Object
Ipo
2D Filters
Game
Message
Motion
Parent
Property
Random
Scene
Shape Action
Sound
State
Visibility
Cameras
Cameras
Dome Camera
Physics
Physics Engine
Material Physics
Object Types
- Static
- No Collision
- Dynamic
- Rigid Body
- Soft Body
- Occluder
- Sensor
Python API
Bullet physics
VideoTexture
Various resources
List of Features
External resources
Game Engine Basics (BSoD Tutorial)
FAQ