GSOC-2019::Export Animation for Web

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

Weekly Update(4 August - 10 August):

  • Add support for bones origin and angle parameters.
  • Bug fix which did not allow rendering of png format images. (link)

This week, I was able to understand the bone link convert method and implement some of it’s features.
In the next week, I will be extending support for the skeleton layer and bones(such as base value).
Any feedbacks and suggestions are most welcome.
Stay tuned for the next update. :smiley:
-Anish

4 Likes

@KonstantinDmitriev, by default the skeleton layer is disabled from rendering.
After rendering there is a structure visible. Is it’s color always fixed(I guess it is blue)?
Also to draw this, is this the correct file I should be referring to https://github.com/synfig/synfig/blob/master/synfig-core/src/synfig/layers/layer_skeleton.cpp?

If yes, at the last of this link: https://github.com/synfig/synfig/blob/16f6a5cbc40e857d999b9b7e0b09fc30e13a250f/synfig-core/src/synfig/layers/layer_skeleton.cpp#L213 I encountered add_polygon() being used, but on observing the skeleton’s, the skeleton structure has curvy corners which is not provided by add_polyton().
Please provide some clarity on this.
Thank you!

1 Like

Also to draw this, is this the correct file I should be referring to synfig/synfig-core/src/synfig/layers/layer_skeleton.cpp at master · synfig/synfig · GitHub?

Yes, this is the right file. :slight_smile:

but on observing the skeleton’s, the skeleton structure has curvy corners which is not provided by add_polygon().

Actually, all curves are constructed from polygons. They just constructed using very small segments in curvy areas. :slight_smile:

Finally, an important note: I don’t expect skeleton to be visualized by converter, so you can safely skip this part. ^___^

1 Like

Yes, this seems to be the case. But as per my understanding, add_polygon() is only used for non-curvy figures. For curvy figures, move_to and cubic_to functions are used. But still I will check this out and inform whatever I find, here.

Oh, In this case, I will prioritize the development of all other bone parameters which are left.

1 Like

Great, thank you! :slight_smile:

1 Like

@KonstantinDmitriev, Could you point at the difference between recursive and local length scale.

I have attached a file below. In that, there are 3 bones: bone1, bone2, bone3 where bone3 -> bone2 -> bone1 -> root_bone. A star layer has it’s origin attached to bone3.
Initially all of them have local and recursive length set to 1.

Case 1: change recursive length of bone1 to 2.
Case 2: change local length scale of bone1 to 2 and local length scale of bone2 to 2.

According to my understanding, both cases should have resulted in the same animation, but this is not the case.
Could you provide some help here please. :slight_smile:
skeleton_example.sifz (1.1 KB)

1 Like

Oh, you right. It looks like I provided incorrect information about recursive length (here). Sorry for that. ^_^"

The correct meaning of recursive length - it stretches current and all child bones in direction of current bone.

In your case the angle of bone1 is 0, so it is stretching all child bones along X axis.

1 Like

Weekly Update(11 August - 17 August):

  • Add support for other parameters in bones: base_value, local scale length.
  • Bug fix: When 2 vectors are equal on adjacent time frames (link)

This week, I was able to add support for 2 more parameters in bone link. I struggled implementing the recursive scale length parameter. Hence I have asked @KonstantinDmitriev for help with this, thanks to him!
In the next week, I will be providing support for recursive scale length parameter. Then I will be resolving the issues submited to github issue tracker: https://github.com/synfig/synfig/issues?q=is%3Aissue+milestone%3A"Lottie%3A+Export+animation+for+web"+is%3Aopen

Sorry for the delay in update. I was caught up in some work.

Any suggestions or feedback are most welcome
Stay tuned for the next update. :smiley:
-Anish

3 Likes