Jump to content
Trixt0r

Texture-Packer

Recommended Posts

Hey guys,

I was working on a little JavaFX GUI for the LibGDX texture packer tool. There is already one, but it does not pack all subfolder images into one texture.

Maybe somebody can use it. This could be useful as long as Spriter does not pack the sprites into an atlas. I tried it with my generic Java api and it works very well. The only thing you need to use it in your environment is a little parser, which is able to read *.atlas files.

You can either open a gui or call it from command line. Command line usage is described on the github wiki.

Here you go. To run it, you need the newest Java 8 version.

- Trixt0r

Share this post


Link to post
Share on other sites

Hey guys!

I created a new tool :D

It is again based on Java and can convert Photoshop files (PSD files) to Spriter's SCML file format.

So if you are done with creating your graphics you can save your layers as a *.psd file and use this tool. It will export all layers as cropped png images and create a Spriter animation file from it.

You do not need to drag and drop each file on your own.

Currently you can use it only via command line with: java -jar psd-to-scml.jar "psd filename" "output name".

I may add a little GUI with some export options like pivots, offset, entity name, etc.

Here you have some screenshots:

Your layers in any image manipulation program, like Photoshop, Paint.NET, GIMP, etc. (if your programm cannot export into PSD file format you may have to look for a plugin):

fulyn8b7.png

And this is what you see then in Spriter:

k4yagnj4.png

You can test it with the two PSD test files in the zip package. Just call from your console e.g.:

java -jar psd-to-scml.jar greyguy.psd

And you should get a greyguy.scml file which you can open and edit with Spriter.

Make sure you have the newest Java version installed.

- Trixt0r

psd-to-scml.zip

Share this post


Link to post
Share on other sites

I believe the code requires already pre-existing files in the folder, i get the following error in cmd: java.io.FileNotFoundException: C:\Users\Blabla\Desktop\Spriter%20Tests\leg_ri

ght.png (The system cannot find the path specified) when I try to export the dummy or the other file.

Share this post


Link to post
Share on other sites

Hey guys,

I was working a little bit more on the psd-to-scml tool and was able to fix some very big bugs. Thanks to Aniketos with helping out with some test files.

You can download the new version HERE.

- Trixt0r

Share this post


Link to post
Share on other sites

Well, glad I looked here :)

Turns out I was just thinking of posting this as an additional feature request in spriter.

I wonder though, would this be easily modified to be able to support more image types?

I am a big fan of Gimp, so being able to take a layered .png or .xcf file right into spriter would be equally convenient. (although I could of course export my image as a .psd from gimp as you mention)

And further to this. Do you think it would be easy to program a slightly different mode/tool that does something similar but in a way totally opposite thing (as follows)

*Import a multiple-frame image as a single sprite, but each frame making up a separate keyframe in spriter, dispersed evenly across the timeline?

Share this post


Link to post
Share on other sites

I can not support XCF since the converter is based on Java and I do not know of the existance of an *XCF parser for Java or any JVM language. Implementing such a parser on my own would be a bit overkill. PNG does not hold layer information.

Converting a single Sprite Sheet to SCML would be quite easy. But the problem here is that it requires more user input than the PSD to SCML converter, if it is a plain image file with no further information (like a JSON file holding bounding boxes, etc.). I think adding such a feature in Spriter itself would make more sense. If I get the time, I may have a look into this a little bit more...

-Trixt0r

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...