• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

How to apply expression loopOut to mask

Participant ,
Dec 23, 2019 Dec 23, 2019

Copy link to clipboard

Copied

Hi;

I wanted to animate a mask, so turned on the "maskpath" stopwatch created three point, and tried to apply loopOut expression to repeatedly continue it, but not worked.

is there any resolve.

gratefully

martinmiciciday

TOPICS
Expressions , FAQ

Views

13.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 23, 2019 Dec 23, 2019

The loopOut() method only works for numerical values or numerical arrays. Mask keyframes contain complex vector information and none of the looping or traditional math functions will work with masks. There are very few options for creating expressions that will work with masks. You can find most of the methods that will work directly on masks in the Expression Language menu in the timeline. 

Screenshot_2019-12-23 10.29.44_AMbgzI.png

Unfortunately, there is very little documentation yet on using these methods and you can't just click on

...

Votes

Translate

Translate
Community Expert ,
Dec 23, 2019 Dec 23, 2019

Copy link to clipboard

Copied

The loopOut() method only works for numerical values or numerical arrays. Mask keyframes contain complex vector information and none of the looping or traditional math functions will work with masks. There are very few options for creating expressions that will work with masks. You can find most of the methods that will work directly on masks in the Expression Language menu in the timeline. 

Screenshot_2019-12-23 10.29.44_AMbgzI.png

Unfortunately, there is very little documentation yet on using these methods and you can't just click on one and apply it.

 

If the first and last mask keyframe are identical you can apply this expression to create a loop:

 

valueAtTime(time % key(numKeys).time)

 

It is kind of a sledgehammer solution and it will only loop smoothly only if the first and last keyframe is identical. If they are not identical now you can just copy the first keyframe, move down the line and paste to get identical starting and ending keyframes.

 

If you are using the mask to mask something then another option is to have the mask on a separate layer, move to the last keyframe, set the out point for the layer at the last mask keyframe (Alt/Option + ]) then pre-compose the layer moving all attributes and apply time remapping to the pre-comp (Alt/Option + Ctrl/Cmnd + t). Then you move to the last time remapping keyframe (k) then back one frame (Ctrl/Cmnd + left arrow), set a new Time Remapping keyframe, delete the original last keyframe, then use this animated shape layer as a track matte for the layer that you originally wanted to mask.

 

I hope this makes sense. 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 26, 2019 Dec 26, 2019

Copy link to clipboard

Copied

thanks sir;

that was exactly what I wanted

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 29, 2021 Nov 29, 2021

Copy link to clipboard

Copied

Thank you sir

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 03, 2022 Oct 03, 2022

Copy link to clipboard

Copied

Thanks so much! Precisely what I needed 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 16, 2022 Dec 16, 2022

Copy link to clipboard

Copied

thank you for this bright idea with mask on separate layer!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 10, 2023 Nov 10, 2023

Copy link to clipboard

Copied

LATEST

Thank you Sir ❤️

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines