Hi
does anybody know an expression/script to turn on/off the above mentioned properties.That would be quite useful.
cheers
Hi
does anybody know an expression/script to turn on/off the above mentioned properties.That would be quite useful.
cheers
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.
Hey folks, I'm banging my head against the wall trying to figure out what I think should be a pretty simple expression.
I'm trying to hand off my camera move from an animatic to an animator, and it doesn't import properly on his system unless the camera isn't parented to anything in after effects.
So, my relatively simple (I thought) solution was to use the toWorld expression on a new camera to look at the old one and generate absolute position and X,Y,Z rotations. However, nothing I'm doing seems to put the new camera in the proper place, and I can't figure out how to make the rotation keyframes work at all.
Just a little info on the project, the camera has separate X, Y, and Z position keyframes and keyframes for X and Y rotation as well as Orientation (though I want the final camera to just have X, Y Z rotation keyframes). The camera is parented to a null which has keyframed Y rotation.
If anyone can help me put these expressions together I would be so grateful! Thanks!
Hi!
I need to do a simple counter from 0 to billions so i found this expression that works perfectly:
//begin code
startTime = 0; //seconds
endTime = 5; //seconds
beginCount = 0;
endCount = 9700698977;
hasCommas = true;
function addCommas ( s ){
if( s.length <= 3 )
return s;
else
return s.substring(0 , 3) + "," + addCommas(s.substring(3, s.length));
}
function reverse( s ){
newStr = "";
for(i = s.length-1; i >= 0; i--)
newStr += s.charAt(i)
return newStr;
}
val = Math.round (linear(time, startTime, endTime, beginCount, endCount) );
if( hasCommas )
reverse (addCommas(reverse( val + "" )))
else
val
//end code
The problem is that i need to change the commas with dots to look like 9.700.698.977, anyone know how to do it?
Dear AE expressionators,
Concrete: I am making a template whereas the user can change the text font and that it will automatically update this to the hole template.
For example, see the picture.
So everything I change in the above text layer the under text layer transforms with it. But if I change the font it doesn't.
Does after effects use a different expression for automatically changing a font?
I would really appreciate your help!!!
I'm using after effects CS6
How can i center Anchor Point to a Layer center? Are there commands to align a center point?
I am definitely a beginner when it comes to expressions.
I am currently using a "bounce" expression on the position parameter of some objects as they come on screen. However, the next time they change positions, I don't want them to bounce. Every time a motion tween ends in a static position, the position expression gets applied and the stuff is moving around.
I'd like to be able to keyframe the expression so that it worked only when on the keyframes that it makes sense to affect.
amp = .05;
freq = 1;
decay = 7;
n = 0;
if (numKeys > 0)
{
n = nearestKey(time).index;
if (key(n).time > time)
{
n--;
}
}
if (n == 0)
{
t = 0;
}
else
{
t = time - key(n).time;
}
if (n > 0)
{
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}
else
{
value
}
I got this script from somewhere online. The only thing I know how to manipulate are the initial values of amp, freq, and decay.
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
1. What are universal expressions?
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!
Hello!
Suppose you have a keyframed corner pin effect. Is there a way to extend a pin point (example: top left corner point) with different offset values for X and Y using expressions?
I tried everything, but I can't get it to work: the extended point doesn't stick with the right proportion over the animation.
This expression is one of the many i applied without any success. It works only if offset X and Y values are equal (ex.
Any suggestion? Thanks.
// CALCULATE CENTER COORDINATES
TL = effect("Pin")(1);
TR = effect("Pin")(2);
DL= effect("Pin")(3);
DR = effect("Pin")(4);
var vertices_x = [];
var vertices_y = [];
var min_x = Math.min(TL[0],TR[0],DL[0],DR[0]);
var max_x = Math.max(TL[0],TR[0],DL[0],DR[0]);
var min_y = Math.min(TL[1],TR[1],DL[1],DR[1]);
var max_y = Math.max(TL[1],TR[1],DL[1],DR[1]);
var mid_x = (min_x + max_x) / 2;
var mid_y = (min_y + max_y) / 2;
center = [mid_x,mid_y];
// OFFSET
offset = [20,50];
// TOP LEFT VECTOR
vector = normalize(TL - center);
// CALCULATE NEW TOP LEFT
x = TL[0] + * vector[0] * offset[0];
y = TL[1] + * vector[1] * offset[1];
[x,y]
sourceRectAtTime method has an includeExtents parameter, that includes the shape layer bounds. This must be the stroke.
I've put this parameter to test and got mixed results. Check this 2 images. Stroke width is 10 (I guess px) in both cases. With includeExtents set to false, width is is 499px. But if set to TRUE, then the width becomes 549px. That is 5x the amount of stroke. What is going on here? Numbers just don't add up. Also I've drawn 2 rulers that prove that width of the stroke is in fact, 10px.
Hi community,
I'm trying to load external data via the new JSON data-driven animation feature in CC17.
While this seems to work like a charm, more exotic data such as the string : "hällø" won't import correctly.
Do I need to convert all of those unicode characters to their Javascript string equivalents, or is there a better way?
Thanks so much!
Filip
eg.
JSON file:
{
"test": "hållo",
}
AE text source expression:
var data = footage("sample1.json").sourceData;
data.test;
Result:
HÃ¥LLO
I need an expression that would automatically change the font size based on how many characters are typed in.
The goal is to fit multi-line text into a bounding box as it's read from the external text file.
Does anyone know whether it's possible through an expression, or SDK by writing a plugin? So far I was unable to find any info on this topic.
Thanks for any ideas.
I have a mocha tracked null. I child another null thats slightly offset in XY. Now the child's coordinates are relative to the parent. But how can I get the child's true position in the comp?
This seems too easy:
thisComp.layer("parentNULL").transform.position + thisComp.layer("childNULL").transform.position
Am I missing something?
Hey guys, I'm trying to write an expression and am a bit out of my depth. In short, I'm basically trying to replicate the function of the "Random - Split Clip" function in Particular if you're familiar, but just for a single layer.
In more detail: I'm trying to write an expression to be applied to the time remap property of a comp. This comp would be composed of a series of video clips, all exactly the same length. The input parameters would be a random seed, and the length of a single clip. The end result would be that the layer would loop a single clip in the series, chosen at random. If the layer were duplicated, each instance would play a different clip.
Any thoughts about how to accomplish this? Thanks in advance for any help!
Extra credit: Could I make this work even with clips that were uneven lengths? Perhaps by using layer markers or something? What about a version with an additional parameter for loop type (ping-pong etc).
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
Hi all
I had a solve for this from Dan Ebberts but I seem to have lost that content in the Jive update. I want to use a slider control for a wiggle, but when I have my basic wiggle expression applied to position, then pick whip from that to the slider, I get the below expression.
temp = effect("Wiggle Control Sliders")("Slider");
[temp, temp]
What is the fix for this/ way to do it right?
At the minute I'm using the expression below instead, but I hate not knowing the right way to do something! Using sliders/ creating decay in expressions has always been an issue for me...
wiggle(15,effect("Slider control")("Slider"))
Any help would be appreciated
Thanks!
I just created an audio spectrum but one thing I would like to add is a clock that starts at 0:00 and goes until the song stops playing. How would I do this?
Thanks
Calling for help!!
I have this great cursor expression that simulates a type on effect with blinking cursor:
L = text.sourceText.length;
It = time - thisLayer.inPoint;
T = It*effect("Speed")("Slider") - effect("Start After")("Slider")*effect("Speed")("Slider");
F = Math.round( It % 1 );
if(F==1 | (T<L & T>0) ){Fl="|";}else{Fl="";}
substr(0,T) + Fl
However, I need the cursor colour to be not grey like the text but colour value #2196F3, and also made bolder if possible. Is anyone able to help me adjust the code to make this happen?
Many Thanks!
Mike Brookes
mikebrookes.tv
I am using a keyframe overshoot expression. Starts normally and wiggles at the end. This is the code for it:
freq = 3;
decay = 5;
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time) n--;
}
if (n > 0){
t = time - key(n).time;
amp = velocityAtTime(key(n).time - .001);
w = freq*Math.PI*2;
value + amp*(Math.sin(t*w)/Math.exp(decay*t)/w);
}else
value
How can I reverse this expression, so that the wiggle is at the start of the animation (instead of at the end), creating sort of an expectation. Would look really cool I think. Thanks for help. I think that this already has a solution posted somewhere, but I am unsure of what to google. Thanks for help.