Hi again,
It's the guy who wants to use Inkscape to do animation again...
I just did a simple ball-bounce test animation. I used layers for onion-skinning and output a series of pngs, which were then assembled into an avi in a separate program called Monkey Jam. The curious can see the animation at my sketch blog:
http://www.sketch.mattjordan.com/2006/06/05/inkscape-animation-test/
I'm actually pretty excited about the possibility of using Inkscape to do more-or-less traditional, cel style animation. One tedious bit, though, is the outputting of the individual png frames. Would it be possible to write a script or a plug-in that would do that as a batch? So, you'd have background layer plus layer 1 output as 000000.png, background plus layer 2 as 000001.png, and so on? If so, where would I go to learn how to write such a script or plug-in?
Oh, and I'm still on Windows XP for now, in case that affects your answer.
Thanks,
Matt Jordan
Matt Jordan wrote:
I'm actually pretty excited about the possibility of using Inkscape to do more-or-less traditional, cel style animation. One tedious bit, though, is the outputting of the individual png frames. Would it be possible to write a script or a plug-in that would do that as a batch? So, you'd have background layer plus layer 1 output as 000000.png, background plus layer 2 as 000001.png, and so on? If so, where would I go to learn how to write such a script or plug-in?
If you know python I'd head right over to the gimp_xcf.py script located in inkscape/share/extensions for an example. This particular script only functions on linux because of the way it uses the gimp cli, but the png export portion should work fine in windows. If you don't do python, what language do you want to use? Catch me on Jabber sometime if you have any questions.
Aaron Spike
I'm actually pretty excited about the possibility of using Inkscape to do more-or-less traditional, cel style animation. One tedious bit, though, is the outputting of the individual png frames. Would it be possible to write a script or a plug-in that would do that as a batch? So, you'd have background layer plus layer 1 output as 000000.png, background plus layer 2 as 000001.png, and so on? If so, where would I go to learn how to write such a script or plug-in?
If you know python I'd head right over to the gimp_xcf.py script located in inkscape/share/extensions for an example. This particular script only functions on linux because of the way it uses the gimp cli,
I'd be surprised if the working only on linux issue could not be resolved if someone had the time and interest to look into it more closely.
It is a shame XCF was never standardised but the gimp developers do discourage other programs from implementing XCF so Inkscape should probably take that advice and "deprecate" it. If you could export to a/the defacto standard format like PSD it would offer plenty more options when it comes to software for animating those layers.
If you are willing to run linux to get the XCF export working then you could use the gimp animation package to create an animation from the XCF file and there might be some good integration possibilities there which could really streamline the workflow.
but the png export portion should work fine in windows. If you don't do python, what language do you want to use?
The python extensions are working in 0.44 pre 2 so it would make sense to use python.
Alan Horkan wrote:
I'm actually pretty excited about the possibility of using Inkscape to do more-or-less traditional, cel style animation. One tedious bit, though, is the outputting of the individual png frames. Would it be possible to write a script or a plug-in that would do that as a batch? So, you'd have background layer plus layer 1 output as 000000.png, background plus layer 2 as 000001.png, and so on? If so, where would I go to learn how to write such a script or plug-in?
If you know python I'd head right over to the gimp_xcf.py script located in inkscape/share/extensions for an example. This particular script only functions on linux because of the way it uses the gimp cli,
I'd be surprised if the working only on linux issue could not be resolved if someone had the time and interest to look into it more closely.
It is a shame XCF was never standardised but the gimp developers do discourage other programs from implementing XCF so Inkscape should probably take that advice and "deprecate" it. If you could export to a/the defacto standard format like PSD it would offer plenty more options when it comes to software for animating those layers.
I can't help but feel a little annoyed at the suggestion that we deprecate this feature. You didn't do your research. Gimp will begin shipping a useful cli executable in future versions; the script will work well on windows then with slight modifications. The extension USES GIMP to create the XCF (thus the requirement for a cli version of Gimp) and so does not violate the wishes of the Gimp developers, who seemed quite happy to assist me in writing the script-fu to make it work. Lastly, the script was written as an experiment to smooth workflow between Gimp and Inkscape. XCF is the appropriate format for this task not PSD.
but the png export portion should work fine in windows. If you don't do python, what language do you want to use?
The python extensions are working in 0.44 pre 2 so it would make sense to use python.
Extensions can use any language, so it makes sense to use the language you are most comfortable in.
Aaron Spike
sorry for the late response, busy doing other things but now that I have a chance I have to clarify what I said.
On Mon, 5 Jun 2006, Aaron Spike wrote:
probably take that advice and "deprecate" it. If you could export to a/the defacto standard format like PSD it would offer plenty more options when it comes to software for animating those layers.
I can't help but feel a little annoyed at the suggestion that we deprecate this feature.
XCF is a format only one program understands well and others are discouraged from using it although a few others do understand it. I dislike vendor lockin irrespective of the vendor and the lack of open standards undermines the value open source or free software might have. The feature is good but a more widely understood format would be preferable.
The extension USES GIMP to create the XCF (thus the requirement for a cli version of Gimp) and so does not violate the wishes of the Gimp
okay so it uses the gimp directly, and avoids any of the hiccups or which might occur from using anything else.
thinking about the problem futher the gimp does have SVG import which might prove a better approach for integration, but that may well be what you are using underneath.
between Gimp and Inkscape. XCF is the appropriate format for this task not PSD.
True but in this case the task the user was asking about was working with Photoshop, in which case PSD would be a better choice and since PSD was standardised in a limited way and is understood by many different applications it is a better choice in general (unless maybe you are a dedicated gimp user).
thinking about the problem futher the gimp does have SVG import which might prove a better approach for integration, but that may well be what you are using underneath.
between Gimp and Inkscape. XCF is the appropriate format for this task not PSD.
There is MNG (animated png) format which is just what you looking for.
Khiraly
On Sun, 11 Jun 2006, Thetargos wrote:
Date: Sun, 11 Jun 2006 16:55:17 -0400 From: Thetargos <thetargos@...155...> Reply-To: Inkscape User Community inkscape-user@lists.sourceforge.net To: Inkscape User Community inkscape-user@lists.sourceforge.net Subject: Re: [Inkscape-user] Inkscape animation test
On 6/11/06, Khiraly <khiraly123@...961...> wrote:
There is MNG (animated png) format which is just what you looking for.
Sadly MNG is not as widespread as gif is (yet), would be nice to see it as widely used as animated gifs, though the format is a bit bigger.
I expect the size of the files produced has more to do with the programs than the MNG standard itself. If anything I'd expect MNG files to be smaller than the GIF but only if you are doing a fair comparison.
PNG files are often larger than GIF files because GIF only supports 256 colours and PNG supports full colour. If you force a PNG file to use only 256 colours you will get a smaller file than the same GIF.
Given the lack of any widely understood layered file format besides Adobe PSD (widely supported, de facto standard but not actually fully open) I really hope MNG/JNG will gain widers support so it can be used not just for animations but also as a file format for most of my layered images. (It wouldn't be enough for users who need CMYK support in their layered images but it would be enough for me and many others I'm sure.)
Sincerely
Alan Horkan
Inkscape http://inkscape.org Abiword http://www.abisource.com Open Clip Art http://OpenClipArt.org
Alan's Diary http://advogato.org/person/AlanHorkan/
Alan Horkan wrote:
I'm actually pretty excited about the possibility of using Inkscape to do more-or-less traditional, cel style animation. One tedious bit, though, is the outputting of the individual png frames. Would it be possible to write a script or a plug-in that would do that as a batch? So, you'd have background layer plus layer 1 output as 000000.png, background plus layer 2 as 000001.png, and so on? If so, where would I go to learn how to write such a script or plug-in?
If you know python I'd head right over to the gimp_xcf.py script located in inkscape/share/extensions for an example. This particular script only functions on linux because of the way it uses the gimp cli,
I'd be surprised if the working only on linux issue could not be resolved if someone had the time and interest to look into it more closely.
It is a shame XCF was never standardised but the gimp developers do discourage other programs from implementing XCF so Inkscape should probably take that advice and "deprecate" it. If you could export to a/the defacto standard format like PSD it would offer plenty more options when it comes to software for animating those layers.
If you are willing to run linux to get the XCF export working then you could use the gimp animation package to create an animation from the XCF file and there might be some good integration possibilities there which could really streamline the workflow.
but the png export portion should work fine in windows. If you don't do python, what language do you want to use?
The python extensions are working in 0.44 pre 2 so it would make sense to use python.
Thanks for the replies. Sorry it took so long for me to get back to this, but I was house sitting for a while. And when I got back, I switched to Ubuntu Linux, so you can disregard the Windows limitations now. :D
I plan to try some walk tests this evening with Inkscape and Stopmotion. By this weekend, I hope to get back into figuring out how to streamline the multi-png thing, once I have a better handle on exactly what my needs are.
Oh, and my ultimate goal is to output these animations for DVD. I'm not looking to do web animations (a la animated .gifs or anything like that). Just in case that matters.
Again, thanks for the guidance.
Matt Jordan
On 6/5/06, Matt Jordan <matt@...1296...> wrote:
do more-or-less traditional, cel style animation. One tedious bit, though, is the outputting of the individual png frames. Would it be possible to write a script or a plug-in that would do that as a batch? So, you'd have background layer plus layer 1 output as 000000.png, background plus layer 2 as 000001.png, and so on? If so, where would I go to learn how to write such a script or plug-in?
Yes, it's easy to do. For example I use a shell script with:
for i in `range /${2}..${3}/`; \ do inkscape --export-png=${1}-${i}.png --export-id=${i} \ --export-id-only --export-dpi=400 --export-area-canvas \ --export-background-opacity=1 ${1}.svg; done
Here, the first script parameter, ${1}, is the name of source SVG without extension, ${2} is the number of starting layer to export, and ${3} is the final layer. Layer names must be numbers with the same number of digits, for example 001, 002, ... 010, ... etc. You can make an empty template with all these layers already added. Then call this script "ex" and call it:
$ ex filename 001 033
and it will export layers from 001 to 033 into filename-001.png, filename-002.png, etc.
For this to work you will need the "range" utility available here: http://suso.suso.org/programs/num-utils
The only problem is that you need to have all your layers to be unhidden before you call this. I plan to add another command line switch to force unhiding of the exported object even if it is hidden in SVG, so manual unhiding in Inkscape will not be needed.
bulia byak wrote:
On 6/5/06, Matt Jordan <matt@...1296...> wrote:
do more-or-less traditional, cel style animation. One tedious bit, though, is the outputting of the individual png frames. Would it be possible to write a script or a plug-in that would do that as a batch? So, you'd have background layer plus layer 1 output as 000000.png, background plus layer 2 as 000001.png, and so on? If so, where would I go to learn how to write such a script or plug-in?
Yes, it's easy to do. For example I use a shell script with:
for i in `range /${2}..${3}/`; \ do inkscape --export-png=${1}-${i}.png --export-id=${i} \ --export-id-only --export-dpi=400 --export-area-canvas \ --export-background-opacity=1 ${1}.svg; done
Here, the first script parameter, ${1}, is the name of source SVG without extension, ${2} is the number of starting layer to export, and ${3} is the final layer. Layer names must be numbers with the same number of digits, for example 001, 002, ... 010, ... etc. You can make an empty template with all these layers already added. Then call this script "ex" and call it:
$ ex filename 001 033
and it will export layers from 001 to 033 into filename-001.png, filename-002.png, etc.
For this to work you will need the "range" utility available here: http://suso.suso.org/programs/num-utils
The only problem is that you need to have all your layers to be unhidden before you call this. I plan to add another command line switch to force unhiding of the exported object even if it is hidden in SVG, so manual unhiding in Inkscape will not be needed.
Thanks for the help. I'm on Ubuntu Linux now and I'll try to play with this suggestion some this weekend.
Cheers,
Matt Jordan
participants (6)
-
Aaron Spike
-
Alan Horkan
-
bulia byak
-
Khiraly
-
Matt Jordan
-
Thetargos