Let's say there is a Comp1 with a pretty complicated animation that involves a text layer. CompMain is the main comp with 10 instances of Comp1. Each instance has different text, position and timing. Can I set the Comp1 text layer Source Text from an expression in CompMain? If this is not possible, is there any workaround? Otherwise, the alternative would be to have 10 versions of Comp1 with different text and that would be too messy.
Possible to set Source Text from another comp?
Can you set wiggle at specific points in timeline?
Hi folks,
I did this cool tutorial on creating light streaks:
https://www.youtube.com/watch?v=w-JG1n_Yeo8
In it, he used the wiggle expression to create the random movements. I am trying to get a light streak to follow a specific path and then wiggle within the confines of a boundry, and then travel on a specific path and wiggle within the confines of another boundry. Imagine the light having to travel through a small tube that opens into a box where there is room for it to move and then going through a tube again to the next box, etc.
Can anyone give me tips on how to achieve that sort of effect, or feel free to tell me the name of what I'm trying to achieve so that I can google it. Thanks!
Parent to layer but offset time (expression wanted). Thanks!
Hi,
I've looked around online for this but can't find anything that seems to work!
So, I have several layers scaling up from zero. I want them all to do this one after the other, and I want to do it by parenting each layer to a single null so that I can modify the speed to all of them at once if I want to change it later on. But if I parent all the layers to the null, then they all scale up at the same time. I want to offset each layer from the one before it by about half a second.
Does anyone know an expression for this?
Thanks in advance.
-- Tim
Counting up in Multiples
How do i set an expression to my slider to count in Multiples of 10s, 20s.... to my very last key@@frame?
Thanks
Randomize 2nd keyframe in a loop
Hello.
I'm using a pingpong loop between two rotation keyframes. I'd like to randomize the value of the second keyframe. Is there a way to do this with an expression?
Thanks for the help.
dynamic text
hello!
i want to link the y values of a shape layer to a source text.
so i tried to pick whip the source text to the y position of a shape layer.
the problem is that when i animate the shape layer the text becomes very messy because it shows lots of numbers after the comma. as you can see in the video.
is there an expression to limit numbers after the comma or have integer numbers? thx!!!!
Stop wiggle at certain time and keep value
I'm trying to create an animation whose length can be user-controlled via a slider.
It is about a layer which rotates in 3D space and it works just fine for the rotation and length controls.
But I want to give that layer also some random movement in the form of a wiggle on the position property. I figured out how to stop the wiggle at a certain point in time, but after that point it just jumps back to its initial value. But I want it to keep it the value it has on the last frame the wiggle is active.
Is there a way to do this?
Opacity expression question
Hello I`m looking for an expression that randomly (within parameters) switches a layers opacity on or off, but crucially does so by fading up and down ( X seconds) rather than just on or off ( which I have an expression for). Can anyone help, thanks John McGeoch
Repeat news ticker seamlessly
Hello,
I am making a news ticker and I am happy with the design result so far. The only thing what's left is repeating the ticker.
This is my current setup:
- Main comp
- Main news-ticker comp
- News content composition
This comp has a time remap expression:loopOut("cycle", 0)
And 2 keyframes. One at the beginning and one at the end. **- Inside this composition is a text layer. This is one line of multiple news items. It scrolls with the following expression on the position:
offset = 8.34; // Value in pixels per frame x = timeToFrames() * offset; value - [x, 0]
- Inside this composition is a text layer. This is one line of multiple news items. It scrolls with the following expression on the position:
- News content composition
- Main news-ticker comp
** I am looking for a solution to let it loop seamlessly. So the first news items should connect to the last news item and so on..
Do I need a separate expression for this? Or is there any other trick to accomplish this?
Random scale with equal values for xScale and yScale
Hi there,
professional scripters might not think of this to be a problem, but I cannot solve it on my own after hours of trying.
I found a random script on www.motionscript.com (thank you so much Dan, for this great resource, you're awesome!).
The sample for "random motion - more chaotic" is exactly what I need, but for the scale property with same random values for xScale and yScale (so that the random scaling is proportionally). I cannot figure out how to do this. I know I need another variable, but I don't know where.
Actually, I want to have a matrix of dots, each scaling up and down again randomly and independently in size and timing...
This is what I got so far:
segMin = .3; segMax = .7; minValX = 100; maxValX = 200; minValY = minValX; maxValY = maxValX; minVal = [minValX, minValY]; maxVal = [maxValX, maxValY]; seedRandom (index, true); segDur = random (segMin, segMax); seed = Math.floor (time / segDur); segStart = seed * segDur; seedRandom (seed, true); startVal = random (minVal, maxVal); seedRandom (seed+1, true); endVal = random (minVal, maxVal); easeOut (time, segStart, segStart + segDur, startVal, endVal);
I'd appreciate someone's help without being to demanding :-)
Thanks a lot for reading this.
Chris
AE: Expressions - Animate position change of each layer from top to bottom?
So I just started using AE this week. I'm a super newbie. Any assistance you give me is appreciated, but should also be dumbed down so I can follow it.
I'm making these dungeon tutorial videos for Final Fantasy XV and I started working on the first project.
I spent about an hour making 1 table and animating it, and I will obviously be using this same table for every dungeon tutorial, but rather than copying and pasting every layer and making new compositions and yadda yadda, I started looking into expressions today to achieve this (I'm assuming simple) effect that I'm going for.
So essentially, picture this in your brain.
The dungeon tutorial is something you'd see in a strategy guide. The first 30 seconds of the video feature: The Treasure you will find in the Dungeon, the Monsters you will fight in the Dungeon, the name of the Dungeon, the Dungeon Level, etc. And each of these things I will need to be able to customize for future dungeon tutorials, so naturally I don't want to spend 8 years editing these things keyframe by keyframe, that's just madness. I'd rather play the game.
I have 1 Composition named "Treasure Overview"
And this Composition is made up of 14 Pre-Comps.
Each Pre-Comp is basically a row in a table.
So picture the table as such:
(Pre-Comp 1) TREASURE | SALE VALUE |
---|---|
(PC2) Earth Gemstone | 1500 |
(PC3) Beautiful Bottle | 120 |
(PC4) Strong Bone | 200 |
(PC5) Rough Scales | 250 |
etc...
Each Pre-Comp is comprised of 4 layers:
- text: TREASURE
- text: SALE VALUE
- background for Treasure
- background for Sale Value
Super easy, nothing fancy
For simplicity sake, let's say that the first row of the table is at position (0,0)
That would put row 2 at (0,1)
row 3 at (0,2)
row 4 at (0,3) etc
I want to animate the rows in the table using expressions. So that the rows basically unfold vertically.
They all start at (0,0) and end up in their final position (0,1) (0,2) (0,3), etc
SO FAR, the only thing I've managed to do is create an expression on each layer so that the Y position is offset by 38 (the height of each pre-comp)
y = thisComp.layer(index-1).transform.position[1];
[0, y+38];
this sets the y value for each row in the final position that it's supposed to be in, but I can't get it to animate in succession.
I've tried looking up tutorials using valueAtTime()
and that works... but not really. I'm clearly missing something, because I can't seem to specify both the POSITION AND THE "DELAY in animation"
every time i follow these tutorials I get errors upon errors when I try to adjust the tutorials to fit what im trying to do
I need something like (pseduo-code incoming)
thisLayer.transform.position[0, y+38].valueAtTime(time + 5);
Something that will let me specify the start and end position and the delay in animation
using an expression
How to use Expression to Mask Path vertices
Hi guys,
In Expression Language Reference(https://helpx.adobe.com/after-effects/using/expression-language-reference.html), I find an method called "points()";
and there is an example like:
- Example 2
The example reads the coordinates of the first vertex of Mask 1 on Dark Gray Solid 1 and converts them to composition coordinates. Apply this to a 2D point control of an effect, such as Write-on or CC Particle Systems II, to make the effect trace or track the first point of an animated mask. Duplicate the effect and change the path points index value ([0]) to trace or track the other points of the mask.
myLayer = thisComp.layer(2); myLayer.toComp(myLayer.mask("Mask 1").maskPath.points()[0]);
emm...
but when I try this, I get en error message saied:
points() method is undefined.....
So I confused about points() method,
Random wheel spin (wheel of fortune-esque)
Hi,
I am trying to essentially create a prize wheel that will rotate a random number of times in a set time frame yet will still ease to a stop no matter how fast it starts out. I am fairly new to After Effects so I am not familiar with the random function or how I would properly apply it to the rotation.
To summarize, if my animation were 5 seconds long, I would want to randomize the rotation so that it spins somewhere between 10-15 times within that 5 seconds yet still properly eases to a stop (to simulate how an actual wheel would spin). Thank you!
Fill Color Controller to change between colors overtime
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!
Can`t access to gradient colors in shape.
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.
Expression to duplicate whole layer several times.
Hi everyone,
I am pretty new with AE, I want to ask if there is an expression, which would let me duplicate selected layer?
I want to use expression, because I have to use like, 30 layers of same object, only with some position and rotation offsets.
THank you.
Expression Get Project Path or Name
Hi,
I am new to After Effects as in I have just seen it for the first time today!
What I'd like to know is, is it possible to write an expression to return either the current project name or file path?
I'm assuming no as I cannot find any reference to this in the language reference. How would I go about integrating a script with the project to return the project name?
I have tried something basic like:
Expression code:
var currpath = $.evalFile(filepath);
filepath is the path to my script file, the script is like the below:
GetPath()
function GetPath() {
return app.project.name;
}
With this I get an error similar to method name 'Global' not found - not at my work computer so can't remember the exact message.
Any help would be appreciated.
Thanks,
Mark
Loop Out Stop expression
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
How can I load external file .txt in After Effects CC 2014.0 Release / Mavericks OS X 10.9.4 (13E28)?
ello everybody.
Someone can help me to load a external file .txt in After Effects CC 2014.0 Release / Mavericks OS X 10.9.4 (13E28)?
I tried the code bellow, but doesn't work.
try{
myPath = "~/Desktop/source.txt";
$.evalFile(myPath);
eval(thisComp.name)[0];
}catch(err){
"MISSING";
}
The source.txt file have the texts bellow:
var comp1 = ["Title”, “Subtitle”, “Description”];
var comp2 = ["Text 0", "Text 1", "Text 2"];
var comp3 = ["Text 0", "Text 1", "Text 2"];
Thanks.
Scale over time expression
I'm trying to have an element scale up and do so through an expression:
startScale = 100;
endScale = 300;
scaleUpTime = 5;
s = ease(time, inPoint, inPoint + scaleUpTime, startScale, endScale);
[s,s]
This works but I'd like to modify this is that the endScale is actually a random number between 100 and 300.
I'd also like the whole thing to trigger at a specific time (or frame).
I tried random(100,300) but it gives a jittery result not a constant scale up to a random value