Morphing one polygon into a second polygon

I would like to morph a polygon with six vertices (a comma shape) into a polygon with about 300 vertices (a bird silhouette). Most of the vertices of both polygons have split tangents (in case that matters). Is there a quick way to do this?

If not, the only solution I can think of, at present, is to “insert smart” the number of vertices of the second polygon into the first polygon (the difference, that is), and then inactivate them until the morph keyframe. At that point, re-position all the new vertices to match exactly the original second polygon template. Essentially, animating one polygon, not morphing two. Can anyone think of a better solution?

Search terms “morph”, “interpolation”, “transform”, and “convert” don’t bring up anything relevant in these fora that I can see. I’ve also checked tutorials, FAQs, Tips, and the documentation. There were suggestions of programs to experiment with, in, but I’m dealing with vector-based polygons, not raster images.

It seems reasonably simple (for a computer), so I’m surprised there’s no straightforward tool in Synfig. The tool icon would be something looking like a square morphing into a circle.

Thanks for your consideration, and apologies in advance if I’ve missed something obvious.

Kelly Jones

[Synfig 0.62 on openSUSE 11.2 32bit]

Unfortunately, there currently isn’t a quick way to morph between different shapes. Your workaround of using a single bline while making some of the points inactive is the only viable solution I can think of.

I’ve seen programs like Inkscape do a good job at this kind of morphing, but encoding it into synfig’s data structure and UI might prove to be a challenge. If this workaround produces a proper result, it should be possible to write an action, tool, or valuenode conversion that automatically does all of the dirty work. So, if you manage to get it working, please tell us your method so we can try adding a UI for it. Should the workaround fail to produce the desired result, I’ll try to look into implementing an alternate solution.

Check out the star.sifz in the example folder, especially around the 2 Second point. It does exactly what you’re talking about.


There you go, nikitakit. That shows one single, simple BLine morphing into a star, with vertices inactive until the 2 second point. The star is already forming at the 1 second point. Can the star.sifz be used, or should I complete my short sequence?

It’s part of a film, and I’m currently working with the script writer to refine this short animated sequence. I don’t think he’d mind if I shared the file for Synfig development, especially since Synfig is being used for free to assist in making the film (as are my efforts). But I’d better ask first.

Thanks very much for considering the problem. I’m not a developer, so I imagine it’ll take some time to write the fix.


Also thanks, pixelgeek, about mentioning the examples. I overlooked them.

I’ve asked the script-writer about sharing the .sifz to help develop Synfig further. He’s fine with it. So, if you’d like the file as well, I’ll get onto it tonight.

Also, I’ll see if I can rustle up a donation. Probably won’t be much, but will do my best. Thanks for the help.

[edit: 7/10/10. Donated USD$20.00 to “Synfig Studio organizers” ( / Carlos López González). The Australia / United States conversion rate is almost 1:1 at the moment.]

[edit # 2: 7/10/10. File: Tao-Bird_3.sifz (15.6 KB) N.B. The design is copyright, as it’s for a film under construction. But happy to share the work to help create a new morph tool… ]

Nicely done!


But it’s not a pure morph like in star.sifz — so I’m not sure if you (whoever is interested in helping to develop the tool) can use it. A pure morph would be all the vertices moving simultaneously at the same rate of change, and same distance-ratio. But in TaoBird_3.sifz, chunks of vertices are shifted, including several different waypoints. It was the simplest way, but not the most artistic or pure.

But I did this because the script-writer asked for a time-based morph, that is slow at the beginning, then speeds up. So, I couldn’t just move all the vertices together at one go, because I’d have no way of controlling that rate of change. What I plan to do this evening is create a new version, where all the verticles are simultaneously shifted into “interstices” (temporary abodes along the way to the final point). So there will be probably four or five waypoints to deal with the increasing morph speed.

Maybe that file would be more useful? I’ll upload it anon.

edit 9/10/10: Tao-Bird_5.sifz (71.7 KB) — That’s the “simultaneous-vertices-morph, time-based” animation. What do you think, nikitakit and pixelgeek?

Let me know if I can do anything else to help the process along, and I’ll do my best.

Whoa! I get 5 days of vacations and we get a donation!!! Thanks Kelly Jones! :slight_smile:
The morphing you’ve achieved is the classic way to do and the straight approaching to this kind of problem. For my taste is it very well done. Good job.
Anyway you ask for a “time-based controlled morphing” where you control the speed of the morphing completely. The first approaching (keyframe based) needs to control all the points “by eye” to move them all in the desired speed. That’s very time consuming and probably when your client ask for a small time change for some points and not for others the workflow becomes a problems.
Luckily you have another way to control the point movement: Link to Bline.
In Synfig it is possible to link a vertex to a bline and make it move along the bline by controlling a [0,1] real number.
So the idea is:

  1. Reuse the same file than the last version
  2. Delete all the intermediate kayframes and just keep the initial and the end keyframes where the morphing is being produced.
  3. Draw one bline per vertex form the origin position to the end position, trying to use only two points in the draw bline.
  4. Link each vertex to the corresponding bline so it can be just drag to match the initial shape or the final shape of the morph.
  5. Then for each point in the shape, export one of them and link the rest of the amount parameters of the Link to Bline convert type (for the tangent and the vertex)
  6. In the initial morph keyframe, move the exported amount to be 0 and for the final keyframe move it to be 1. All in animation mode)
  7. For each point that is out of sync for the client taste, disconnect the amount parameter and manually make it move faster or slower.

With the link to Bline feature you forget the problems of the position of each point and its time because it is governed by the bline that joins the start and end of the morph. Just concentrate on the timing when needed.

See this:
It has a similar approaching for another problem.

Very welcome. It’s well worth the investment.

Thanks, I guess it works on a basic level. But the morph is not continuous and smooth, although that may be more a problem with the shapes being morphed and their placement in relation to each other.

I’m very glad you provided that link. Thank you very much. The instructions in your reply aren’t easy to understand, but the link gives very clear instructions, and looks like exactly what I’m looking for. I’ll give it a go tonight and see where it takes me. Will report back.


I’ve finally found time to get back into this morphing venture, and now Synfig keeps crashing. It recurs at the identical same place in the process of linking a vertex to a BLine. What’s going on? I’m at a really early stage of following the instructions, Genete, as follows:

  • Click on the polygon, CTRL click the Bline in the layers panel, click on the vertex of the polygon with tangents shown to highlight it, then rightclick on the Bline (the part of the line nearest to the Bline vertex, which is nearest to the polygon vertex already clicked) and the program dies.

I haven’t gotten far enough yet to see whether this technique is workable.

Can you provide the sample file that crashes and repeat the crash procedure with a detailed recipe including the index of the selected vertex and the name of the layers involved?

The vertex is at X: -186, Y: -60 of the bottom layer “Tri Region”, and the Bline it is being linked with is in the second layer “BLine 1 Outline”. Steps to repeat the crash:

Click on Tri Region in layer panel.
CTRL click on Bline 1 Outline layer to add it to the selection.
Click in the drawing window on the vertex in question, that is, the middle duck showing tangents to either side.
Right click on the Bline 1 Outline line, between ducks (so as to choose Link to BLine).
CRASH [N.B. the first vertex was linked, at index -148, 22; this is the second vertex, and this time it keeps crashing]
Crash occurs before the drop-down menu appears with the link to Bline option.

MorphTest.sifz (1.39 KB)

I can’t reproduce it. Attached is the file after link to bline the bottom left vertex of the triangle shape.
Please report OS, Synfig version and whether it has any message after crash.
MorphTest-linked.sifz (1.42 KB)

OS: [Synfig 0.62 on openSUSE 11.2 32bit] (As in OP). There was no message after crash.

But it’s working for me, too, now. I don’t know what was going on.

Sorry for my ignorance, but I don’t understand the section in boldened text below:

I can see the Amount parameters, but what do you mean by “connect them”? There are two menu options in the Params tab for the Amount sub-parameters of vertex 002 or 003 when I right-click on either: “Convert”, and “Export”. Neither is Connect. By “selecting all the other…” do you mean to select them in the Params panel with a click then CTRL click?

Thanks again in advance for your reply, Genete.

I just worked it out. You left out a step. It should read

Partly your instructions are written assuming people know those steps. Anyway, I’ll press on.

Stuck again, on the hardest bit: the tangent section. After changing the Amount sub-parameter of the tangents to 0 (at 0f), the tangents disappear and the vertex cannot be selected (the step I missed in the last post). So the “Connect” option doesn’t appear in the Amount sub-parameter of the tangents (the right-click’s drop-down list). What am I missing here?

Sorry again for my ignorance, Genete.

Probably I did an incomplete/wrong explanation. This thechnique is “advanced” and there are lots of previous stuff to understand before board it. Can you please send me the file and tell me what’s the tangent with the problem?

In the following file the tangent in question is with the vertex at index: X:-98, Y:-66. The tangents have disappeared on it, so I cannot select the tangent before connecting its Amount sub-parameter to the previous vertex’s tangent 1 at index: -188, -57.

MorphTest.sifz (2.25 KB)

I’m interested in that morphing animation method.

The problem could be described as:

Given two differerent shapes, which have been drawn before, give to one the shape of the other.

It’s like the star.sifz example.

But I can’t understand how is done.

I see that one shape is exported and somehow conected to a region. But when I try, the first shape is converted to the second, but it lost its original form. It converts in a duplicate of the second.
So, how can I get that ,

  • at the initial time, the first shape have its inital form,
  • and the end time, it has the form of the second shape.

I 'm using the last dev version 0.65 released this March.