Quantcast
Channel: Adobe Community : Popular Discussions - After Effects Expressions
Viewing all 47983 articles
Browse latest View live

Scale Shape & Text Expression

$
0
0
  • It has an expression on the (Rectangle Path 1) property "size" of a shape that follows the size of a text. Every time I change the text (his name changed), the expression automatically changes the text name of the reference to the expression continue working. So far so good.

 

  • The problem happens on the (Transform: Rectangle 1) property "scale" of the shape, which also has an expression and is following the "scale" of the text as well. When I change the text characters, the expression does not change the reference automatically, resulting in an error. Why does this happen on the property "scale" of shape?

 

  • Do not made auto updates in expression and generates error. I have to keep correcting all times, which is tiring.

 

See the image, I changed the text "Because I'm happy" to "Clap along". The property "size" of the shape automatically changed to "Clap along", but the property "scale" of the shape was like before with reference to layer "Because I'm happy" which resulted in an error.

 

to see.PNG

Windows 8.1

After Effects CC 2014 updated

 

Thanks.

 

Update:

 

It has something to do with the expression of the shape in the above property, "size" in, I think the After read the expressions in order, from top to bottom, expression in "size":

 

x2 = effect("x2")("Slider")

y2 = effect("y2")("Slider")

x = thisComp.layer("Clap along").sourceRectAtTime().width + x2 / content("Rectangle 1").transform.scale[0]*100;

y = thisComp.layer("Clap along").sourceRectAtTime().height + y2 / content("Rectangle 1").transform.scale[1]*100;

[x,y]

 

It makes a reference to expression of the property that comes after ("scale"), as follows:

 

content("Rectangle 1").transform.scale[0]

content("Rectangle 1").transform.scale[1]


What it must be causing the error because when I turn off the expression above in "size" the expression in "scale" works correctly.


(I mean, when the text is changed, the expression changes also without I'm having to edit within the expression to work.)


After Effects Universal Expressions

$
0
0

1. What are universal expressions?

  • I want examples of applications of universal expressions and how to identify non-universal expressions.


  • When my project use non-universal expressions, I can use a plugin called "ExpressionUniversalizer 2" to support all languages.

2. But there's another way to get the result of transforming the non-universal expressions in universal without use the plugin?

 

Please provide me all possible details.

 

I need to create a template that uses expressions and need that the template supports all languages.

 

Thanks!

Effect Controls> Time Remapping

$
0
0

I created a Layer >Pre-compose of a Mouth shape composition the contains 10 layers in an animation sequence of frames.

 

I created a null object that contains effect controls made up of sliders for a character's Mouth, Eyes, and Eyebrows to animate in a sequence but programmed using a toggle key to hold the frame number.

 

 

Screen Shot 2015-05-26 at 10.25.13 AM.png

 

This is the code I'm using with the help of the pick wick using expressions.

 

comp("stephanie_blake").layer("HOGAN-headcontroller").effect("MOUTH")("Slider")/23.976;


The problem that I am having is that when I pick wick the Mouth slider for the character, its doesn't hold frame number or it locks in the first frame number when I create a toggle key for the slider.

 

I have three characters in the scene. Each character has a head controller that controls their mouth, eyes, and eyebrows.

All of them seem to work but the third characters mouth will not work. I have loaded the mouth images in several times but the toggle key always gets stock or it never changes when programmed.  Can someone assist in helping me figure this out?

loopOut() Cycling/ping pong expression driven effect

$
0
0

Hi!

I like to loop this expression so it ping pong back and fort thru the timeline.

Is it possible to combine these two expressions? If, what's the correct sythax?

effect("Radial Wipe")(1) and loopOut("pingpong")

cant undo !! please help

$
0
0

hi. i cant undo after i hit ctrl+m and render my composition.its really bothersome. why it happens? please help if u know the solution.

wiggle between parameters

$
0
0

I want to wiggle between 2 values. So that my glow stays bright enough to see and still flickers.

 

why would this not work?

 

x= (50-75)

wiggle(4,x)

How to get an Array of all layers in the current comp

$
0
0

In expressions, how do you get a list of all layers in a comp?  The following doesn't work and errors with "property or method named 'layers' in Class 'Comp' is missing or does not exist":

 

allLayers = thisComp.layers;

AfterEffects Expression Text Row

$
0
0

Hello could some please help.

I have a single text layer with a row of numbers. I would like each number in the row to change after a set time. I would like each string to be different length as well.

 

Eample

(Row 1) 348920

(Row 2) 934

(Row 3) 9

(Row 4)4324

 

I would like to be able to change the number of rows and how long each sting can be (Set a Max & Min)

 

So in every 4 secs a new row would appear and the length of each row would be different.

 

I hope its clear, if not please let me know. I will try to explain it better if I can

 

Thanks for any help


Keeping Exponential Scale "live" with expressions

$
0
0
Is there a way to replicate the Exponential Scale via expression?

As you know, once you run the animation assistant, the keyframes are locked down and if I need to change the start or end values, I have to delete all the intermediate KFs and re-run the animation assistant. Kind of a hassle, eh?

It would be cool if I could set a start and stop keyframe or layer markers and have the expression do its thing between a min and max value (via sliders?).

Auto Fade In/Out audio based on layer in/out points?

$
0
0

Is it possible to automatically fade a layer's audio in and out based on its in and out points?

AE CC 2014 - Wiggle Expression not assigning similar values on scale

$
0
0

So I've just noticed that the wiggle expression no longer works how it used to. I found a released article explaining changes in the Noise Algorithm used for the wiggle expression what’s new and changed in the 2014 update to After Effects CC  |  After Effects region of interest and am referring to the "fixed bug in implementation of Perlin noise algorithm" section.

 

I'm not sure if this is what's causing the issue but let me explain.

 

I'm just adding a wiggle expression on to an object's scale.

wiggle(5,50);

 

This would normally scale the object's parameters with the same value. so it would be (100,100) to (125,125) and so on.

Now however with CC2014 the expression is assigning different values to each value so getting (125, 115) or something even if the 'constrain proportions' button is enabled.

 

So I tried to trick it:

 

temp=wiggle(5,50);

[temp[0],temp[1]];

 

Still got different values even though i'm telling it to insert the same variable?

 

temp=wiggle(5,50);

temp;

 

Still got different values... I don't get it can anyone help?

Creating a number counter that counts in increments of .05 in After Effects.

$
0
0

I need to create a number counter that counts in increments of .05 in After Effects.  Any advice on how to do this?

 

Many thanks!

Is it possible to call a script file from an expression?

$
0
0

Hello everyone,

 

tl;dr Accessing path vertices via expression doesn't seem possible, but scripts can, so is it possible to do it by calling a script file inside the expression?

 

My goal is to access the number of vertices in various path objects and use this value in an expression. The expression is driving a trim path's offset property and the expression use relative naming so that I can copy the trim path to 500 other shape layers groups and have a different effect (speed of the offset) for each group depending on the number of vertices of each path.

 

I've been looking for a solution to this problem for quite some time now and my conclusion is that you simply cannot access path vertices via expression, whether the path is in a mask or a shape layer.

Is this correct?

 

With a mask on a solid layer and according to the After Effects Scripting Guide I should be able to do:

thisComp.layer("Black Solid 1").mask("Mask 1").maskPath.value

or

thisComp.layer("Black Solid 1").mask("Mask 1").maskPath.value.vertices

or

thisComp.layer("Black Solid 1").mask("Mask 1").maskPath.value.vertices.length

I also tried:

thisComp.layer("Black Solid 1").mask("Mask 1").maskPath.vertices.length

and so on...

 

But when debugging this with the source text of a text layer I only get "undefined" for the value and errors for the other expressions ("property named 'vertices' in Class 'Property' is missing or does not exist").

I'm pretty sure these are the correct methods since a lot of scripts are using those, including:

http://omino.com/pixelblog/2008/12/25/ae-mask-vertices-from-extendscript/

http://www.crgreen.com/aescripts/actual_scripts/Connect_Point_to_Mask_Vertex.jsx

http://aescripts.com/maskvertexexpression/

 

So if directly accessing the path arrays via expression is not possible, I was thinking about calling, in each expression, an external script which would then return the number of vertices there is in each arrays. It would look like something like this (pseudo-code):

arrayLength = content(thisProperty.propertyGroup(2).name).content("Path 1").value.vertices.length

return arrayLength

And then use the value I get from the script to adjust the speeds in my expressions:

time*arrayLength*thisComp.layer("Controller").effect("Speed")("Slider")

 

So is it possible to call a script file inside an expression? How?

If not, do you have any other suggestion?

 

Thanks.

 

Reference: After Effects CS6 Scripting Guide, page 172.

Help needed pausing and resuming a wiggle expression

$
0
0

Hi!

 

I would like to create something but I don't know how to do that. Hopefully someone can help me out.

I am animating a kind of northern light effect with particles and a wiggle expression. At a certain point in time, I want to pause the wiggle effect and make some manual position changes (like a path that the light follows). After a couple of seconds I want to resume the wiggle effect again.

I found some posts about starting and stopping the wiggle effect, but not much on pausing and resuming. Any ideas?

 

With kind regards,

Koen

Snappier Wiggle?

$
0
0

How would you make a wiggle expression that radically reduced the time between values?  Like Wiggle that uses Exponential interpolation as inbetween values? So even though the pace would be something like wiggle(1,50), it would take much less than the 1 second wiggle interval to change between values.

 

Kind of like how a hummingbird feeds? It hovers, hovers, hovers... then snap into a new position.... hover, hover, hover... snap into new position.

 

Any ideas about this?

 

(Also, is the Jagged/Smooth option of the ancient Wiggler available in expression form?)


Loop Out Stop expression

$
0
0

I was wondering if it's possible to create a stop/smooth ending to a LoopOut expression on Rotation and Position keyframes.   I am currently using OSX 10.9.3 After Effects CS6 and I have tried a couple of things that haven't worked for me.

 

adding a checkbox expression control to the layer and an expression for loopOut()

 

if (effect("Checkbox Control")("Checkbox")==true){

loopOut();

}else{

value;

}

 

 

loopOutDuration(“cycle”,2)

 

Unfortunately neither of these seems to work.  I was wondering if someone had a solution they have come across.

 

Thanks very much

 

Ira

Basic tween

$
0
0

Hi, I am new to the syntax in Expressions, but I use Greensock TweenLite a lot

 

I was wondering what the equivalent of this would be. The Graphic would be the Current layer, a duration of 3 seconds, and move in from the left -440 pixels with easing

 

TweenLite.from(Graphic, 3, {x:"440px", ease:Sine.easeOut});


This would be applied on the position keyframe.

 

Any advice appreciated

 

Thanks

How to use multiple expression in single layer

$
0
0

I need using loop expression: loopOut(type = "cycle", numKeyframes = 0);

and remove digits behind coma: .value.toFixed(0);

I Tried to use ";" but only works for first expression

Unexpected Slider control

$
0
0

Hi I have this expression in my position on a null object:

[value[0],wiggle(thisComp.layer("MASTER SLIDER").effect("Slider Control")("Slider"),100)[1]]

that links to a layer called 'MASTER SLIDER', the master slider starts at 0 so nothing is moving then creeps up to a value of 0.5 to reach a constant speed.

But from 0 - 0.5 it animates really fast and then slows down when it reaches 0.5...surely it should go from stop to slowly increasing in speed until it gets to 0.5?

 

Screenshot:

https://www.dropbox.com/s/6jel1thyh3qs3rx/Slider.png?dl=0

 

Thanks!

toComp method on Puppet Pin position property returns bogus values

$
0
0

In trying to rig this girl character I've had a strange behaviour come up. I could work around it easily enough but it's getting to me that there's something I'm not understanding. My level of experience with expressions is relatively low but I have some Javascript experience so the main principles are clear.

What's annoying me is that my procedure works fine in a simple scene created wholly in AE. However when I import a .psd file (using composition-retain layer sizes), the same approach becomes useless. I feel like I'm missing something about layer sizes in relation to comps or something, or come upon a bug.

 

Ok this is my first post and its a little involved. I've always been able to find answers by searching online or in documentation. Here goes.

 

I'm trying to set up a character using Puppet Pins, which I will link to nulls as part of a more complicated setup down the road. My general approach is to set up the pins first and see how it all moves manually before creating nulls and linking the pins to the positions of the nulls. So far so simple. To get my nulls to the exact position of my pins, i pickwhip the null position to the pin position, see what the coords are, then remove the expression and put in the coords manually on the null. Once the nulls and pins are lined up, I just link the pins to the nulls with an expression in the pins "position" property.

 

This all works fine in my simple scene consisting of a solid layer with puppet pins applied, and some nulls. The nulls snap to the pins perfectly, and I don't have to convert the pin coordinates to comp space or anything. The pins coords seem to be in comp space already. Then I can link the pins to my nulls and all is fine.

 

However, in my complex scene which is generated from an imported .psd, the pin coords do not correspond to comp space. They're very low and seem to match up to the layer the puppet effect was applied to. So the null ends up way off near the top left of the comp.

 

No problem. We just run toComp on the position of the pin and we should get the comp space coords of the pin. But I don't. I get something way off.

 

Why do the pin positions not map to comp space automatically in my psd-based comp, as they did with the simple comp?

 

Is it even possible to run toComp successfully in the following way

toComp(thisComp.layer("R_Arm").effect("Puppet").arap.mesh("Mesh 1").deform("Puppet Pin 1").position);

or is the return of

thisComp.layer("R_Arm").effect("Puppet").arap.mesh("Mesh 1").deform("Puppet Pin 1").position;

not of the right data type to be an argument of toComp?

 

Are pin coordinates just layer based coordinates like any other or are there other factors involved?

 

I'd like to be able to set up pins where I want them and link them to nulls with exactly matching coordinates so the artwork doesn't jump when I link them.

 

More generally, is there any attribute of a psd file that can affect the coordinate system of a comp generated on import. The file in question contained all regular layers, plus one group of 3 (which came in as a pre-comp the entire size of the main comp, as expected), no layer effects or anything else fishy.

 

Anyone more experienced with expressions and coordinate spaces in AE have any idea what I'm missing?

 

 

 

 

Macbook Pro Early 2011 15" i7 2.2Ghz

16gb RAM

AMD Radeon 6750 1GB

OSX 10.9.2

AE 12.2.1.5

Viewing all 47983 articles
Browse latest View live