animated svg or swf output support

Hi synfig devs!

Gotta say that I’m greatly impressed by synfig. It seems a lot of people on this board seem to have some reason why they were scared of trying synfig for one reason or another and in my case it was… blender! Yeah I know the only link is they’re both GPL animation tools but all the keyboard shortcuts and odd quirks involved in getting to grips with blender made me think synfig was going to be almost as tough but thankfully its not the case. I haven’t tried my hand at 2D animation since the days of Deluxe Paint III/IV on the Amiga and now synfig has got me excited about it again.

I see that one of the most requested features (just after sound support) of synfig is svg import. I can definitely see the advantage of that feature and I’d like to see both those added too but for me the #1 missing feature in synfig is swf or animated SVG export. Once synfig can do that it will be a much more powerful/ useful tool for web content creation and suddenly Linux will have a (less powerful maybe) alternative to Flash but a working, free one none the less.

Would it be easier to implement swf or animated SVG export and has any work been done on either yet?

I’m going to go through some of the tutorials now and try to get a better grip of synfig.

Keep up the great work!

Hello danbold!

I am no developer, but i think it would be much easier to implement swf than animated svg as output. I don’t know, if it is even possible at all, to get the functionality of synfig into a svg-file, without breaking the standard of svg. swf is just better suted as output format for vector and bitmap content. I agree, that synfig really needs svg-import, because it is the new standard in vector.

Nothing has been done, to implement swf or svg-export into synfig. There are not enough developers to do that, because this step is quite big. If you know some developers who know c++, GTK+ and svg you should send them here. :smiley:

SVG import is almost there thanks to akagogo.

You could render a series of image files and then use ffmpeg to convert them into an swf file.

Hi Pixelgeek!

Good to hear SVG import is almost here!

As for using ffmpeg to make a swf, I don’t think thats what I want, not unless ffmpeg can construct VECTOR swf files from say a bunch of SVG files. As I understand it, swf files can contain video and/or vector animations so I presume that ffmpeg can only produce video, not vector, swfs.

Video swf export is of no interest to me, might as well use mpg or avi (or .ogg) for that- I want vector swf output from synfig so that we can produce compact animations that can be played under a web browser and consume mimimal disk space/ bandwidth- comparable to the size of the original .sif.

Yes - video swf was what I was referring to. I don’t know of anyone that is thinking of tackling the job of vector SWF export.

Question:

ive searched and searched the site to see if synfig can export any vector format, (mainly SVG) ive managed to find out that there is an external tool that can convert svg -> sif, but can it do the reverse sif -> svg, NOT ANIMATED just a single frame or all frames as seperate svg files.

its possible to convert svg to swf? so if synfig/or the external converter, could export multiple svg’s they could be turned into an animated swf. with a MUCH MUCH lower file size than exporting multiple png’s.

concluion

wll the svg -> sif converter support sif -> svg??

I’m not sure you would gain very much compared to video export with this since every frame would be a new and separate vector image while a flash movie manipulates the same shape over time (as synfig does internally).
My guess would be that to effectively create flash-movies you would need a flash exporter for synfig.

As Rylleman implies, there is no svg to swf converters in development. Any swf creation would be done via raster based conversion (png -> flv).

Chris

forget about exporting into swf.
why would you put an animation made on an open source format into a proprietary material like FLASH:( on purpose?!?! O_o

SVGs can animate and play in any web browser just as they are.

NOW if only synfig could export directly as svg animation. That would change everything.

i heard this ‘ming’ library can do the work, still i don’t know at what point this library can construct a SWF, most of the flash exporter in programs like Pencil or KTooN only export a SWF containing raster versions of the animation, i mean that every frame contain a JPG/PNG/BTM image and not a vectorized version of the original draw. HTML5 had some support for animations with vectorized graphics, but i’m not familiar with HTML since 3.0. Synfig has some capabilities that an actual SVG would not contain like weight control in the ducks/nodes advanced masking (mask to alpha, opacity, etc) and so and the result of an exported SVG would be different from your actual work on the program, Inkscape can replace a line with a custom shape and you can use it for simulate ink drawing, but nothing like control the line weight like in Synfig. still i have to agree that something needs to be done, Synfig animations are too great for keeping them only as video/gif files, even if it still lacks of interaction with user.

Wow. That would be awesome!!!

I hate animated GIFs. I know still SVGs can be concatenated into a single animated SVG. That being the case, synfig could do this could it not?

On the other hand I wonder if there is something out there that can trace a series of JPG or PNG stills and convert them into SVG format.

Once traced into SVG they could then be concatenated into a single animated SVG

Aww come on somebody. There are tons of people searching to make this possible.

The only reason I started learning synfig is because I found this

synfig.org/wiki/Sif2svg

And thought I could turn my animations into animated SVGs

HTML5 canvas is slow and renders bitmaps so I wanna use SVG.

I have seen animated SVGs that people have concatenated by hand using various scripts and output from blender animations but … I really thought that synfig could do this O_O after reading that wiki…

potrace and autotrace have the ability to take raster images and convert them to svg. I believe Inkscape may include this functionality too.
viewtopic.php?f=4&t=11

I found something that may be useful.
libming.org/

Ming is a python library which generates SWF from… well anything. It is possible to develop a rendering module to export to SWF by including this library in the Synfig packages? The export could also have the “batch autotrace” checkbox option (only to those who prefer it) to vectorize/trace every frame to vector within a packed SWF file.

I’m new around here, but i confess i could not agree more with hoshi441!!!

This was exactly what i was looking for!!!

I became interested in this feature after reading this two articles:

9to5mac.com/15830/Flash-CS5- … ML5-Canvas

webmonkey.com/2010/10/export … -to-html5/

If synfig could do such thing, as hoshi441 says: “That would change everything.”

(of course this would probably require, later on the road, the inclusion of a programing language - probably JS - in Synfig, but it would for sure change everything)

I while back I looked into solutions for swf or svg export, so I thought I’d share my thoughts.

For static image export, including SVG, the best option would honestly be to rewrite the renderer using Cairo. Cairo can output images to various targets, among them screen-rendering, png, svg, and pdf.

At the moment, the rendering engine plans are to build upon the old OpenGL renderer. I don’t actually know if anyone is working on it. The branch is very much out of date, and I personally can’t help out because I can’t get it to run (it might even be that my graphics card doesn’t support the necessary features). I would advocate Cairo as a better option because it’s designed for 2D graphics and already used heavily by Gtk and Inkscape. However, I’d hate to throw away good work by other people, so if someone plans to resurrect the OpenGL branch I’ll be fine with that as well.

For SWF export, I would actually recommend swftools’ swfc application rather than libming. I noticed how Pencil uses libming for swf export, and there are algorithms about something like approximating bezier curves because flash only supports quadratic curves. On the other hand, swfc can paths in SVG format and appears much easier to understand. You can look at the SWFC manual for a description of the swfc format.

For HTML5-compatible animation, I can’t give any good analysis because there are numerous ways to make animations. IIRC, the available options are: SVG animation, SVG with SMIL animation, SVG using javascript for animation, and HTML5 canvas with javascript. So even thinking about “HTML5 animation” will first require researching all of these formats, and seeing what other animation-authoring programs are choosing.

XDDD WebM export, anyone?

Isn’t that just a video format (no vectors)?

Yeah, but that’s also the best video format to be played on HTML5. Hey, Youtube’s doin it!

But I like Nikitakit’s idea. If it isn’t possible to export vectors then if somehow we could batch-trace them it would be awesome. Regardless there have been opensource libraries to help pack files into SWF.

I think that is not such a good idea…
First synfig files is already vectors (if not working with imported images), exporting these to bitmaps, then trace these back into vectors is just dumb. The resulting shapes will be far from optimized. To get proper shaper with tracing tools you need very high settings which also makes for large file sizes, then you can just as well go with movies to start with.
Second the shapes will not stay true to your original artwork, even if the settings is very high there will be differences.
Third, what makes flash vector format so good and usable for web is that the shapes is altered through time, it’s animated at playback, thus keeping file size very low. If tracing images it would still be a series of images, but vector images stacked up rather than bitmaps in a movie file.

If it can’t be done properly, as animated svg or flash swf files I think it’s not worth putting time and effort in. The result will be far from optimum and not very useful. But it is your time, do what you want with it. :wink:

No, Rylleman, you’re quite right. Working with vectors, exporting to bitmap and retracing them indeed is quite dumb which is why I was thinking of resolving this by working with both Synfig and Flash to begin with, i.e. Synfig to animate while Flash to composite. Then again you’re right about the filesize, though that could be compressed by 25% if we convert all traced vectors to “shape” in one layer, thereby making it somehow morph without making the output weird. The traced output, and what we make in Synfig, should be flat for this to work, and all the gradients and lights to be applied in Flash. Once again this is a tedious process but it’s all we’ve got currently.

Another alternative would be to actually be able to export the animation from Synfig to Silverlight instead. There have been libraries to do that, if I’m not mistaken, and they’re written in C++/C# (I think). But it would still be neat to have WebM export (although no worries, because there is a converter in Ubuntu which is capable of converting any video to WebM for playback; yet again it’s not necessary because Youtube already does it for free LOL).