[GSoC 2020] Improvements for Lottie Exporter Plugin

Do you know Linear Algebra?
It’s all about affine transformations : matrices for 2D translation, rotation and scaling.

2 Likes

With one difference, though: scaling a bone doesn’t scale its children bones.

2 Likes

Yes, I understand Linear Algebra and affine transformations. Can you tell me where in Synfig this is done so that I can refer to it :smiley:

Maybe it is ValueNode_Bone::get_animated_matrix() ?

1 Like

Weekly Report - July 6th - July 12th

  • How was the last week? What did you accomplish?
    Completed most of the work on bone_link convert functionality.
  • What is the #1 thing slowing you down?
    Coming up with correct coordinate transformations since matrix transformations are not supported in Lottie.
  • What do you want to have done by the end of next week?
    Complete bone_convert fully and start bone_influence.

– Saurabh(saurabh22)

3 Likes

@rodolforg @KonstantinDmitriev I am trying to implement recursive_length feature in bone_link and I was trying to understand what it does by looking at Past Topics. In this it is said that it only changes length of current and all child bones but when I changed the recursive_length of a parent_bone, the child_bones get rotated as well. Can you explain how recursive_length changes the coordinates of a circle_layer attached to a child_bone? I am attaching the pictures which shows the child_bones getting rotated.
Pic1 : without changing recursive_length of parent.
image
Pic 2 : After changing recursive_length of parent.
image

2 Likes

Could you also attach the .sif files used here. Would be easier to try out. ^___^

2 Likes

Attaching the .sif files ,
before_changing_length.sif (4.9 KB) after_changing_length.sif (5.0 KB)

1 Like

I guess this is because the stretch is applied to second bone? (so, this changes angle, as it is stretched along the X axis of Parent bone)

To be hones I never used recursive_length parameter in my animation practice :laughing:

2 Likes

@KonstantinDmitriev , I discussed this with @AnishG and there seems to be no way in Lottie for animating the bone_link, that is changing bones linked to an object. Is changing linked bones used regularly in practise?

2 Likes

@KonstantinDmitriev, So we discussed this offline, and currently lottie does not seem to have any such functionality. And I think we can skip it for now, based on whether this feature is used frequently or not.
In future, we can provide support to this by manipulating the expressions in lottie(but will have to research more on that).

2 Likes

Weekly Report - July 13th - July 19th

  • How was the last week? What did you accomplish?
    Bone_link convert functionality is complete and bone_influence has been started. Pushing recursive_length functionality to stretch goals.
  • What is the #1 thing slowing you down?
    Coming up with a formula for recursive_length functionality.
  • What do you want to have done by the end of next week?
    Complete bone_influence fully.

– Saurabh(saurabh22)

1 Like

@saurabh22 @AnishG I agree, we can skip the functionality of animated bone_link. Just make sure to note that in documentation. :slight_smile:

2 Likes

Weekly Report - July 20th - July 26th

  • How was the last week? What did you accomplish?
    Completed bone convert method as much as possible in Lottie.
    Added support for Not convert method
    Added support for Logarithm convert method
  • What is the #1 thing slowing you down?
    There was an issue that came up with Synfig GUI as it was not rendering in my system. Raised an issue as well but couldn’t fix it so had to reinstall OS.
  • What do you want to have done by the end of next week?
    Complete some more convert methods and get PRs merged.

– Saurabh(saurabh22)

3 Likes

@KonstantinDmitriev , I am stuck in one particular thing and cannot find an answer to it. So basically I have two .sif files in which a group’s transformation parameter is attached to the same bone. In one file the local length scale parameter is 1 and in the other file the local length scale parameter is 2. All other parameters are kept same in the two files. I cannot figure out the equations involved which leads to the scale parameter of the transformation going from (60,60) in file-1[skew.sif (22.5 KB) ] to (79.37,108)px in file-2[after_changing.sif (24.3 KB) ] .

I would need your help in figuring out the equations involved in the changing of the scale parameter when local_length_scale paramter of the connected bone is changed.

I am attaching the two pictures denoting the change in scale as well.
Before Changing local length scale :

After changing local length scale:

2 Likes

Hi! Just apply X-axis stretch to the group, where X is aligned with direction of bone. :slight_smile:

3 Likes

We tried to figure out the scale using the x-axis scale, but could not arrive on any solution. Hence @saurabh22, could you put a detailed figure of what we dicussed and someone here might be able to help in figuring out the solution?
@KonstantinDmitriev @ice0 @rodolforg

2 Likes

This is the methodology I have followed for the two cases, I am attaching the photos to demonstrate them.
For first case : scale_at_base_angle_45_local_scale_2.sif (23.4 KB)
I get the correct answer when I apply my method to this case:

For second case : scale_at_base_angle_60_local_scale_2.sif (22.6 KB)
I get the wrong answer when I apply my method to this case :

3 Likes

Can you also write the expected answer for 2nd case here :slight_smile:

3 Likes

Expected Answer of scale for first case : (94.86,94.86)px
Expected Answer of scale for second case : (79.37,108.16)px

3 Likes