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

Control Layer in point of expression % Number Count

$
0
0

I have an expression that Dan  Ebberts created for number counting with a percentage sign

 

beginCount = 0;
stopCount = 100;

 

beginTime = 0; // start counting at time = 0
countDur = 4; // count for 4 seconds

 

"" + Math.round(linear(time,beginTime,beginTime + countDur,beginCount,stopCount)) + "%"

 

For my animation the layer starts around 16 seconds into my timeline and the expression has already finished before then.  Is there a way to control the
in point for a layer for this expression?

 

Thanks very much

 

Ira


AE CS6: Render glitches with timeremap expressions

$
0
0

Version:

11.0

 

OS:

Mac 10.7.4

 

Source Footage:

.ai files

 

Problem:

 

First of all, we've been using this method for character animation since AE 7.0.  We have had minor glitches here and there, but nothing consistent enough to a real problem.  We're currently using CS5.5, and considering the CS6 upgrade.

 

I am filing an official bug report for this, but am curious if anyone else is experiencing this.  I don't want to share my project here as it's for a TV show in production.

 

Starting with CS6, we're experiencing random, arbitary render glitches all over the place.  Our character comps are generally two comps deep.  Meaning in the character comp, we have timeremapped comps for sequences of eyes, eyebrows, mouths, etc.  Inside those comps, there is a lot more going on than just an image sequence.  We have mesh warp keyframes and other stuff.

 

All of this is controlled by various expressions that link everything to some simple master controls.  I'm sure this sounds familiar -- it's very similar to the method used in these tutorials, but not even as complex.

 

As for the glitches, they are hard to pin down.  There are different glitches depending on whether the character is continually reasterized in the scene or not, which comp we're in, etc.  Really random.  The problem is resolved by proxying those precomps (the eyes, mouths, etc) with prerendered sequences.  This is an OK workaround for most cases, but we can't depend on it.

 

Thanks for any help.  In the meantime we'll be sticking with 5.5.

 

Bryan

"No active camera" error

$
0
0

Ran into this problem tonight with a couple expressions I've used in the past in CS3+. My scene has 1 camera. It it's set to active and the eyeball is on and its in/out is the length of my comp. Is 'activeCamera' broken in CS6?

 

These expressions are turning off:

 

delta = toWorld(anchorPoint) - thisComp.activeCamera.toWorld([0,0,0]);

radiansToDegrees(Math.atan2(delta[0],delta[2]))

 

and

 

C = thisComp.activeCamera;

V = C.toWorldVec([0,0,1]);

P = toWorld(anchorPoint);

lookAt(P, P + V)[0];


stroke width with expression

$
0
0

Hi, iam trying to set stroke width based on shape scale, (to maintain fixed stroke size) so ive used "(1/transform.scale[0])*500;" for stroke width expression, but this only works for either stroke width, or stroke height. What am i doing wrong? Or how can i apply ths to both stroke width and stroke height at the same time?

GPS data in Position Expressions?

$
0
0

I have GPS tracks of ocean drifters that I would like to animate with georegistered satellite images at specific time intervals. The objective is to show people how NOAA combines satellite observations and data collected in the ocean using drifters.

 

I can easily convert lon, lat, and time data into image coordinates and frame numbers, but I would like to know how to use these values to set position and frame number properties. I see how to set  position properties using expressions, but I don't see how to tie those properties to specific key frames or frame numbers.

 

This would be my first time implementing a project using expressions, so I would appreciate as thorough of a response as possible.

 

Thank you

Limit value range with expression?

$
0
0

Hi there,

 

Is there a way to put a limit on value range when linking it to key-framed audio?

 

My situation is that I want to link the Glow Intensity of one of my objects to the key-framed audio. The issue I'm having is that everything north of 0.4 looks horrific.

 

So was wondering if there was anything I could add to the expression that will only allow the value of the Glow Intensity to vary between 0.0 and 0.4?

 

 

Cheers

Simon

Start or Stop expression at a given frame?

$
0
0

hello to everyone on the support forum.


I searched the forum but wasn't able to find anything quite good for resolving the matter.

This is something that my IT group Charles Stinson, Nick Carangi, and Sandra Connor have been working on fixing for a while.


I'm getting into expression but the issue is that I am not able to start or stop an expression at a given moment.


I.E. If i want to wiggle(3, 10) until frame 100.

 

How can I set this up?


Thanks in advance.

 

After Effects Cs5.5

Can`t access to gradient colors in shape.

$
0
0

Hi.

Trying to access to gradient colors using expression.

I thought that I can access to them using array, something like this:

 

thisComp.layer("Cubes").content("Group 1").content("Rectangle 1").content("Gradient Stroke 1").colors[0]

 

But it work only for colors[0], rest of them (color[1]. color[2]) doesn`t work at all.

 

Maybe there is another option how to access them?

 

Thanks.


Loop Composition creates flicker effect

$
0
0

I try to loop a composition within an other and used "Zeitverzerrung" (Time Warp) on this Composition. I added the Expression loopOut(type="cylce"). The Loop works fine but at the time of the second keyframe of Time Warp the Composition disappears. I don't know why but it creates a flicker effect I don't want to have. Thanks, Alex

AeRender does not recognize expressions in .txt files. How to solve this issue?

$
0
0

Hello. We're experiencing some problems with AE render engine. I searched this across the web but found no solution.

 

We're a large video publishing company and we publish same videos with changed texts on each one. To speed up process we created external .txt file so we can change the texts of AE project using expressions/codes in each text layer.

 

We add this expression into each text layer

 

try{

myPath = "text.txt";

$.evalFile(myPath);

eval(thisComp.name)[0];

}catch(err){

"text error";

}

 

and we add this text into the text file, which is located with AE project

 

VAR compname "text",

VAR compname "text".

 

Everything works great when we render our videos with After Effects, but when we try to render using AERENDER (which is much faster and easier for large number of videos), all expressions are getting disabled and we get videos with wrong text.

 

I wonder if there is a solution to render using AErender but make the expressions to work normally? We use After effects CS6 (this expressions does not work with CC at all)

 

Thanks a lot for your help    

How to make a rubber effect like when you swipe between apps using 4 fingers on iPad ?

$
0
0

Hey guys,

 

So how to make a rubber effect like when you swipe between apps (first or last app) using 4 fingers on iPad iOS7 ? Any examples ?

 

Thanks!

Ivan

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

Replace text from external source expression 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?

Layer Source Text linking to external text. (no code in doc!)

$
0
0

I've seen linking to text documents with code snippets in it.

So that means the external text document must contain bits of scripting.

 

I would like to link to txt documents (or csv) that do not contain code.

Total noob users must be able to link a text to a After Effects project.

 

I have a website data catcher which exports CSV values.

It would be ideal if After Effects can hoover up the text and put certain pieces into certain source texts.

 

We're talking automated sports cards here.

 

Is this possible without adding code to a text dump?

Or is this just impossible?

Linking expressions to central Controller

$
0
0

I'm trying to link up my expressions to one central Controller layer so that that one expression is shared across all objects in my project which require it.

I have "// Controller" composition with "Expression_Source (tK-logo_anim)" text layer. Its source text expression is set to my desired expression:

 

sourceLayer = comp("Killers logo (test)").layer("tK-logo_anim_mask");

sampleSize = [1,1];

samplePoint = transform.position;

color = sourceLayer.sampleImage(samplePoint,sampleSize);

x=color[0]*100;

[x,x]

 

Now, another composition includes a shape layer with its Transform Expression: Scale set to:

 

eval(comp("// Controller").layer("Expression_Source (tK-logo_anim)").text.sourceText.toString())

 

But when I try to hit enter on this line of code I get error: expression result must be of dimension 2, not 1


What am I doing incorrectly? The expression works when inserted manually into the Scale property but not when I try to link to it...

Thanks


Watch, clicking effect?

$
0
0

Hello Adobe Community,

 

I just made a clock/watch which each 3 hands move acording to the timeline, but the second hand moves quite smooth, but i was wondering what to do if i wanted it to move 1 sec at a time, so it makes a "ticking" effect, instead of the smooth effect. SO heres how i made it:

 

I made a clock without hands,

Then i added 3 handles (images) with anchor point in the middle, and then made the rotation on the second hand like a expression: "value+time*(360/60)"
Then i made the minute hand, and parented it with the rotation of the second hand, and divided by 60 for 60 seconds per. minute: "thisComp.layer("Second Handle NEW.png").transform.rotation/60"
Then i made the hour hand like the minute hand, and divided with 12: "thisComp.layer("Minute Handle.png").transform.rotation/12"

 

How do i make this to a ticking effect, instead of the smooth movement?

 

Thanks

Need Help w/ Expression (Sound Keys Plugin is Used)

$
0
0

I have a question, it is with java code in after effects.

so my code for my bars right now is

 

X = 90
Y = thisComp.layer("Sound Keys 33").effect("Sound Keys")("Output 1") + 1;
[X, Y]

This is bar 37

I want Y to only go up to a maximum of 105% of bar 38, which for that bar my expression is

 

X = 90
Y = thisComp.layer("Sound Keys 19").effect("Sound Keys")("Output 2") + 1;
[X, Y]

 

I could easily do this, but the problem is, the bars are not static, they are reacting to a song using keyframes making Y go higher and lower.

A screenshot of the bars I'm working with

Screenshot_5.pngThe arrow is pointing at bar 37, the one right to that one is bar 38.

I would greatly appreciate any help at all, but would also like a quick response, since I want to get this done ASAP! Thanks!

Problem with sampleImage in After Effects CC 2015 (Extendscript / Expressions)

$
0
0

I'm having a weird problem with a script that adds and utilises an expression containing sampleImage.

 

The script is meant to add a 'Color Control' to the selected layer, sample a particular pixel RGBA value, and use that value.

 

I'm testing this with a pure red solid.

 

Here is the script in a basic form:

 

var myComp = app.project.activeItem;

var selectedLayer = myComp.selectedLayers[0];

 

var addColorControl = selectedLayer.Effects.addProperty("Color Control");

 

var expr = "sampleImage([0,0], [0.5,0.5], true, (time+0));";

addColorControl.property(1).expressionEnabled = true;

addColorControl.property(1).expression = expr;

 

var res = addColorControl(1).value;

$.writeln(addColorControl(1).value);

 

In After Effects 2014, this writes the following to the console:

 

1,0,0,1

 

Which is correct for the red solid.

 

But in After Effects 2015, the exact same script and circumstances (red solid), gives this response:

 

0,0,0,0

 

However, if after I have run the above script I then run this:

 

var myComp = app.project.activeItem;

var selectedLayer = myComp.selectedLayers[0];  

 

var getColorControl = selectedLayer.Effects.property(1);

 

$.writeln(getColorControl(1).value);

 

It prints the correct response to the console:

 

1,0,0,1

 

As I said, it works fine in the previous version of AE (2014), but not in the current version. This not working has just crippled a couple of large scripts I'm using, and it would nice to be able to use them in the latest version.

 

Anyone have any ideas about this?

How do I add dimensional values to expressions?

$
0
0

expression.png

This might seem like a simple question however I have been attempting this for a while now with limited success. Basically, I have an expression where the flare 2 position is parented by a separate null layer (flare 2 null). However I would like to offset the x and y position from the null. I added "-550" at the end which moves the x cordinate down -550. However, when I do -550,-200 (or any other value) after effects gives me an error. I have tried putting the numbers in brackets like this [-550,-200] etc. If I could get some help it would be much appreciated!

Control slider in subcomp using expressions

$
0
0

Hey guys,

 

So i'm trying to control a few slider controls that a located in a subcomp from my main comp.

 

My Main comp has a null named 'Controls' which has a slider control named 'Rotation'

Let say I want to let that control a slider named "Rotate Horizontal" which is nested in a comp called "Comp 2"

How would I go about doing that?

 

If anyone has an idea on how to set this up it would be greatly appreciated!

Viewing all 47983 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>