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

Responsive Mask Not Cooperating. Help Needed!

New Here ,
Apr 05, 2024 Apr 05, 2024

Copy link to clipboard

Copied

I am trying to make a responsive mask that dynamically wraps around the shape of my text layer. I watched Ukramedia’s tutorial on it which got me almost all the way there. The bug I keep running into is when I slide the layer around in time, the mask will move when it is not supposed to and remain in the wrong position.

You can see in the screenshot below that the mask is not aligned to the text at the markerTime. There is no error in the expression, it just does not seem to be working. Any help here? I need the shape to be based on the markerTime. Attaching the expression for reference.

var markerTime = thisLayer.marker.key(1).time;

var {height, width, left, top} = sourceRectAtTime(markerTime);

var origin = [left, top]

var topL = [0, 0];

var topR = [width, 0];

var bttmR = [width, height];

var bttmL = [0, height];

var pathPoints = [topL, topR, bttmR, bttmL];

var pathPointsUpdated = [];

pathPoints.forEach(item => pathPointsUpdated.push(item + [left, top]))

createPath(pathPointsUpdated);Screenshot 2024-04-05 at 11.59.57 AM.png

TOPICS
Expressions

Views

77

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 Expert ,
Apr 05, 2024 Apr 05, 2024

Copy link to clipboard

Copied

LATEST

I'm not sure what's going on here. The usual approach when adding a text animator would be to animate the Range Selectors In or Out properties. You are animating the Animator/Position and Opacity, so there is no difference between that and animating the layer/Transform/Position and Opacity. Unless you are planning to animate the Range Selectors, there is no reason to add Opacity or Position to a text animator.

 

It would also help us help you if you posted a link to the tutorial you are trying to follow.

 

You could try removing the reference to the layer marker and the layer marker. I don't see any reason for it at all. Try this expression:

var {height, width, left, top} = sourceRectAtTime();
var origin = [left, top]
var topL = [0, 0];
var topR = [width, 0];
var bttmR = [width, height];
var bttmL = [0, height];
var pathPoints = [topL, topR, bttmR, bttmL];
var pathPointsUpdated = [];
pathPoints.forEach(item => pathPointsUpdated.push(item + [left, top]))
createPath(pathPointsUpdated);

 

 

 

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