Spine File Format Exporter project Discussion

hello everyone,
I’m Abdelrahman Emad and I have created this topic to discuss the Spine File Format Exporter project.

So far, I have added a new menu option titled Export to Spine Format within the Skeleton Layer. I have been exploring the Skeleton Layer implementation in Synfig to better understand its structure and behavior. and also I have studied the Spine JSON format and explored the Spine software itself

Currently, I am working on designing the mapping process between Synfig’s internal skeleton/animation structure and the Spine JSON file format.

I am asking: when an image is linked to a bone, where does Synfig handle this?
are Synfig waypoints and keyframes converted into Spine keyframes during export
@ice0 @rodolforg @mohamed.Adhamc

and also in the Spine file structure, the skeleton part references the path to an images folder, since Spine expects all related images to be stored inside a dedicated directory.
like this image in spine software

When exporting from Synfig to the Spine format, should the exporter automatically create an images folder and copy all project images into it based on a user-defined path? Or is there a recommended approach for handling image paths and asset organization during the export process?

In a general way, when you do an export, it should be possible for anyone to access all the needed data without to have access to the original.
It is like a backup.
If you want to send your export to a friend, he doesn’t have access to your machine nor specific paths.

Normally, you should use a dedicated directory for the whole animation and possibly an asset subfolder, and use only relative paths.
Maybe even to do a zip to distribute it.

Now there are the specifications but don’t always rely blindly on them.
Build your own assets for test an check whether they open as expected during the import inside Spine.
Everything should be portable, independant, modular, to keep it organized.

https://wiki.synfig.org/Dev:Bones
https://wiki.synfig.org/Doc:Basic_Bone_Tutorial

3 Likes

Does Synfig support a constraint system similar to what exists in Spine (IK constraints, transform constraints, or path constraints)?

in the project we can export the Skeleton layer or Skeleton Deformation layer
in the spine we have only one skeleton
if we have multiple skeletons in the Synfig project we export them as independent skeletons ?

Spine does both at the same time, Skeleton (Rigging) + Mesh deformation (Mesh + Weight), there should be a way to do it.
Anyway, I don’t think that we could do a perfect export, Spine and Synfig don’t play on the same ground.

1 Like

Can we link the Skeleton Deformation layer with the main Skeleton layer?

  • IK constraints: sadly not yet, but there is a user (zainal) trying to implement it (in a limited version)
  • transform contraints: yes, it is possible (but not that easy). User should convert the Origin/Rotation/Scale using Grey converter and (if wanted) Disabling Animation. So s/he couldn’t change its value (via GUI)
  • path constraints: maybe via Following a Spline/Path?

The image or switch layer will have parameters linked to skeleton/bones.

They should be.

Yes. Fortunately, Synfig is pretty flexible. Sadly, Synfig is pretty flexible. :laughing:

1 Like

Yes. Fortunately, Synfig is pretty flexible. Sadly, Synfig is pretty flexible. :laughing:

We can change the parent of skeleton deformation layer to the main skeleton layer and also two normal skeletons can be combined by setting one skeleton as the parent of the other.

During export to Spine, all skeletons that are linked together will be combined and exported as a single skeleton Should i take this approach?