GSOC-2019::Export Animation for Web

@KonstantinDmitriev, I have researched about the support of skeleton layer, but it is not directly provided by Lottie. The same can be found here: https://github.com/airbnb/lottie-web/issues/21
I guess if we want to provide support to skeleton layer, then we 'll have to play around with the base layers(like group layer).

Could you provide me the useful links where I could study more about the implementation of skeleton layer. :slight_smile:
Thank you

1 Like

Yes, actually Skeleton Layer (I mean traditional Skeleton Layer, not Skeleton Deformation Layer) does nothing. This is just a ā€œcontainerā€, which stores a list of Bones. Bones are just a global objects, stored in Synfig file, like Exported ValueNodes.

You can learn about Exported ValueNodes here:
https://wiki.synfig.org/ValueNode#Export
https://wiki.synfig.org/Library_Panel

Unlike Exported ValueNodes, Bones are not displayed in Library Panel.

Bone defines a transformation. Each Bone also may have a parent Bone and in this case its transformation is a combination of its own transformation and all transformations of parent bones.

You can attach any parameter of any layer to Bone, by converting that parameter to BoneLink or Bone Influence convert type.

BoneLink is used when you want a parameter to be influenced by one bone.
Bone Influence is used when you want a parameter to be influenced by multiple bone (with weights).

So, when you are linking a group to Bone. Synfig converts Transformation parameter of a group to BoneLink and sets selected bone as its ā€œBoneā€ parameter.

screenshot_002

So, what you will need is to calculate transformations for parameters affected by bones. Maybe this is possible to do using Lottieā€™s expressions, but I do not know much about them.

1 Like

@KonstantinDmitriev,
I have been reading about the skeleton layer. It seems, this needs implementation of convert methods first(with expressions). Also, my converter does not support the export method yet. I am designing a class for Layers which will make this all relatively easier to implement.
Without the above components, it will be very difficult to implement the skeleton layer. So I think it is best to continue with the development of above parts first and then the come up with skeleton layer.
Till then I will continue with other layers. Please provide your input on this.
Thank you

1 Like

Weekly Update(14 July - 20 July):

  • Add support for z-depth parameters in group layer. z-blur parameter is not supported.
  • Resolved opacity bug in switch group layer.
  • Updated developer documentation for all the layers.
  • Started developing the class Layer for ease of support of valuenode exports and other uses.

In the next week, I will be providing support for duplicate layer. @KonstantinDmitriev suggested to go with skeleton layer first, but it will be more comfortable and reasonable to support other things like valuenode exporting. In the mean time, I can work with other layers.
Any feedbacks or suggestions will be much appreciated!
Stay tuned for the next update. :smiley:
-Anish

3 Likes

Exactly. ^___^

Absolutely agree.

Okay, I just want to put a special emphasis that we need Skeleton layer in final project. We can miss support some layers, but support for exporting Skeletons animation is mandatory. :slight_smile:

1 Like

Sure, I will try my best. Anyways I will be working on this even after GSoC period ends, so no worries. :grinning:
Thank you!

3 Likes

Weekly Update(21 July - 27 July):

  • Add support for add convert method.
  • Develop classes(such as Layer, Param) for support of convert methods.

I expected to finish developing the convert methods and duplicate layer in this week, but it turned out that to support convert methods, there had to be lots of structural changes in the code and hence this week went really hectic.
In the next week, I will be providing support for furthur convert methods. It will be great if I can finish most of the convert methods by the end of this week.
Any feedbacks or suggestions will be much appreciated!
Stay tuned for the next update. :smiley:
-Anish

3 Likes

@AnishG or @KonstantinDmitriev please change the date to 21 - 27 July

1 Like

Thank you!
I didnā€™t realise while editing in the previous post itself. :ok_woman:

1 Like

I was wondering, is there any particular reason for the lottie plugin to use lxml.etree instead of the built-in python etree implemntation?

Iā€™m asking because it looks like lxml doesnā€™t come by default on windows and I saw a few people who didnā€™t know how to install it

2 Likes

The decision was based on a comparison between the two libraries. I am attaching a screenshot of the comparison (not properly cropped as I am sending from mobile)

1 Like

@KonstantinDmitriev,
I am trying to figure out how the skeletons and bone system work. I am able to convert the parameters to bone links and link them together now.
But I didnā€™t figure out what is the use of parameters like tip width, bone width, recursive length, and length setup. I read about them here: Skeleton Layer, but didnā€™t quite properly understand what they do.
So I tried changing these values in a bone, but for me they had no effect.
Could you guide me furthur or provide some resource regarding the above.
I am attaching the file here:skeleton.sifz (1.3 KB)

1 Like

tip width and bone width are used for automatic bone linking -


and in Skeleton Deformation Layer (not supported by Lottie) -
1 Like

recursive length changes length for current and all child bones.

length setup has no effect at the moment. ^___^

1 Like

Weekly Update(28 July - 3 August):

  • Add support for many other convert methods including average, composite, linear, radial_composite, scale, subtract, switch, weighted_average.
  • Started working on bones and skeleton layer.

I am still in the phase of learning the skeleton layer and the bones and how they are used in Synfig. As soon as I have a good grip over it, I will start working on it at a good pace. Most of the time in this week was spent on providing support for the convert methods stated above.
In the next week, I will learn the working of skeletons and bones and get started with the export.

As always, any feedbacks and suggestions are most welcome.
I will be back here next week! :smiley:
-Anish

2 Likes

So just to be clear, these parameters wonā€™t affect the final animation, right? After the linking is done, they will not have any effect?
Also, could you provide the .sif example file of the video shown here.
This would help a lot in understanding, @KonstantinDmitriev
Thank you!

1 Like

Exactly! :slight_smile:

Unfortunately, I didnā€™t saved the source file. The vectorized artwork was extracted from sources of Morevna Project Demo, but had modifications - the original file in sources is attached to ā€œStickmanā€ (our early system, which was emulating bones). For this video I have detached all layers from ā€œstickmanā€ and used it for demonstration.

1 Like

@KonstantinDmitriev,
How does the base value in bone_link affect the animation?
I tried changing some values but I couldnā€™t understand the logic(parents and children of bones are showing different results). Couldnā€™t find any resource regarding this also.
Could you share some views on this please. :slight_smile:

1 Like

base_value is a relative offset from bone origin.

I.e. you can have a circle layer. Letā€™s say its origin is linked to bone via bone_link.
In this case, circle will be ā€œattachedā€ to bone origin.

But what if you want a circle to be placed in a different place (but still attached to the same bone)? Then you change base_value. Here is base value changed to (-60; 0):

1 Like

Hereā€™s a video about that -

1 Like