GSOC-2019::Export Animation for Web

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

Weekly Update(18 August - 24 August):

This week was mostly filled with the final submission of GSoC project. I was able to fix some bugs reported by @KonstantinDmitriev. I have pushed the development of recursive scale length to a later date. I will need to figure out the math for it first.
In the next week, I will be resolving more issues submitted to the github issue tracker regarding the lottie exporter.

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

1 Like

Thank yo for sharing this, Its useful.

@KonstantinDmitriev, I have seen some modifications in the outline layer recently. (Ex: https://github.com/synfig/synfig/commit/eed519672395ca4278552d05cb9eda0d1ecd69c0#diff-ebcf1997c8ddc9a1e8ddde66cc858928).
Do these changes need to be reflected in the Lottie exporter also?

-Anish

1 Like

@AnishG Thank you for note! That depends on the fact if Lottie exporter produces distortions for outline tips, as described in this bug? - https://github.com/synfig/synfig/issues/985

I guess this bug appeared after GSoC, so it is likely that Lotie Exporter is not affected. Can you check, please? ^___^

1 Like

@KonstantinDmitriev, yes you were right. This bug is not there in lottie exporter.
So, now I will start with the export of advanced outline layer.

-Anish

1 Like

Awesome! Looking forward to it! ^___^

1 Like

@KonstantinDmitriev, I am trying to understand the advanced outline rendering.
Could you give me an overview of the bend function used here.


Thank you!

Hi @AnishG!
Oh, this function was introduced as part of rewrite of Advanced Outline Layer, in September. See this - https://github.com/synfig/synfig/commit/96d6ce558e3f731834443db5fac184a66a01a3cd - and adjacent commits.
This rework was done to improve speed of Advanced Outline Layer.
It completely changed the approach how it is rendered.

In new approach Synfig first constructs a straight line and puts all width points on it. In the next step it bends line according to real contour of advanced outline.

I think this approach is not suitable for Lottie export, so probably it is better to check code for old approach.
Please see a code from commit before September 3rd, 2019 - https://github.com/synfig/synfig/tree/15607089680af560ad031465d31878425af927eb

1 Like

@AnishG I wanted to know how an if-else expression can be written in the Adobe After Effects expression language. Could you help me out with this?

1 Like

For a property in adobe after effects, expression example:
if(false) value*2 else value*4
When you convert this to Lottie format using bodymovin, this is how it looks:
"x": "var $bm_rt;\nif (false)\n $bm_rt = mul(value, 2);\nelse\n $bm_rt = mul(value, 4);"
Here is an example json file depicting the above example: data.zip (766 Bytes)

P.S. Adobe after expression are pretty easy to guess if you have a little bit experience with C language. You can either guess or google search for most of the expressions and try them in adobe after effects. BTW Adobe after effects has only 7 days trial period(and that is why I support open source :slight_smile:). I will directly message you a work around for this 7 days trial period if you need.

2 Likes

Thank you for your suggestions and advice.

Yes, I will be needing the Adobe after effects, kindly message me the workaround. :smiley:

2 Likes

hi guys be sure to check out these awesome Animation Apps for free they are really fun.

1 Like