Export to sprite sheet

Hi guys.

:question: Any idea if it is possible to export an animation to a spritesheet?

:bulb: I have 10 keys and would like to know if it is possible to export it directly to an PNG sprite sheet.

:bulb: :bulb: This might let Synfig to foot into the games industry slightly. Would have been nice to understand the content of the SIF file so hopefully someone can create an XNA library to load the SIF animation instead of sprites.


Can you help on provide the specifications link for png sprite sheet?

It’s not possible to export directly, but might be possible with some batch file magic and imagemagick. Synfig has a command line mode which would allow you to output every frame to a unique file, and then you’d just need some way to assemble those onto a single image, which I suspect Imagemagick could do.


That is correct Chris

sample of a typical sprite sheet http://anthonyfoti.deviantart.com/art/Cloud-Strife-Sprite-Sheet-132111799

To make matters easier a single file with a fixed height is already a good direction.
height = 64px
width = 64px * # of sprites + px of specified gap

See it as having an image joiner built in to Synfig with some custom settings such as:

  1. pixels between each frame so that game engines dont show a frame border (int input)

  2. which frames to export like (listbox)
    a) keyframes only,
    b) all frames,
    c) even frame,
    d)odd frames

  3. Sprite size - will resize the render to the specified size like
    a) custom, ( int x int input )
    b) keep aspect ratio, (checkbox)
    c) 32x32, 64x64, 128x128, 256x256 ( droplistbox )

  4. Colour palette - Allowing the user to export to specified colours to be arty like ( droplist )
    a) greyscale
    b) black n white
    c) 8 colours
    d) 16 colours
    e) 256 colours
    f) Web friendly colours
    g) TV friendly colours ( some might not know this but a lot of people still get bleeding on monitors )
    h) 16bit
    i) 32bit
    j) original ( no change to what the artist used in their animation )

  5. Filename and path

  6. Filetype ( droplist )
    a) PNG
    b) JPG
    c) PCX
    d) GIF
    e) what ever Synfig supports

7) Batch export from all open animations in Synfig
8) Multiple format export
9) Multiple size export - export to multiple files of the specified sizes like a sequence at 32x32 and another sequence at 256x256
10) Multiple location export - Sometimes people keep duplicate copies on the Cloud, backup server, local and a thumb drive
11) config settings allowing users to share export settings to prevent confusion

Obviously another feature I’m keen on is to understand the Synfig filetype because I strongly believe if XNA game developers can use the Synfig animation file instead of sprites then it will revolutionize most programmers designing games since it should be much better to have all game content use vector based source files instead of static images. Imagine running a game on small screens and different resolutions by only using a single synfig animation file.

Hey Chris,

Could you explain to me the process of using “the command line mode to output every Keyframe to a unique file”. Also if I only make 10 keyframes on Synfig but would like the in between keyframes that synfig automatically creates to also be outputted thus creating, for example, 100 keyframes, how could I do this?

Thanks in advance.

Never mind, I figured it out.