GSoC-2020::Improvements for Lottie Exporter Plugin

What is meant by bones here? Does it mean bone convert method?

2 Likes

Yes, the bone convert method. It is used to control groups (this is how cutout animation created) or individual vertices of spline. There is also Bone Distortion Layer, which can distort images, but it cannot be implemented in Lottie.

So, it would be really awesome if we can export Bone Convert method attached to Transformation parameter of Groups. This way we can export cutout animation

I have sent you PM with a link to access our video course, which is explaining how bones work. :slight_smile:

2 Likes

Okay, I’ll need to look into how this particular method works as I don’t know much about it because I had not included this in my proposal. I’ll try my best to incorporate this feature but I might have to remove something else from the proposed schedule. Would that be okay with the mentors?
@AnishG @KonstantinDmitriev

2 Likes

I think, for now you can keep everything from the proposed schedule. But if and when time comes, that the work load is too much, then we can drop the least priority things. :slight_smile:
@KonstantinDmitriev your thoughts here?

2 Likes

I think it is perfectly fine to remove something, as Bones is a top-priority feature for export.
Or, instead of removing, make some thing optional, a “stretch-goal”, as @AnishG suggested. :slight_smile:

2 Likes

We can use this link to follow on the development work of lottie: https://github.com/airbnb/lottie-web/blob/master/CHANGELOG.md
I was reading this and found out that image sequence has been supported now :smiley:

So this will surely help to track new features that we can use!

2 Likes

@KonstantinDmitriev How are characters in a Text Layer rendered in Synfig? For example how does synfig use the data in text_layer.sif to render the characters in a text layer?
Lottie uses bezier curves to generate each unique character in the text present in the layer, but I could not understand how Synfig does it. I am attaching a snippet of the rendered lottie JSON file from After Effects 2020 to show the same -> text_layer.json

2 Likes

We discussed this offline and currently I don’t have knowledge as per how the characters are rendered. Can someone point as where this text layer rendering happens. :slight_smile:
@ice0 @rodolforg

2 Likes

You will find all the needed info in the source of the module lyr_freetype

Check also render.cpp

It’s rendered as surface, not as curves
Hint: see libs Cairo / Pango / FreeType

3 Likes

Yes, it looks like Lottie doesn’t supports exporting Text (as characters).
So, it converts all text to curves.

In Synfig we use freetype library to convert text characters to pixels and show them on screen.

Synfig has no function to convert text layer into splines (regions/curves).

Implementing this in Python (as part of Synfig plugin) is a very tricky task and I do not think it worth doing so.

It makes sense to implement conversion of Text Layer to curves directly in Synfig, but I have 2 doubts here:

  1. Text Layer is in process of rewriting and its code will be changed much in future.
  2. Even if conversion code will be written, I am not sure how to (properly) trigger it before executing a plugin.

So, I suggest to skip Text Layer and proceed with other tasks.

Can we dedicate this time on implementing bones? :slight_smile:

2 Likes

So we discussed this problem offline and I think Saurabh has found a way around and he will be able to implement this.
@saurabh22 can you add more to this?

I guess this might not effect the lottie export for text layer, as the conversion is independent of the Synfig code. Please correct me if I am wrong here.

This can be done, but I leave it up to you guys to decide on this. @KonstantinDmitriev @saurabh22

1 Like

Yes, Lottie allows exporting of text-layers using two methods:

  1. Directly including all characters in the json file as glyphs which ultimately leads to the json file becoming extra large in some cases.
  2. Directly using text data which does not require us to bundle all the characters inside the json file.

I am currently using the second method as it is easier as well as efficient size-wise.
I have made some progress in making the text-layer in lottie format as well. Here is a sample animation -> lottie_text

I think you are right as I feel the important things needed to generate the lottie format file won’t be changed.

2 Likes

@KonstantinDmitriev I think Text Layer can be done, should I finish it and then take up bones immediately after that?

This is awesome! I wasn’t aware that Lottie supports second method! :slight_smile:

Yes, you right. In this case this will not affect Lotties’s export for Text Layer.

Yes, then it’s better to finish Text Layer.

Also, I suggest to get back to reviewing the timeline (GSoC-2020::Improvements for Lottie Exporter Plugin) and update the plan according with bones task. :slight_smile:

2 Likes

Weekly Report - June 1st - June 7th

  • How was the last week? What did you accomplish?
    Added support for Text Layer with position and size animation.
    Added tests for convert methods and gradient layers.
  • What is the #1 thing slowing you down?
    Documentation for lottie-web is not upto date and therefore to map properties there are confusions.
  • What do you want to have done by the end of next week?
    Get done with most of the things in text layer.

– Saurabh(saurabh22)

3 Likes

Great! Keep up the good work! :slight_smile:

1 Like

Weekly Report - June 8th - June 14th

  • How was the last week? What did you accomplish?
    Added Text Layer support for nearly all the parameters in Synfig. The parameters not yet supported are Kerning,Sharpen and Invert which do not have support in Lottie.
  • What is the #1 thing slowing you down?
    Nothing as such this week except for trying to find workarounds for invert support.
  • What do you want to have done by the end of next week?
    Finish up documentation for Text Layer and start work on Blur layer. Planning to take up on bones in the second coding period as I believe it’ll take two weeks atleast.

– Saurabh(saurabh22)

3 Likes

Weekly Report - June 15th - June 21st

  • How was the last week? What did you accomplish?
    Added support for blur layers for fast gaussian blur, gaussian blur, box blur, cross-hatch blur and disc blur. Note : Gaussian approximation is used for all blur types as only gaussian method is supported by Lottie.
  • What is the #1 thing slowing you down?
    Nothing as such this week.
  • What do you want to have done by the end of next week?
    Finish up the small details left in blur layer and complete its documentation. Also add Power, Vector X/Y convert methods.

– Saurabh(saurabh22)

3 Likes

Weekly Report - June 22nd - June 28th

  • How was the last week? What did you accomplish?
    Fixed support for blur layer and added Power, Vector X and Vector Y convert methods.
  • What is the #1 thing slowing you down?
    Text in a group layer.
  • What do you want to have done by the end of next week?
    Start working on Bone Convert method and get previous PRs accepted and merged.

– Saurabh(saurabh22)

2 Likes

Weekly Report - June 29th - July 5th

  • How was the last week? What did you accomplish?
    Added documentation for Blur Layer and Convert methods.
    Most of the last week was spent in understanding bone convert which will the focus for the next two weeks.
  • What is the #1 thing slowing you down?
    Nothing particular
  • What do you want to have done by the end of next week?
    Start committing work on Bone Convert method.

– Saurabh(saurabh22)