Skip to content

[Lottie Exporter] Add support for blur layers - #1505

Merged
ice0 merged 10 commits into
synfig:masterfrom
saurabh-ramola:gaussian_blur
Aug 10, 2020
Merged

ice0 merged 10 commits into
synfig:masterfrom
saurabh-ramola:gaussian_blur

Conversation

@saurabh-ramola

Copy link
Copy Markdown
Member

Added support for blur layer minus radial blur.
A few tweaks needed for correcting the ordering of layers.

@saurabh-ramola
saurabh-ramola requested a review from AnishGG June 20, 2020 11:57
@lgtm-com

lgtm-com Bot commented Jun 20, 2020

Copy link
Copy Markdown

This pull request introduces 6 alerts when merging b6596e3 into d72bbc9 - view on LGTM.com

new alerts:

  • 6 for Unused import

@saurabh-ramola

saurabh-ramola commented Jun 23, 2020 •

Copy link
Copy Markdown
Member Author

It seems Lottie doesn't support Gaussian blur for paths in Shape layer which is what's used to create Rectangle, Circle, star etc.
I have asked for clarification from Lottie maintainers
airbnb/lottie-web#2190 (comment)

Other than that Blur is working now minus Group layer.

@lgtm-com

lgtm-com Bot commented Jun 24, 2020

Copy link
Copy Markdown

This pull request introduces 1 alert when merging 1749be1 into 67b1ab7 - view on LGTM.com

new alerts:

  • 1 for Unused local variable

@saurabh-ramola

Copy link
Copy Markdown
Member Author

Note : Synfig uses all the blur layers above the layer on which the blur is being applied while Lottie does not do this by default. To overcome this, what I'll do is calculate the maximum value at each waypoint considering blur values at all the layers above the layer blur is being applied to so that this can be applied in Lottie.
@AnishGG thoughts?

@AnishGG

AnishGG commented Jun 24, 2020

Copy link
Copy Markdown
Member

@saurabh-ramola Lets have a video chat regarding this some time tomorrow. I have some thoughts regarding it.

@lgtm-com

lgtm-com Bot commented Jun 24, 2020

Copy link
Copy Markdown

This pull request introduces 1 alert when merging 1749be1 into 67b1ab7 - view on LGTM.com

new alerts:

  • 1 for Unused local variable

@saurabh-ramola

Copy link
Copy Markdown
Member Author

Note : Synfig uses all the blur layers above the layer on which the blur is being applied while Lottie does not do this by default. To overcome this, what I'll do is calculate the maximum value at each waypoint considering blur values at all the layers above the layer blur is being applied to so that this can be applied in Lottie.

@AnishGG , based on the discussion and inputs today, this issue has been fixed it seems. Do let me know what you think of it.

@AnishGG

AnishGG commented Jun 25, 2020

Copy link
Copy Markdown
Member

Note : Synfig uses all the blur layers above the layer on which the blur is being applied while Lottie does not do this by default. To overcome this, what I'll do is calculate the maximum value at each waypoint considering blur values at all the layers above the layer blur is being applied to so that this can be applied in Lottie.

@AnishGG , based on the discussion and inputs today, this issue has been fixed it seems. Do let me know what you think of it.

Amazing!
I will test it as soon as I get time.

@lgtm-com

lgtm-com Bot commented Jun 25, 2020

Copy link
Copy Markdown

This pull request introduces 1 alert when merging fd3cb3d into 2e0b896 - view on LGTM.com

new alerts:

  • 1 for Unused local variable

@saurabh-ramola
saurabh-ramola marked this pull request as ready for review June 26, 2020 11:48
@saurabh-ramola

Copy link
Copy Markdown
Member Author

Tagging the original issue here : #1419

@AnishGG

AnishGG commented Jun 27, 2020

Copy link
Copy Markdown
Member

@saurabh-ramola the PR build is failing. One of the lottie file fails to build: [FAIL] /home/travis/build/synfig/synfig/synfig-tests/export/lottie/002-image.sif
Can you look why is it failing?

@saurabh-ramola

saurabh-ramola commented Jun 28, 2020 •

Copy link
Copy Markdown
Member Author

@saurabh-ramola the PR build is failing. One of the lottie file fails to build: [FAIL] /home/travis/build/synfig/synfig/synfig-tests/export/lottie/002-image.sif
Can you look why is it failing?

Had left a stray undefined variable inside a file, have removed it now ^__^

@lgtm-com

lgtm-com Bot commented Jun 28, 2020

Copy link
Copy Markdown

This pull request introduces 1 alert when merging 3c025ec into 15080f9 - view on LGTM.com

new alerts:

  • 1 for Unused local variable

@ice0

ice0 commented Jul 6, 2020

Copy link
Copy Markdown
Collaborator

@saurabh-ramola Can you check the LGTM warning, please?

@saurabh-ramola

Copy link
Copy Markdown
Member Author

@saurabh-ramola Can you check the LGTM warning, please?

My bad, corrected it now.

@ice0

ice0 commented Jul 7, 2020

Copy link
Copy Markdown
Collaborator

@AnishGG waiting for your approval before the merge

@AnishGG

AnishGG commented Jul 7, 2020

Copy link
Copy Markdown
Member

@AnishGG waiting for your approval before the merge

Yup, I will test it today and get back here.

@AnishGG AnishGG left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested your PR, and it is working perfectly. ^___^
I have some doubts and suggestions, could you please check those.

Also, Please mention in synfig docs, that blur layer is not supported for outlines, and all the shapes because it is not provided by lottie.

@AnishGG
AnishGG self-requested a review July 7, 2020 17:18
@AnishGG AnishGG removed their assignment Jul 23, 2020
@AnishGG

AnishGG commented Jul 23, 2020

Copy link
Copy Markdown
Member

@ice0 I think this is ready to be merged. :D
Could you have a look at it please. ^__^

@ice0

ice0 commented Aug 1, 2020

Copy link
Copy Markdown
Collaborator

@saurabh-ramola can you add files to CMakeLists.txt too?

@saurabh-ramola

Copy link
Copy Markdown
Member Author

@saurabh-ramola can you add files to CMakeLists.txt too?

Hi, apologies for the delayed response but can you tell me which CMakeLists.txt I need to add the files to as I have no idea about Cmake.
Or Do you mean that I should rebase my branch?

@AnishGG

AnishGG commented Aug 3, 2020

Copy link
Copy Markdown
Member

@ice0 did you mean this file: https://github.com/synfig/synfig/blob/master/synfig-studio/plugins/lottie-exporter/CMakeLists.txt ?
^__^
Also, I see a CMakeLists.txt for each directory, which has a subdirectory. But I think we missed this one: https://github.com/synfig/synfig/tree/master/synfig-studio/plugins/lottie-exporter/properties . Do we need a CMakeLists.txt here as well?
Tagging @AYESDIE for relevance.

@ice0

ice0 commented Aug 3, 2020

Copy link
Copy Markdown
Collaborator

@ice0 did you mean this file: https://github.com/synfig/synfig/blob/master/synfig-studio/plugins/lottie-exporter/CMakeLists.txt ?
^__^

Yes.

Do we need a CMakeLists.txt here as well?

Yeah, this is standard way, but as we don't building plugins using c++, I want to try invert logic - copy everything and exclude unneeded. This is why all files is listed here: https://github.com/synfig/synfig/blob/master/synfig-studio/plugins/lottie-exporter/CMakeLists.txt#L8

  # common
  common/Bline.py
  common/Canvas.py
  ...
  # effects
  effects/allmask.py
  effects/color.py
  ...

@AYESDIE

AYESDIE commented Aug 3, 2020

Copy link
Copy Markdown
Member

@saurabh-ramola Nothing needs to be done for edited files but for new files, you can add those in the list here.
So something like:

set(PLUGIN_LOTTIE_EXPORTER_FILES
    bodymovin.js
    canvas.py
    lottie-exporter.py
    settings.py
    test_bodymovin.js

    ... Add all the new files, the folders are categorized in that list already.
)

Also, I see a CMakeLists.txt for each directory, which has a subdirectory. But I think we missed this one: https://github.com/synfig/synfig/tree/master/synfig-studio/plugins/lottie-exporter/properties . Do we need a CMakeLists.txt here as well?

@AnishGG We only have to move those files into the build folder, so since we are not doing any operation other than that, it's a better idea to keep just one CMake file here /lottie-exporter/CMakeLists.txt. You can follow a discussion here in #1501.

@AYESDIE

AYESDIE commented Aug 3, 2020

Copy link
Copy Markdown
Member

Wooops. Looks like @ice0 got here first hehehe. But yeah, same logic that he meant.

@saurabh-ramola

Copy link
Copy Markdown
Member Author

@ice0 @AYESDIE , have I added the new files correctly?

@AnishGG

AnishGG commented Aug 5, 2020

Copy link
Copy Markdown
Member

@ice0 can you review this PR ^___^

@saurabh-ramola

Copy link
Copy Markdown
Member Author

@ice0 I am working on shade layer and I need some parts of this PR for it to work. Can you merge this ASAP if there's no problem at your end with this PR.

@ice0
ice0 merged commit ee4e533 into synfig:master Aug 10, 2020
@ice0

ice0 commented Aug 10, 2020

Copy link
Copy Markdown
Collaborator

Merged. Thank you!

rodolforg added a commit to rodolforg/synfig that referenced this pull request Jul 8, 2021
- Convert methods not working with radius of simple circle layer (synfig#1101)
- [Lottie exporter] Add support for variable gamma correction (synfig#1174)
- Changes made to offsetKeyFrame file (synfig#1233)
- Add support for converters: sine, cos, integer, linear gradient, aTan2, Vector angle, radial_composite, radial gradient, vector x, vector y, power, dot product, logarithm, reciprocal, range, vector length, not (synfig#1236 synfig#1254 synfig#1286 synfig#1363 synfig#1409 synfig#1447 synfig#1446 synfig#1516 synfig#1515 synfig#1593 synfig#1586 synfig#1619 synfig#1606 synfig#1650 synfig#1587)
- Add support for blur layers (synfig#1505)
- Add support for Outline layer without variable widths (synfig#1647)
- Improve support for exported values (synfig#2182)
- Some code cleanup (synfig#1199 synfig#1213 synfig#1226 synfig#1456 synfig#2061)
rodolforg added a commit to rodolforg/synfig that referenced this pull request Jul 10, 2021
- Convert methods not working with radius of simple circle layer (synfig#1101)
- [Lottie exporter] Add support for variable gamma correction (synfig#1174)
- Changes made to offsetKeyFrame file (synfig#1233)
- Add support for converters: sine, cos, integer, linear gradient, aTan2, Vector angle, radial_composite, radial gradient, vector x, vector y, power, dot product, logarithm, reciprocal, range, vector length, not (synfig#1236 synfig#1254 synfig#1286 synfig#1363 synfig#1409 synfig#1447 synfig#1446 synfig#1516 synfig#1515 synfig#1593 synfig#1586 synfig#1619 synfig#1606 synfig#1650 synfig#1587)
- Add support for blur layers (synfig#1505)
- Add support for Outline layer without variable widths (synfig#1647)
- Improve support for exported values (synfig#2182)
- Some code cleanup (synfig#1199 synfig#1213 synfig#1226 synfig#1456 synfig#2061)
rodolforg added a commit to rodolforg/synfig that referenced this pull request Jul 10, 2021
- Convert methods not working with radius of simple circle layer (synfig#1101)
- [Lottie exporter] Add support for variable gamma correction (synfig#1174)
- Changes made to offsetKeyFrame file (synfig#1233)
- Add support for converters: sine, cos, integer, linear gradient, aTan2, Vector angle, radial_composite, radial gradient, vector x, vector y, power, dot product, logarithm, reciprocal, range, vector length, not (synfig#1236 synfig#1254 synfig#1286 synfig#1363 synfig#1409 synfig#1447 synfig#1446 synfig#1516 synfig#1515 synfig#1593 synfig#1586 synfig#1619 synfig#1606 synfig#1650 synfig#1587)
- Add support for blur layers (synfig#1505)
- Add support for Outline layer without variable widths (synfig#1647)
- Improve support for exported values (synfig#2182)
- Some code cleanup (synfig#1199 synfig#1213 synfig#1226 synfig#1456 synfig#2061)
@rodolforg rodolforg mentioned this pull request Jul 12, 2021
morevnaproject pushed a commit that referenced this pull request Jul 12, 2021
- Convert methods not working with radius of simple circle layer (#1101)
- [Lottie exporter] Add support for variable gamma correction (#1174)
- Changes made to offsetKeyFrame file (#1233)
- Add support for converters: sine, cos, integer, linear gradient, aTan2, Vector angle, radial_composite, radial gradient, vector x, vector y, power, dot product, logarithm, reciprocal, range, vector length, not (#1236 #1254 #1286 #1363 #1409 #1447 #1446 #1516 #1515 #1593 #1586 #1619 #1606 #1650 #1587)
- Add support for blur layers (#1505)
- Add support for Outline layer without variable widths (#1647)
- Improve support for exported values (#2182)
- Some code cleanup (#1199 #1213 #1226 #1456 #2061)
morevnaproject pushed a commit to morevnaproject/synfig that referenced this pull request Aug 9, 2021
- Convert methods not working with radius of simple circle layer (synfig#1101)
- [Lottie exporter] Add support for variable gamma correction (synfig#1174)
- Changes made to offsetKeyFrame file (synfig#1233)
- Add support for converters: sine, cos, integer, linear gradient, aTan2, Vector angle, radial_composite, radial gradient, vector x, vector y, power, dot product, logarithm, reciprocal, range, vector length, not (synfig#1236 synfig#1254 synfig#1286 synfig#1363 synfig#1409 synfig#1447 synfig#1446 synfig#1516 synfig#1515 synfig#1593 synfig#1586 synfig#1619 synfig#1606 synfig#1650 synfig#1587)
- Add support for blur layers (synfig#1505)
- Add support for Outline layer without variable widths (synfig#1647)
- Improve support for exported values (synfig#2182)
- Some code cleanup (synfig#1199 synfig#1213 synfig#1226 synfig#1456 synfig#2061)
morevnaproject pushed a commit to morevnaproject/synfig that referenced this pull request Aug 9, 2021
- Convert methods not working with radius of simple circle layer (synfig#1101)
- [Lottie exporter] Add support for variable gamma correction (synfig#1174)
- Changes made to offsetKeyFrame file (synfig#1233)
- Add support for converters: sine, cos, integer, linear gradient, aTan2, Vector angle, radial_composite, radial gradient, vector x, vector y, power, dot product, logarithm, reciprocal, range, vector length, not (synfig#1236 synfig#1254 synfig#1286 synfig#1363 synfig#1409 synfig#1447 synfig#1446 synfig#1516 synfig#1515 synfig#1593 synfig#1586 synfig#1619 synfig#1606 synfig#1650 synfig#1587)
- Add support for blur layers (synfig#1505)
- Add support for Outline layer without variable widths (synfig#1647)
- Improve support for exported values (synfig#2182)
- Some code cleanup (synfig#1199 synfig#1213 synfig#1226 synfig#1456 synfig#2061)
morevnaproject pushed a commit to morevnaproject/synfig that referenced this pull request Aug 10, 2021
- Convert methods not working with radius of simple circle layer (synfig#1101)
- [Lottie exporter] Add support for variable gamma correction (synfig#1174)
- Changes made to offsetKeyFrame file (synfig#1233)
- Add support for converters: sine, cos, integer, linear gradient, aTan2, Vector angle, radial_composite, radial gradient, vector x, vector y, power, dot product, logarithm, reciprocal, range, vector length, not (synfig#1236 synfig#1254 synfig#1286 synfig#1363 synfig#1409 synfig#1447 synfig#1446 synfig#1516 synfig#1515 synfig#1593 synfig#1586 synfig#1619 synfig#1606 synfig#1650 synfig#1587)
- Add support for blur layers (synfig#1505)
- Add support for Outline layer without variable widths (synfig#1647)
- Improve support for exported values (synfig#2182)
- Some code cleanup (synfig#1199 synfig#1213 synfig#1226 synfig#1456 synfig#2061)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants