FORUMS: list search recent posts

Using the slider control and gradient ramp to only effect the x property (a series of lines)

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jo Willard
Using the slider control and gradient ramp to only effect the x property (a series of lines)
on Jun 26, 2020 at 1:27:40 pm

Hi,

I've stumbled across a really useful tutorial to create a halftone effect using the size controller with a gradient ramp to animate the movement:







I'd like to do this to a series of lines instead of dots but the slider control just seems to have one control for both x and y axis and not one for one or the other. I only want the width of the line effected and not the length.

I actually got in contact with Mike the tutor to see if it was a matter of adjusting the expression but I didn't understand what he sent!

The expression in the tutorial placed on the shape's scale property is:
x = thisComp.layer("Gradient").sampleImage(transform.position, [.5,.5]/2, true, time)[0];100*[x,x]

Mike said adding [0] to the end.

[0] x property
[1] y property
[2] z property

but end of where? It didn't work by putting it at the end of the expression.

Is anyone able to help? Thanks so much for reading my waffle!!!

Jo


Return to posts index

Graham Quince
Re: Using the slider control and gradient ramp to only effect the x property (a series of lines)
on Jun 27, 2020 at 9:16:04 am

Looking at the expression, I think what you're after is to adjust the X scale, but not the Y scake. Mike used a little bit of a shortcut, which I think is the source of your confusion. If I rewrite the expression, it might be clearer:


x = thisComp.layer("Gradient").sampleImage(transform.position, [.5,.5]/2, true, time)[0];
y = x;
100*[x,y];


If you only want the X scale to be adjust and have y be a fixed scale:


x = thisComp.layer("Gradient").sampleImage(transform.position, [.5,.5]/2, true, time)[0];
y = value[1];
100*[x,y];


This picks up the current . user specified value for Y, but leaves X to be whatever you want. Now Mike has also used a 100*[x,x] in his expression, which might be easier to write as:


x = thisComp.layer("Gradient").sampleImage(transform.position, [.5,.5]/2, true, time)[0]*100;
y = value[1];
[x,y];


This way you'll only be multiplying X by 100 and leaving Y to the value you set.

http://www.YouTube.com/ShiveringCactus - After Effects Tutorials


Return to posts index

Jo Willard
Re: Using the slider control and gradient ramp to only effect the x property (a series of lines)
on Jun 27, 2020 at 11:57:06 am

Perfect! Thank you so much Graham! I still don't understand how expressions work and would never have been able to figure this out but you gave me the answer. Appreciate your time.


Return to posts index

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