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

color corrupt now on all Adobe after effects video after editing one video

$
0
0

I was working on a video the title was purple and green and after editing using this theme all of my videos that I have edited in After Effects are all colored green and purple. I don't know how or why but it is not my video card because videos I have saved on DVD or videos on youtube work just fine. I am at a loss. Can any one help???


What benefit should I get from "// cacheCompareSamplesPerSecond 0"?

$
0
0

Background for anyone reading this: http://blogs.adobe.com/aftereffects/2014/04/new-changed-after-effects-cc-2014.html I think I must have misunderstood what this statement does for an expression.  I was hoping "// cacheCompareSamplesPerSecond 0" would allow me to force AE to evaluate an expression only once, on the first frame of the comp, but clearly it isn't that simple.  I've applied it to a number of expressions, each of which is designed to evaluate to one value for the entire comp, but I'm not seeing any improvement in render times. What am I missing? This is on Mac AE CC 2014 (13.1).

Expression error using checkbox control

$
0
0

I'm trying, for the first time, to create an expression that controls a value depending on whether or not a keyed checkbox is on.  This is my code.

 


x = comp("overlay grain").layer("frame").transform.position;

 

If (effect("Frame Stutter")("Checkbox") == true)
{
    value = x + wiggle(25,5);
}
Else
{
    value = value + wiggle(25,5);
}

 


When I run this, I get the error:

 


After Effects warning: Function If is undefined
Expression disabled.

 

Error occurred at line 3.
Comp: 'main'
Layer: 1 ('Date Stamp')
Property: 'Position'

 


I have been racking my brain over what the problem is.  I have used If/Else statements in the past successfully and I know that there is just something very simple that I am missing.  I have also tried using "== 1" instead of "== true", but I got the same result.

 

Help please.

Math.pow(Math.E, time)

$
0
0

Hi folks!

 

The expression

 

"Math.pow( Math.E, time )" keeps giving me a "divide by zero" error.

 

This seems to be similar to problems others have had, but the other solutions don't quite work in my case, since Math.E isn't negative.  "time" of course is a non-integer, but the expression doesn't even work for me if I replace it with "Math.ceil(time)." 

 

Can anybody tell me what I'm missing?  Thanks in advance!

 

--S

How to create a simple bobbing up and down motion expression?

$
0
0

Hi, I have a 3D object that I want to continuously bob up and down but I'm having trouble finding an expression to do this.

 

I would use wiggle on the Z except wiggle creates random motion and I need consistant up and down oscillations.

 

It seems simple but I can't figure it out... any ideas? Thanks.

 

-Pete

Fill Color Controller to change between colors overtime

$
0
0

Hi All,

 

I'm using CS6 AE..

 

I have created a clapometer style animation that uses a colour controller and value/numbers controller to animate the hand from left to right of a semi circle. As the hand moves (by a value slider) the layer underneath fills and I would like the color to go from yellow to red via multiple colors.

 

So far I have this code on my fill layer

 

l=thisComp.layer("Fill color controllers");

i=1;

colors=[];

try {

while(l.effect(i)) {

if (l.effect(i)(1).name=="Color") {

colors.push(l.effect(i)(1).value);

}

i++;

}

} catch (e) {}

if (colors.length) {

r=Math.floor(random(colors.length));

colors[r];

} else {

}

 

And a fill color controller layer with 5 different color expression controls. At the moment the code cycles through them randomly, but I would like cycle through the list. I know there are other ways I could do this but I am trying to improve my expression knowledge and hope someone can help me!

 

Cheers!

How to parenting the puppet pin

$
0
0

Hi there,

I animating 10 animal 2D that walking in a row. I moved the first animal with puppet tool. Is it possible to just parenting the puppet pin the the other animal behind the first one so they do walking in a same way? I Need any expression suggestion. Thanks

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?


Parsing number text string to numeric value

$
0
0

If I have the number "5" as a text layer, how can I get another text layer to read that number, and then add another number to it?

 

This gives me "56". I want "11".

 

temp = thisComp.layer("5").text.sourceText.value;

(temp + 6)

create randomly changing characters or numbers

$
0
0

Hello. I wonder if there is a way to create randomly changing characters or numbers using expressions?

Trapcode Particular sprite layer changing after emitting

$
0
0

Hello,

 

I've linked the sprite layer of Trapcode Particular to a comp, and I was planning on putting some expression on a layer there that emits a random number (between a fixed set), so I can place all my different footage files with a simple expression on opacity (if random number generated == index then opacity 100, else 0).

 

There are a few problems on this. One, the way I'm making it, the seed randomizes based on day/month and holds the number for 3 seconds (which is the max life of each particle). But the output shows just a random layer selected every day, and repeated through the video, instead of it changing every 3 seconds.

 

The other problem is that sometimes particles overlap, as in, one gets emitted while other one was still there. Even if I am able to fix the first problem I've just mentioned, that means both particles (the one almost dying, and the one just getting emmited) would use the very same footage file, generating some bad flickering on the old particle instantly switching from one footage file to other.

 

I'm really stuck on this! Perhaps there's a way of randomizing after a single emit has been made.

 

Let me know if you have any ideas or even tips to do something like this.

 

Thank you,

 

-----

Juan

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?)

Expressions from AE CS6 not working in AE CC

$
0
0

We have used some expressions in an AE CS6 project to fill text from an external file. Here's an example:

 

try{

/* "mypath" must be absolute to data file */

myPath = "file:////nynfile1/Production/Egg/Marque/data.txt";

$.evalFile(myPath);

/* Use [0,1,2] for array offset value(Name, Date, Time)*/

eval(thisComp.name)[0];

}catch(err){

/* Display if data error found*/

"text not found";

}

 

 

It works fine in CS6. When we open the file in AE CC, the expressions can't find the data.txt file to pull text from. All we get is the "text not found" error. We stepped through debug and the data.txt file doesn't open/isn't found.

 

What up with that?

Linear wipe through multiple layers

$
0
0

Hi, I am trying to set up a project where by i can drop multiple stills images into a comp and have a linear wipe go through them one by one, all controlled by expressions.

similar to vfx breakdown's you get on Youtube

MPC Prometheus VFX breakdown! - YouTube

Being an intrepid novice to expressions I though "I can do that, no problem!"

So I have a comp with the images in it and another comp with the wipe effect in it. Inside the wipe effect comp I have 2 layers, a null with two sliders and a solid with a linear wipe effect.

wipeEffectComp.png

The first slider (called pause) controls the length of time before the wipe effect begins and 2nd (called wipeSpeed) controls speed of the wipe:

 

if (time < thisComp.layer("Controls Wipe").effect("pause")("Slider")){

0

}else{

((time - thisComp.layer("Controls Wipe").effect("pause")("Slider")) * thisComp.layer("Controls Wipe").effect("wipeSpeed")("Slider"))

}

 

This works great I can apply a set channels effect to each image layer that takes its alpha channel from the comp with the wipe effect.

footageComp.png

But this is just the first step after this I have become stumped, searching the web unsuccessfully for information, I hope I can get some advice here.

What I think needs to happen next is once the transition % for the wipe has reached 100 the time (play head for the comp) needs to go back to frame 0 and the whole process begins again.

Each time the cycle has run the upper most layer in the stack, that is visible, needs to be made invisible, that way each new layer below can be revealed and the whole layer stack is played through sequentially.

I hope that makes sense and there is someone out there that can help. Thanks for your time.

Felix

Confused with array syntax

$
0
0

If I want to wiggle the X, Y and Z dimensions of a layer's position, I can do it with this expression:

[wiggle(3,4)[0],wiggle(4,5)[1],wiggle(5,6)[2]]

 

This addresses each dimension as an array member by index number.

 

But if I want to randomize the  dimensions, I have to use syntax like this:

[random(0,100),random(10,50),random(50,80)]

 

If I try to explicitly reference the array members when using the Random function, AE throws an error.

 

So how do I know which functions require addressing array members by index number and which functions require that I don't?


Wiggle intervals?

$
0
0

Is it possible to set up intervals with expressions?  Such as "use expression for 1 second, then turn it off for 2 seconds, then use it again for 1 second, etc"

scale expression

$
0
0

Hi

 

i've got a 3d comp splitted into pieces with i.e 10 different masks.I then used a script to separate all mask into its own layer.

So,i basically have now 10 layers that form this comp now.

 

when i now move i.e one layer into z space i'd like that the scale property creates the illusion to keep the layer in place.

the layers moves in z space and the scale expression reacts accordingly to always fill the gap.makes sense ;-).

In the front view it looks as if the comp has only one layer.

 

now i'm looking for an expression that calculates this,any ideas?

Expressions in AE

$
0
0

Hello all,

 

Have a quick question - I'm coming from a flash/actionscript programming background and am fairly new to AE. I started to experiment with expressions, and it seems that communication between layers and other expressions is pretty limited.  For example, when working with actionscript in flash/flex, you could set up 'event listeners' for one object, then when that event is triggered, you can instruct numerous objects to react to that one event.  It doesnt seem that there is any way to do this in AE. For example, write 'one' expression to a null layer that would change the opacity on all the comps layers based on a current point in time.

 

something like:

if(time==2){

     thisComp.layer("layerName").transform.opacity=50;

     thisComp.layer("layerName2").transform.opacity=75;

     thisComp.layer("layerName3").transform.opacity=25;

}

 

Is something like this possible?It seems that each layer has to have its own expression and one layer cannot change another layer's properties/values correct? Or even setting up a global variable would be great in AE, then you could have the layers check for that one variable, but not sure if this is possible either?? Any help will be greatly appreciated, thanks all!

 

Mike

How to delay an animation

$
0
0

Sorry for my bad english: i'll try to be clear.

Once a layer has some animation (position, scale etc),

how can i link another layer to this first one (or the animated property of the first one to the another equivalent one)

and make the second layer animation delay some number of frames?

 

Another situation:

same start point above, but, after duplicate that layer,

how to delay the animation time some frames?

 

Thanks for the attention

linking precomped wheel rotation to position in another comp

$
0
0

Hey guys,

 

I suck at expressions, but I think one would really help me here.  I have a car driving, part of a complicated precomp, and i want the wheel rotaion in the precomp to rotate according to the position of the car in the master composition.  I've seen a few link-rotation-to-position scripts but can't find one that i can figure out how to alter in order to make it work. 

 

Hope someone can help, and apologize in advance if this is well worn territory.  I tried a search but could have easily not used the right key words.


Thanks in advance,

Mike

Viewing all 47983 articles
Browse latest View live