My name is Richard, I’ve recently become interested in synfig for making animated diagrams for engineering/science applications. I’ve messed around with the synfig studio examples the last day or so and it looks great for my needs.
However, I’m trying to lock down a nice scripted workflow and I’m finding it a little difficult to get the information I need. So I thought I’d ask you guys how best to go about it. By the way, I have reasonable linux (Debian/Ubuntu) and inkscape experience.
In essence I’d like to:
(1) Create a starting keyframe image in inkscape (e.g. a triangle of arrows representing forces)
(2) Create a final keyframe image in inkscape (e.g. a force vector triangle with it’s angles and vector lengths modified)
(3) Create a video of specified frame rate, resolution and duration that blends between images 1 and 2
However, I really, really want to do step 3 by a bash script so that I can easily reproduce this process a bunch of times. Can anyone help me with this?
I think that Synfig is perfectly suited to perform that animation without need to use a script.
First you should try to export your work from Inkscape to Synfig using the 0.49 Inkscape version that includes a script to save SVG to sif (Synfig) files.
Then, once you have imported to Synfig Studio the start and end shapes of the animation you have to morph one of them (in animation mode) to convert it to the other shape (that you’ll take as reference meanwhile morphing the other)
Depending on the complexity of the shapes, doing it by an script would be much more complex or maybe impossible.
Once you’ve learned to perform the animation manually, maybe you can parametrize it and use a python plugin to modify the original animation several times to obtain different results. Since recently release 0.64.0 version, you can run external pyhton scripts directly form the application menu.
-G
Thank you for the fast reply!
Ok, I’ll see how I go with the gui… it does look promising.
I was hoping for something like:
make a lst file, then run synfig with a bunch of arguments and it’s done.
The reason is I’ll be giving it to other people and I want to make the process as fast and stupid-proof as possible… gui’s tend to invite the opportunity for human error.
I’ve come back to trying to get my animations working in synfig; however, I’m still running into troubles.
I’m having real difficulty getting the output from inkscape to be read in correctly by synfig. In particular it seems arrowheads are not read in, dashed lines are not reproduced and text seems to be missing quite often.
Attached is an example inkscape svg file - I would like to simply read in this file, and make the blue circle move up to the QL position, changing color along the way, and then move back down to it’s starting position (QU). It seems moving the circle is easy, but I do need the text, line styles and arrowheads.
I’ve tried exporting sif and plain svg from inkscape, and both fail with slight variations on the layer groupings and what is not read.
Could you give me any directions on this? Do you know if there are any inkscape or synfig settings I should change to enable this functionality?
p.s. I am using Inkscape 0.48.3.1 r9886 (Jan 29 2013) and Synfig 0.64.0 on Ubuntu 12.10
p.p.s. In an ideal world I’d love to output the animation frames from synfig in eps+latex since latex is SO much better for equations. Any chance of that?
Great success! Thank you so much, sometimes little directions make all the difference.
Text, arrowheads and line styles now working and animating.
For other new users, useful inkscape tools include:
extensions>modify path>color markers to match stroke //this will make arrowheads the same color as your line
path>stroke to path //this converts lines and their arrowheads etc to paths that synfig can use.
path>object to path //similar to the above, but for objects.
Also, for those who have used inkscape for technical diagrams, you may not have required layers before - but obviously now is the time to use them because they’ll be retained when saving to .sif from inkscape. This will then make animating an easier task.
However, I do have another problem that I can’t seem to solve easily… in my diagrams a line with an arrowhead represents a vector (e.g. a velocity or force). Now, I need to change the length and angle of a vector over time. However, as a result of converting strokes to paths, the arrowheads are separate to the lines - this causes a problem when trying to animate them since I can’t just reposition the end of the vector.
Is there an easy way of regrouping the line and arrowhead and keeping their relationship?
Thank you again for your help, once I’ve got this working I’m happy to make a demonstration video to help others struggling with the same issues.
Sorry, that was probably a bit ambiguous. Let me reword the problem slightly…
I can put a line + arrowhead (a vector) in a layer in inkscape. In synfig I can rotate the entire vector by obviously using a rotate layer. The first issue with this is what looks like pixelation of the line and arrowhead as it is rotated. What is this, and how do I fix it?
The other difficulty is I also need to change the length of the vector. The length needs to be changed while keeping the arrowhead and line the same size and thickness, with the arrowhead located at the end of the line. I can select the handles for the arrowhead and the end of the line, and I can translate them - but I have to be very careful to move the mouse in the same direction as the line otherwise the line and arrowhead will no longer be in alignment… surely there is a better way of doing this?
That won’t happen on final render time. Just ignore it during edition.
You have some alternatives:
Draw your vector and don’t animate the position of it directly, but indirectly using a translate layer and one rotate layer inside the group on top of the arrow. Then when you need to animate the length of the vector just disable the rotate and maybe the translate and then modify the arrow head keeping the straight line by pressing shift key meanwhile.
Same as above but using the grid and snap to grid.
Do it using value nodes. It is more complicated for newbie but it is very powerful. Create your arrow and link the origin of the head and the tip of the stick to a converted value node that depends on the length of a circle. Then to modify the length just animate the circle’s radius.
I’m attaching the value node solution I proposed (Select the circle and modify it in animation mode). Is that what you wanted?