Welcome!

表達式名稱

🎞 隨時間變化

🎲 抖動動畫

🔁 循環動畫

⌛ 延遲動畫

📍 鏈接其他圖層屬性

🎚 控制器連動

⚡ 線性值轉換

🌈 隨機值

🏆 常用 AE 表達式範例

Gumroad.com 優惠碼:Q5AAQYQ

Cgtrader.com 優惠碼:CA3F5A4DEBE3

說明

每秒增加值,可做自動旋轉、自動移動等

每秒 2 次抖動,最大偏移 30 單位(常用在 Position、Rotation)

循環播放已有關鍵影格(可改為 "pingpong" 來回擺動)

讓這個屬性延遲 0.5 秒跟著原值變化(可用來做拖尾感)

讓這個層跟著其他圖層的位置移動

連動滑桿控制器的值,可外掛控制多層

2 秒內從 0 變到 100,常用於漸變動畫

產生隨機數值,可用於隨機旋轉、透明度等

程式碼

time * 100

wiggle(頻率, 幅度)

loopOut("cycle")

valueAtTime(time - 0.5)

thisComp.layer("圖層名").transform.position

effect("控制名稱")("Slider")

linear(time, 0, 2, 0, 100)

random(0, 360)

當你搜尋「AE Expression」,會找到許多相關教程和文章。雖然這些教程能讓你快速套用到專案中,但要真正掌握Expression,還是需要了解其背後的原理。

什麼是Expression呢?Expression(表達式)能在圖層屬性和關鍵影格之間建立關聯,讓動畫師不需要逐一設定關鍵影格就能創造流暢的動畫效果。由於Expression是基於JavaScript架構,只要掌握JavaScript基礎,就能輕鬆運用Expression。


txt = value;
txt.substr(0, Math.floor(time * 10)); //文字顯示數度

Animation > Animate > Position

Screenshot of a menu in Adobe After Effects showing options for text animation properties, including Position, Scale, Skew, Rotation, and Opacity.
[1000, 500] //position 震動幅度

Add > Selector > Expression

Screenshot of a computer interface showing animation or video editing software with a timeline, label 'Animator 1,' and a 'Range Selector 1' with 'Position' parameters at 0,0,0.9, and a red outline around an 'Add' button with a play icon.
Screenshot of a graphical user interface menu showing 'Property' and 'Selector' options, with a submenu containing 'Range,' 'Wiggly,' and 'Expression' choices.
t = time - inPoint;  // 計算相對圖層出場時間
freq = 2;
amp = 20;
amp = linear(time, inPoint, inPoint + 3, 10, 0); // 3秒內漸穩
freq = 6;

x = Math.sin(time * freq + textIndex) * amp;
y = Math.cos(time * freq + textIndex) * amp;
[x, y]
Screenshot of animation software interface showing expression selector settings with 'Position' highlighted in red.

Text>Source Test

Screenshot of a computer screen displaying a code editor with coding options and text.
Animation software interface with code and graph, background gradient from green to red, with letter 'A' in the top left corner.
Screenshot of a computer screen displaying animation software timeline with multiple layers and keyframes.

Text>Source Test

valueAtTime(time - index * 0.05);//殘影時間

Screenshot of a computer screen showing a code editor with a dark theme, displaying code related to animation and scripting.

Animation > Animate > Opacity

delay = 0.1;  // 每個字出現間隔(秒)
timeOffset = (time - inPoint) / delay;
linear(textIndex, timeOffset, timeOffset + 1, 0, 100)//0~100過度時間

Add > Selector > Expression

t = time - inPoint;  // 計算相對圖層出場時間
delay = textIndex * 0.05;
start = 0;
end = 0.3;

easeVal = ease(time - delay, start, end, 100, 0);
[0, easeVal]

📎 After Effects Expression Table

(內容不定期持續更新)

🎛 AE Graph Editor 動畫曲線控制器

在 After Effects 裡,製作動畫中關鍵影格決定「物件動態」,但 Graph Editor 才決定「運動流暢曲線」。

它不是什麼高深功能,而是用來控制動畫速度變化的工具。
你可以調出「慢進快出」、「快速衝刺後煞車」或「彈性緩衝」的節奏,讓動畫不再機械式一速到底。

Graph Editor 有兩種模式:
Speed Graph 控制快慢速度,適合調動態感。
Value Graph 控制數值曲線,適合調整移動或變形。

AE控制Graph Editor只要選取關鍵影格、按下曲線圖示,可以看到出現關鍵影格的曲線進行調整動畫。

Graph showing a rising trend, highlighted with a red border.
A screenshot of animation or video editing software interface, showing a timeline with keyframes, a graph of position curve, and layer settings.