Spline Tool Synfig



Select the Spline tool. Under the Tool options in Layer Type, Create a region layer option must be selected. Draw a triangle on the canvas: Draw a right-angled triangle covering half of the canvas as shown. Right-click on the first node. Right-click and hold on the first node. The context menu opens. Click on Loop Spline. Synfig version & platform: Master Linux Issue description: Spline Tool doesn't close outlines correctly: Select the Spline Tool. Create a shape without dragging. Try to close the shape.

Spline tool for carb adjustment

The spline tool is Synfig’s basic bezier curve tool. I’m assuming you already know how to use a pen tool or bezier curve tool. If you don’t, take some time and practice drawing and making shapes with this tool. The basic drawing process using the spline tool is straightforward. It works much like the pen tools in other software. Spine, DragonBones Pro, and Spriter are probably your best bets out of the 14 options considered. 'Simplified UI allows for an easy learning curve' is the primary reason people pick Spine over the competition. This page is powered by a knowledgeable community that helps you make an informed decision.

Language:

English • čeština • Deutsch • español • français • русский

Spline Tool Synfig


Note: There is also a slightly out-of-date tutorial on this topic at Tracking Curves. It contains some info, particularly about link/export, which hasn't yet been added to this new tutorial. There is also another very out-of-date tutorial for synfig 0.61.08.
  • 3Tutorial

Introduction

This tutorial will demonstrate how to make an object follow the path of an arbitrary curve, rotating to face the direction of travel.

Summary

Spline Tool Synfig Software

We're going to:

Spline Tool Synfig Free

  • Link the arrow's Origin and Rotation to the Spline so that the arrow follows the curve

Tutorial

The tutorial is intended to provide a demonstration on how to use this feature.

Tool


Create the Animation

  • Create a new animation by selecting from the menu 'File → New'.

Spline Tool Synfig


Create the Layers

First step, let's draw the Spline:

  1. Select the Spline Tool from the Toolbox:
  2. In the Tool Options Panel, enable only the Outline Layer type.
  3. Draw a Spline that you want the arrow to move along.
  4. Click the 'Make Spline' icon in the bottom left of the Tool Options Panel to create the Spline.


Second step, let's draw the arrow:

  1. Select the Spline Tool, this time enabling 'Create Outline' and 'Create Region' Layer types:
  2. Draw an arrow (or any another arbitrary shape) pointing to the right side of the Canvas.
  3. Switch to the Transform Tool and select the Outline, press CtrlA to select all its handles except the green position handle.
  4. Drag the handles so that the arrow is centered around the green position handle.
  5. Add a Rotate Layer above the Outline and Region Layers.
  6. Group the Rotate, Outline, and Region Layers. At this point there are 2 top-level Layers:
    1. an Outline Layer
    2. a Group Layer containing the arrow and the Rotate Layer


Make the Arrow Move and Rotate

  1. Select the Group Layer by selecting it in the Layers Panel.
  2. Then:
    1. select its green origin position handle by clicking on it in the Canvas window
    2. while holding Ctrl select the Rotate Layer in the Layers Panel
    3. while holding Ctrl select its blue rotation handle in the Canvas window
    At this point, there are 2 Layers selected and one handle from each of those 2 Layers selected.
  3. Now, while holding Ctrl select also the curved Spline Layer (it should be the last Layer in the Layer Panel's list).
  4. Right-click on the dotted line that indicates the position of the curved Spline, not on any handle, but on the dotted line between handles.
  5. From the context menu that pops up, select 'Link to Spline':
    The arrow Group should move so that its green position handle is on the Spline, and it should rotate so that the arrow points along the spline at that point.
  6. Select just the Group Layer, and drag its green handle around. The handle is now constrained to the Spline and dragging it will also affect the rotation of the arrow.
    We can now animate the arrow.
  7. Turn on Animate Editing Mode by clicking the icon in the bottom right of the Canvas window:
    1. at time 0f, drag the Group Layer's green position handle to one end of the Spline
    2. at time 5s, drag the same position handle to the other end of the Spline
  8. Try 'File → Preview' to watch the animation.


Spline tool synfig pro

Results

This is the animation I ended up with:

Synfig project: Arrow-follows-bline.sifz‎


Controlling the linear velocity

By default, the arrow travels the whole spline with a constant velocity, independently of the Spline structure.

If you select the Group Layer and look at the Parameters Panel, you'll see that its Origin parameter is converted to 'Spline Vertex' type. This is done automatically when 'Link to Spline' is executed.

You can disable the 'Homogenous' subparameter and then the speed of the arrow will depend on the Spline structure, it will take the same time to move along each segment of the Spline. So if there's a long straight segment then a bendy complex part, the arrow will move much faster along the straight segments (since there will be less vertices in that part). In physics terms, the linear velocity (that is, the speed over the Spline) is not constant.

For illustration of the 'Homogenous' effect see this demo.


See also

  • Discussion on the forum: Following a spline: Serious problem and frustration
  • Link to Spline command: Command:Link_to_Spline
  • A video tutorial showing the steps of this page.


Language:

English • čeština • Deutsch • español • français • русский

Retrieved from 'https://wiki.synfig.org/index.php?title=Doc:Following_a_Spline&oldid=23401'