3D Curve

You can use 3D curves to create motion paths.

You can also use 3D curves to display 3D shapes like strips, tubes and quads by modifying the curve’s rendering mode.


What is a Curve?

A 3D curve is a spline described in 3D space by a set of points called control points. A smooth approximation of the curve is then built by interpolating the control points of the curve (e.g. Hermite interpolation).

Control Point

A control point is a point in 3D space used to design a 3D curve. The position and tangent of each control point is then used for spline interpolation.

Control points will allow you to control the shape of the curve by tweaking the different control point parameters (like tangent and position).

Motion Paths/Animations

A motion path is a path to be followed by an animated object. 3D curves can be used to define smooth motion paths by using VSL methods and Building Blocks (used to retrieve information regarding the position and orientation of a point on the curve).

3D Shapes

3D curves can also be used to design and display smooth meshes that are hard to build manually. The 3D shape can be specified from the 3D curve render properties (see below for more information).

back to top

Creating a 3D Curve

3D curves are created from 3D curve presets:

⇒ Drag and drop a “3D Curve” preset from the Libraries > Presets > 3D category to the 3D View.

This action creates an empty 3D curve (i.e. no control points), represented in the 3D View by a purple, automatically generated curve:

The curve is also visible in the Project Editor:

The curve you see now is only an authoring element (cannot and will not be rendered at runtime) and is exclusively intended to hold the 3D curve’s structure (i.e. its control points, which you will be adding next) as well as the global curve parameters such as the curve’s position and rendering mode (described below).

With the new curve still selected, you can start adding/creating control points to the 3D curve:

⇒ Click on the blue grid with the left mouse button to create a point in space. The resulting point will be automatically added to the curve as a new control point.

⇒ Click on the grid with the right mouse button to terminate creation.

Note: the blue grid is a 2D plane defined by the current orientation of the authoring view plane, centered on the last created control point (or the empty curve’s pivot if non has been created yet). This grid will help you locate the new control point creation position. You can use the 3D navigation controls (ALT + middle mouse button) to orientate the authoring view along the xy, xz and yz planes. The grid will turn blue, green and red according to the axis plane.

Warning: the grid will not be available when trying to add a new control point too far from the last created control point.

Each new control point is added to the 3D curve entity as a child node, as shown below for a 3D curve with three control points, as viewed in the 3D View and in the Project Editor:

Visibility: the green curve you see in the 3D View results from the Hermite interpolation of the different control points. This curve is used for authoring only, to show you the result of interpolation, and will not be rendered as such (visible at runtime) unless you modify the 3D curve rendering parameters (explained below). Recall that the purple curve is simply used to indicate the global 3D curve’s properties (such as the curve’s position or pivot) during authoring.

back to top

Editing the 3D Curve

Selecting a 3D curve will allow you to edit the 3D curve parameters (such as rendering mode and position), add new control points to the curve using the 3D curve toolbar, and edit the control points of the curve individually (such as their position and tangent vectors).

3D Curve Parameters

The Property View will allow you to edit global curve properties.

⇒ Select the curve to edit and open the Property View.

⇒ Scroll down the Property View until you see the “Curve” category.

The “Curve” category displays the different global curve properties:

  • Closed: property used to close the curve by creating a line segment between the first and last connection points of the curve.
  • Rendering Mode: choose the rendering mode of the curve:
    • NoDisplay (default): the curve (i.e. the result from interpolation) will not be rendered at runtime.
    • Line: if selected, the curve will be visible as a line both in authoring and in play mode.
    • Plane: mode used to build horizontal quads (in local space) along the curve (useful for paths and roads).
    • Cross: used to generate both vertical and horizontal quads (in local space) along the curve.
    • Tube: if chosen, a closed 3D cylinder is tessellated along the curve.
  • Rendering Width: sets the width of the geometry generated along the curve (for rendering modes other than NoDisplay).
  • Tesselation Level: defines the number of line segments between two control points. The tesselation level will allow you to modify the visual quality and smoothness of a 3D curve.
    Note: the tesselation level might have an impact on performance.
  • Control Points: gives access to the array of control points defining the curve.
    Click on the “Edit” button to access this array. See “Control point parameters” below for more information.

back to topWhen a 3D curve is selected, the Curve3D Toolbar is automatically activated.

The Curve3D Toolbar will allow you to add new control points to the curve, and edit the position and tangent of individual control points.

The 3D curve toolbar is located, by default, next to the 3D View Toolbar, in the toolbar’s placeholder (below the application’s Menu bar). You can also access the Curve3D Toolbar from the Menu bar > Views menu > Toolbar menu > Curve3D Toolbar command.

Note: the Curve3D Toolbar is active if and only if a 3D curve is selected. If no 3D curve is selected, the Curve3D Toolbar buttons will not be available.

Add Control Point (curve edition mode)

This button will allow you to add new control points to the curve, starting at the last added control point.

It is automatically activated when a 3D curve is selected. Once activated, the button will turn yellow: .

⇒ Use the blue, green and red grids to help you position the new control points in space.

Right-click anywhere on the 3D View to terminate edition and enter “Edit Control Point” mode (displayed below).

Edit Curve (control point edition mode)

This button will allow you to edit the position of control points individually (as opposed to the global position of the curve). Once activated, the button will turn yellow: .

⇒ To edit a control point, select the control point to edit and use the 3D View handles to change its position and orientation.

⇒ Use  the delete button to delete the control point being edited.

Edit Tangents (control point tangents)

The edit tangents button will allow you to edit the in/out tangents of each control point. Once activated, the button will turn yellow: .

Tangents are displayed as a line with two handles and three controls:

⇒ Use the two controls at the extremes to change the size and orientation of the tangent vector.

⇒ Click in the middle control to make the two tangents independent. You will then be able to orient tangent in and tangent out independently.
Click again in the middle control to link the two tangents. Note: if the tangents are broken (cannot be linked) the middle control will appear red.

Tangents will allow you to modify the curvature around the selected control point and thus influence the curve’s shape.

back to top

Control Point Parameters

The curve’s control points are essentially points in 3D space used for interpolation to generate the curve.

Control point properties influence the shape of the curve between two points and between neighboring points, so special attention needs to be addressed.

You can edit the position and tangent properties of each control point using the Curve3D Toolbar (“Edit Curve” and “Edit Tangent” buttons) or by expanding the “Control Points” parameters in the Property View:

  • Select the 3D curve.
  • In the Property View, scroll down to the “Curve” category.
  • Click on the “+” button next to the “Control Points” parameters to access the curve’s control points.
  • Click on the “+” button next to a control point to access the control point’s parameters.

Available parameters are:

  • Position: the position of the control point in 3D space.
  • Tangent in/out: tangent vectors to use for spline interpolation.

You can also access the curve’s control points, for selection, from the Project Editor:

  • In the Project Editor, expand the 3D curve’s nodes.
  • Select a control point.
  • Edit Curve mode will be activated, allowing you to modify in the 3D View the position and orientation of the selected control point.

Note: control points are only visible during authoring.

back to top

See also

  • Curve building blocks
  • Control Point building blocks

Building blocks and VSL methods will allow you to modify 3D curve properties at runtime, such as add/delete control points, define position and tangent of control points, modify the position of a curve in space, and so on.

VSL methods are available from the Types library > 3D > Scene Graph > vkCurve3D class.

back to top

Curve3D Toolbar (Add & Edit control points)