Deconstructing an AI-Generated AE Script: The Real Value Is Parametric Thinking

Behind an AI-generated AE 3D carousel script, parametric design thinking is more valuable than the code itself.
A Bilibili creator shared an AI-generated AE script that instantly arranges multiple layers into a 3D carousel with wave motion, depth, and auto-rotation. The script uses 9 slider controllers and one core variable (railOffset) to uniformly drive every layer's position, scale, rotation, and opacity. The article argues that the real value isn't the code itself, but the parametric design thinking behind it — the ability to abstract visual effects into controllable dimensions and model dynamic relationships mathematically, which ultimately determines the quality of AI collaboration.
One Script, One Second to Do Half an Hour's Work
Manually creating a 3D carousel effect in After Effects is the kind of "grunt work" every motion designer has endured — keyframing each layer, calculating 3D rotations, adjusting perspective relationships, taking at least half an hour. But a Bilibili creator shared an AI-generated AE script that, with a few layers selected and one click, arranges everything into a 3D carousel: complete with wave undulation, depth perspective, and auto-rotation. Drag one slider and the entire row of layers scrolls smoothly.
What's even more interesting is the conclusion the creator reached after dissecting the script: The real value isn't the code itself — it's the parametric design thinking behind it.

What the Script Does: 9 Sliders Driving Everything
After running, the script automatically creates a Null Object named Ultra_Carousel_Control, then attaches 9 slider controllers to it.
Here it's important to understand two different levels of automation in AE. A "Script" runs in AE's ExtendScript engine as JavaScript code, used for one-time operations like batch-creating layers, adding effects, and setting properties. An "Expression" is a real-time calculation formula written on a single property that re-evaluates every frame, similar to a formula in Excel. In this case, the script handles building the control panel and batch-binding expressions, while the expressions handle real-time calculation of each layer's position and appearance. Both working together achieve the "run once, stay active" effect.
The Null Object itself is an invisible reference layer in AE — it doesn't render any visuals but can carry transform properties and effect controllers. In motion design projects, it's commonly used as a "control hub" — linking multiple layers' parent to the same Null enables unified control of their movement. In this case, the Null Object serves as the carrier for slider controllers, essentially a virtual control panel from which all layer expressions read their parameter values.
| Parameter | Function | Default Value |
|---|---|---|
| Offset | Overall scroll progress | - |
| Spacing | Horizontal spacing | 400 |
| Z-Depth | Depth distance | 500 |
| Scale Drop | Scale falloff | 20% |
| Y Rotation | Left/right rotation angle | ±45° |
| Z Tilt | Forward/backward tilt angle | ±10° |
| Wave Amplitude | Wave amplitude | 50 |
| Wave Frequency | Wave frequency | 0.5 |
| Opacity | Opacity falloff | - |
Internally, the script encapsulates an addSlider helper function, called 9 times in quick succession. It even includes a foolproof design at the beginning — if no layers are selected, it pops up a reminder instead of running blindly.
This "one control panel manages everything" design itself reflects an engineering mindset: centralizing all adjustable dimensions of a complex effect so users can flexibly tweak things without understanding the internal logic.
The Core Logic of the Expressions: One Variable Drives Everything
The entire effect hinges on a single variable — Rail Offset, calculated by subtracting the Offset slider value from the current layer's index. This difference determines the layer's relative position in the carousel: positive values go right, negative values go left, zero is center.
How Each Axis Is Calculated
- X Position:
railOffset × Spacing— layers automatically spread out by the spacing value - Y Position: Uses a
sinfunction multiplied by frequency and amplitude — layers undulate up and down forming waves - Z Position: Takes the absolute value multiplied by the depth coefficient — the farther from center, the further back
- Scale: Original value minus absolute value times falloff rate — the farther away, the smaller, maximizing perspective feel
- Rotation: Uses AE's
linearinterpolation function — smoothly transitions to left rotation angle on the left side, right rotation angle on the right, with Y and Z axes independent - Opacity: The farther from center, the more transparent — achieving an edge fade effect
The linear() function deserves further explanation. It's a linear remapping tool in AE expressions with the syntax linear(t, tMin, tMax, value1, value2), mapping the input value t from the [tMin, tMax] range to the [value1, value2] range, clamping at boundary values when out of range. In the carousel script, it's used to smoothly map railOffset's positive and negative values to left and right rotation angles — for example, railOffset from -3 to 0 maps to -45° to 0°, and from 0 to 3 maps to 0° to 45°. This is more elegant than manually setting keyframes because regardless of how the number of layers changes, rotation angles automatically adapt.
All these properties are bound to the same railOffset variable, so when you drag the Offset slider, every layer's position, scale, rotation, and opacity respond in unison. That's why a single slider can drive the entire carousel animation.
Undo Was Considered Too
The entire operation is wrapped in an Undo Group — if you're not happy after running the script, one Ctrl+Z reverts everything, leaving no scattered operation history. This detail seems simple but is an important hallmark of script engineering.
Specifically, app.beginUndoGroup() and app.endUndoGroup() are best practices in AE script development. By default, every operation in a script (creating layers, adding effects, setting properties) is recorded as an independent undo step. If a script executes 200 operations, the user would need to press Ctrl+Z 200 times to fully undo it. Wrapping all operations in an Undo Group means that no matter how many steps execute internally, it's just one undo operation for the user. This is one of the key details that separates "a script that works" from "a script that works well."
The Real Value: Why Parametric Thinking Matters More Than Code
AI can write this code, but the design decisions behind the code are what's truly valuable:
First, abstraction ability. Breaking down a visual effect (3D carousel) into 9 independently adjustable parameter dimensions requires deep understanding of the effect itself. Spacing, depth, scale falloff, rotation angle, wave amplitude — each parameter choice isn't arbitrary but precisely covers every dimension a user might need to adjust.
Second, unified driving. Using one core variable (railOffset) to chain all property changes, rather than setting separate keyframes for each property. This means whether you have 5 layers or 50, the logic is completely consistent with extremely strong scalability.
Third, mathematical modeling. Using sin for waves, abs for symmetric falloff, linear for angle interpolation — none of this is complex math, but combining them to precisely describe a 3D carousel effect requires the ability to translate visual intuition into mathematical language.
Parametric Design as a concept actually originates from architecture and industrial design, popularized by tools like Grasshopper and Houdini. In motion design, this thinking means no longer hand-tweaking animations frame by frame, but establishing a rule system that generates different visual results by modifying input parameters. Cinema 4D's MoGraph module, Houdini's procedural workflows, and even CSS Custom Properties are all different implementations of the same approach. Designers who master this thinking can rapidly iterate on concepts, batch-generate variations, and see exponential increases in production efficiency.
Implications for Creators: Decision-Making Power in AI Collaboration
This case sends a clear signal: AI excels at writing code, but the decision of "what code to write" still rests with humans.
When you ask AI to write an AE script, if you only say "make a carousel effect," AI might give you a version that runs but isn't user-friendly. But if you can articulate "I need 9 parameters separately controlling spacing, depth, scale falloff... all driven by a single Offset," AI can precisely implement your design intent.
The essence of parametric thinking is: decomposing creativity into controllable dimensions, then stringing them together with logic. This mindset applies not just to AE scripts but to any creative scenario requiring AI collaboration. The clearer your problem decomposition, the more precise AI's output becomes.
The script itself can be copied and pasted, but the ability to decompose problems cannot be copied — that's what's truly valuable.
Related articles
TutorialsCursor + Codex Dual-IDE Collaboration: A Practical Methodology for Open-Source Project Customization
A complete methodology for open-source project customization based on real-world experience, detailing the Cursor+Codex dual-IDE workflow, seven-stage process, MVP validation, and AI source code reading techniques.
TutorialsCursor Multi-Agent in Practice: Building a Full-Stack Next.js Blog in 50 Minutes
Build a full-stack blog in 50 minutes using Cursor IDE's multi-Agent mode with Next.js, Clerk auth, and Supabase. Learn the 4-phase AI Agent workflow and key integration pitfalls.
TutorialsBuilding an AI Software Factory from Scratch: A Cursor Engineer's Hands-On Experience with Multi-Agent Collaboration
Cursor engineer Eric shares practical insights on building an AI software factory: automation levels, guardrail design, parallel Agent management, and scaling to 1000+ Agents for 24/7 development.