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

How to apply expression loopOut to mask

Participant ,
Dec 23, 2019 Dec 23, 2019

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
18.4K
Translate
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

...
Translate
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 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. 

 

Translate
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

thanks sir;

that was exactly what I wanted

Translate
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

Thank you sir

 

Translate
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

Thanks so much! Precisely what I needed 🙂

Translate
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

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

Translate
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
LATEST

Thank you Sir ❤️

 

 

Translate
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