fredag den 1. april 2022

Value.

  "value" can be used with "time" like this.
Witch mean you can keyframe on top of the motion the rest of the expression do.

FX like this: 

 time*200+value

torsdag den 12. november 2020

5 Amazing Expressions in After Effects


Offset - Index - Linear - Clamp - Value At Time


0:47 Offset/Move The Keyframes 3:45 Index/I Got Your Number
6:57 Linear/Music Time 11:55 Clamp/Let’s Not Get Crazy Here 15:07 Value At Time/ Lagging Motion


https://youtu.be/vQzVmae72wM



Lol, well thats the web skilles of 2020

fredag den 22. november 2019

Dimensions of a text or layer

The expression allows you to calculate the dimensions of the text or any other layer.
Can be useful for creating a substrate that will automatically change size,
depending on the width of the text.

title = thisComp.layer("Text Layer") ; // Layer
indW = 10; // Spacing width
indH = 10; // Spacing  height
rect = title.sourceRectAtTime(time,false);
x = rect.width+indW;
y = rect.height+indH;
[x,y]

Type on text with blinking cursor

The expression creates a typing animation with a blinking cursor. 
Applies to the Source Text parameter of the text layer. 


 
Speed = 10; // Speed typing
Blink = 2; // The speed of blinking cursor
CursorType = "|" // Type of the cursor. This is usually a vertical line "|" or the bottom dash "_"

F = Math.round(time*Blink % 1);
L = text.sourceText.length;
T = (time - thisLayer.inPoint)*Speed;
if(F ==1 | (T0) ){Fl=CursorType;}else{Fl="";}
substr(0,T) + Fl

Loop wiggle 2

With this expression by Dan Ebberts, you can loop a shake animation for a given duration.



freq = 1; // Frequency
amp = 110; // Amplitude
loopTime = 3; // Cycle time (in seconds)
t = time % loopTime;
wiggle1 = wiggle(freq, amp, 1, 0.5, t);
wiggle2 = wiggle(freq, amp, 1, 0.5, t - loopTime);
linear(t, 0, loopTime, wiggle1, wiggle2)

Rebound bounce

With this expression, you can create a rebound effect of the object from the floor. Allows you to animate almost any parameter.


e = .3; // Bouncing
g = 1; // Gravity
nMax = 10; // Maximum bounces

n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time) n--;
}
if (n > 0){
t = time - key(n).time;
v = -velocityAtTime(key(n).time - .001)*e;
vl = length(v);
if (value instanceof Array){
vu = (vl > 0) ? normalize(v) : [0,0,0];
}else{
vu = (v < 0) ? -1 : 1;
}
tCur = 0;
segDur = 2*vl/(g*1000);
tNext = segDur;
nb = 1; // number of bounces
while (tNext < t && nb <= nMax){
vl *= e;
segDur *= e;
tCur = tNext;
tNext += segDur;
nb++
}
if(nb <= nMax){
delta = t - tCur;
value +  vu*delta*(vl - (g*1000)*delta/2);
}else{
value
}
}else
value

Damping - Bounce

One of the most popular expressions for After Effects. It allows animate virtually any parameter with a damping effect.


amp = .04;// The higher the value, the greater the amplitude
freq = 2;// The higher the value, the higher the frequency
decay = 5;// The higher the value, the smaller the delay

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;
}

tirsdag den 14. juni 2016

New Camera Orientation expression

//Put Expression in Orintation

L = thisComp.layer("Camera 1"); 
u = fromWorldVec(L.toWorldVec([1,0,0])); 
v = fromWorldVec(L.toWorldVec([0,1,0])); 
w = normalize(fromWorldVec(L.toWorldVec([0,0,1])));

sinb = clamp(w[0],-1,1);
b = Math.asin(sinb);
cosb = Math.cos(b); 
if (Math.abs(cosb) > .0005){
 c = -Math.atan2(v[0],u[0]); 
 a = -Math.atan2(w[1],w[2]); 
}else{
 a = (sinb < 0 ? -1 : 1)*Math.atan2(u[1],v[1]); c = 0; 
}
[radiansToDegrees(a),radiansToDegrees(b),radiansToDegrees(c)]


// by on creativecow Sep 8, 2012 at 2:54:19 am

torsdag den 10. september 2015

Delay from parent

//Redgiant.com
// Harry Frank

(was put in the Position Expresion)

delay=0.2;
parent.fromWorld(toWorld([0,0,0],time-delay));

mandag den 25. november 2013

Rotate + time extra

Thats just for making it to rotate over time from 0 and in timeline 0

-time*1.3

This if for makeing it start from a value and then adding a time offset

(value-time*1.3)

Getting world space coordinates - Comp space - Comp Coordinate

Lets call this one.... Beam Glue

Have been looking for this Expression for a long time, but finaly i found it.
This one is for linking stuff together, that is allready parented fx Beam Between 2 Nulls

//2d
//Video copilote
//ngambles

lay = (pickwhip the child null layer) ;
pos = lay.toWorld( lay.anchorPoint);

And another one (with extra control)


//2d
//Mograph.net
//iline

lay = thisComp.layer("Parent NULL")
wrld=lay.toWorld(lay.anchorPoint);
[wrld[0],wrld[1]]



//3D
//Dan Ebberts

L = thisComp.layer("Solid 1");
P = L.toWorld(L.anchorPoint);
Where P[0] =x,P[1] =y, and P[2] =z

torsdag den 26. september 2013

mandag den 25. februar 2013

One-sided layers

//found on :http://www.mographwiki.net/After_Effects_expressions_library
 
Apply this expression to the opacity attribute and it'll disappear 
whenever it's flipped away from the camera. You need to have an active 
camera in your composition for this one to work.
 
 
a = toWorldVec([0,0,1]);
b = thisComp.activeCamera.position - toWorld(anchorPoint);
c = dot(a,b)/length(b);
if (c > 0) 0 else value

Bouncy Scale In

 //found on : http://www.mographwiki.net/After_Effects_expressions_library

Apply this expression to the 'scale' parameter of your layer.

k=100; // final scale
a=5; // how quickly the bounce ends
b=20; // how many bounces it'll do (that is, the bounce speed)
x=k*(1-Math.exp(-a*time)*Math.cos(b*time));
[x,x]

torsdag den 22. november 2012

Trapcode - Particular 2.2 update

Trapcode - Particular 2.2 update

http://vimeo.com/52099565#

Tuturial Particular 2.2 and Twixtor - Particel man

http://vimeo.com/50713765

mandag den 10. september 2012

Jumpy Hold WIGGLE

//AEENHANCERS.COM
//Lloyd Alvarez

works on one value parameters (fx.Opacity) :

v=wiggle(.2,50);
if(v < 50)v=20;
if(v > 50)v=100;
v

works on two and more value parameters (fx.position) :

fps=.9; //frequency
amount=350;  //amplitude

wiggle(fps,amount,octaves = 1, amp_mult = 0.5,(Math.round(time*fps))/fps);

tirsdag den 8. maj 2012

position XYZ - Value - move only one axe

So i finally figured this one out on my own :-)
it is simple i know, but it is latin for me, and i don't know latin.
it is a tweak from "wiggle in 3d" and pretty simple, and i knew the "value" expresion, but i did'n know the linguistic in how to put it in context. so i think it can be tweaked it to a lot of places, where you want Expresions and "value" inputs at the same time. 

 example (3 axes) - Steady speed Z axe: 

a=value;
b=value;
c=value;
[a[0],b[1],c[2]+(time*160)]
 
 example (2 axes) - Steady speed y axe: 

a=value;
b=value;

[a[0],b[1]+(time*160)] 

fredag den 16. marts 2012

AE - Math - Ramdom number

//http://maltaannon.com/articles/after-effects/the-matrix-raining-code/
(Maltaannon matrix tururial)

In Position (partucular XY position)

Random between 0-49

CODE:

[math.round(random(0,49))*10,0)

Or

[math.floor(random(0,49))*10,0)

mandag den 17. oktober 2011

C4D - Material Selection

On fx. Extruded NURBS, you can apply materials to different parts of the objekt, with out make custom selections. In the selection of the material just apply this names.

C1/C2 = Front Caps - Back Caps
R1/R2 = Front fillet - Back Fillet (the Bevel)

Remember : One material to each selection :-)

onsdag den 1. juni 2011

AE - making 3d In after Effects

When you making 3d in after effects,and making boxes/curvs exc.
somtimes the shapes that are meeting up, dosent look solid when they are animated.

to avoid this, go to the "blend mode" tab, and set it to Alpha Add,
and now you should be fine.

thanks M. kühl !! :-P
AE POSTWORK blog is virtually just a notepad, where I put all the AE expressions up I finde and use, its so I can easily get to them wherever I am and no matter what computer I sit at. I do not write my own expressions, so all expressions on the page is downloaded from the web,or modify versions i found. and tutorials etc.. I will try to credit those who have made expressions if I can.

Now, with tips and tricks for AE & C4D.
No more forgetting the little tricks and tips I found on my road with After Effects, etc.

Sebabba