FORUMS: list search recent posts

Clamp expression causing ugly popping motion.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Thomas Reardon
Clamp expression causing ugly popping motion.
on Jan 27, 2017 at 10:30:41 pm

I am trying to use a shape layer for an outward extruding effect. I have a shape layer with a repeater on it and I am trying to use the position of a null to control the trajectory of the repeater copies.

I have the "Nullchild" and the shapelayer "shadow" inside the "Nullparent". Eventually the position of the "Nullchild" will control the number of copies of the repeater but first I am trying to get the copies to follow the position of the "Nullchild" but the clamp is causing it to snap instead of a smooth movement between -1 and 1.

Is this the correct approach for this problem?

x=clamp( thisComp.layer("Nullchild").transform.position[0] ,-1.0,1.0);
y=clamp( thisComp.layer("Nullchild").transform.position[1] ,-1.0,1.0);
[ x, y]


Return to posts index

Dan Ebberts
Re: Clamp expression causing ugly popping motion.
on Jan 27, 2017 at 10:40:39 pm

What is the range of values for Nullchild's position? You might want to use linear() instead of clamp(). Hard to say for sure without knowing more about how you have things set up.

Dan



Return to posts index

Thomas Reardon
Re: Clamp expression causing ugly popping motion.
on Jan 29, 2017 at 8:39:24 pm

Everything is at zero and grouped under the parent, shapelayer and Nullchild, for ease of positioning. The clamp code is coming from the "Nullchild" to the repeater's position. The -1 to 1 range is because the repeater needs to look like a solid extruded edge. The range would be the maximum measurement of any composition I put it in.

For example: imagine the text letter "H". It would be grouped to the "Nullchild"and when it moved away from zero position, the shapelayer and its repeater,which would also be an letter "H" , would create duplicates toward the letter ("H"/Nullchild) to create the extruded effect. How far away from zero would also determine how many copies in the repeater's copy attribute.


Return to posts index


Dan Ebberts
Re: Clamp expression causing ugly popping motion.
on Jan 29, 2017 at 11:05:50 pm

I don't know if this helps, but I added x and y sliders to the Nullchlid and added this position expression to the null:

x = effect("Slider Control X")("Slider")/100;
y = effect("Slider Control Y")("Slider")/100;
[x,y]

As you adjust the sliders, you get a smooth spread of the copies. I hope that helps somehow.


Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]