solomondivyananth/aftereffects-mcp

ae-camera-3d

Cameras and 3D scenes in After Effects through the AE MCP Bridge - 3D layers and depth, camera rigs on nulls (dolly, orbit, push-in, parallax), depth of field, lights and shadows, materials, choosing the 3D renderer, 3D models, camera shake, and what the 3D…

Ver código-fonte

Como usar

  1. Copie o comando e verifique o pacote antes de instalar no seu ambiente de agente.
  2. Consulte no original as ferramentas, credenciais e ambientes necessários.
  3. Descreva os dados de entrada e a entrega esperada; confira a saída com as fontes.
npx skills add https://github.com/solomondivyananth/aftereffects-mcp --skill ae-camera-3d

Antes de começar

  • A instalação não inclui assinatura de modelo, franquia API ou acesso aos seus arquivos.
  • Estrelas e instalações indicam atividade, não um teste independente de qualidade ou segurança.
Documento original do Skill

Renderizado do repositório de origem, preservando títulos, exemplos, código, tabelas, links e imagens.

Camera and 3D

Any layer becomes 3D with ae_set_layer_props {"props": {"threeDLayer": true}}. It then has Z Position, X/Y/Z Rotation and Orientation, and responds to cameras and lights. Position becomes [x, y, z]: +Z is away from the camera.

The renderer

The comp's 3D renderer decides what 3D can do. Set it with ae_set_comp_settings {"settings": {"renderer": "…"}}:

RendererValueUse for
Classic 3DADBE Advanced 3dflat layers in space, fast; lights and shadows
Advanced 3D (AE 2023+)ADBE Calder3D models (glTF, GLB, OBJ), environment lighting, reflections, GPU
Cinema 4DADBE Ernstextruded text and shapes (bevels, depth)

The lens, in numbers

After Effects measures a camera's Zoom in pixels, not millimetres. The conversion, for a 36 mm-wide sensor:

zoom_px = comp_width × focal_mm / 36
focal_mm = 36 × zoom_px / comp_width
fov = 2 × atan(comp_width / (2 × zoom_px))

So on a 1920-wide comp: a 24 mm wide lens is zoom 1280, a 35 mm is 1867, a 50 mm is 2667, an 85 mm portrait lens is 4533. On a 1080-wide vertical comp a 50 mm is zoom 1500 — which is exactly what After Effects writes when you create a camera with the 50 mm preset, so the formula is the same one it uses.

LensFeelUse for
18–28 mmexaggerated depth, edges stretchpushing through a scene, drama
35–50 mmclose to how a room looksmost product and UI work
85–135 mmflat, compressed, elegantbeauty shots, slow drifts, logo ends

Two consequences worth knowing before you place anything:

  • A long lens kills parallax. If the move needs depth to read, use a

wider lens and a shorter dolly rather than a long lens and a big one.

  • Moving a layer back by Δz and keeping its size means scaling it by

(zoom + Δz) / zoom. That is the whole trick behind flat artwork laid out in depth.

Build depth first

Space the layers in Z before any camera exists. Foreground at Z −400 to −200, subject at 0, background at +800 to +2000. Scale the far layers up so they still fill the frame, by the factor above. Parallax comes from these Z gaps, not from animating each layer separately.

A layout that reads, for a 1920×1080 comp with a 35 mm lens (zoom 1867):

PlaneZScale to hold size
Foreground furniture−30084%
Subject0100%
Mid+600132%
Background+1600186%

A camera rig

Never animate the camera directly. Parent it to nulls so each move is one property:

json
ae_create_layer {"kind": "camera", "options": {"name": "Camera"}}
ae_create_layer {"kind": "null", "options": {"name": "Cam Dolly", "threeD": true}}
ae_create_layer {"kind": "null", "options": {"name": "Cam Orbit", "threeD": true}}
ae_set_layer_props {"layer": "Camera", "props": {"parent": "Cam Dolly"}}
ae_set_layer_props {"layer": "Cam Dolly", "props": {"parent": "Cam Orbit"}}

Put Cam Orbit at the subject's position.

Parenting order matters. After Effects keeps a child's look in the world when it's parented. A layer that is already 3D, parented to a rotated 3D parent, gets a counter-rotation and leaves the parent's plane: layers "slice" into each other. Parent while the child is 2D, then set threeDLayer: true. (ae_set_layer_props applies parent before everything else in the same call.)

Then:

MoveAnimate
Push-in / dollyCam Dolly Z Position (toward the subject)
OrbitCam Orbit Y Rotation (or X for a crane)
Truck / pedestalCam Orbit X or Y Position
RollCam Orbit Z Rotation

Ease camera moves long and soft (landing ease 80–95, 20–60 frames), because cameras have weight. Add a subtle handheld feel on the Camera itself: wiggle(0.6, 6) on Position (see ae-expressions).

Numbers that read as deliberate rather than accidental:

MoveAmountFrames (30 fps)
Slow push (a shot that breathes)4–8% of the distance to the subject90–180
Reveal push15–30%30–60
Orbit around a subject15–35°45–90
Whip to a new subject60–120°8–14, with motion blur
Crane down onto a layout20–40° on X45–75

Orientation aims, Rotation animates. Set a camera or layer's Orientation once to point it where it should look, and keyframe X/Y/Z Rotation for the move. Animating both, or animating Orientation across more than 90°, is how you get a flip halfway through that nothing in the values explains.

Turn motion blur on for camera moves. A camera move is the fastest thing in most comps, and without blur a push-in strobes on every edge.

A camera's transform paths are ["Transform","Point of Interest"], ["Transform","Position"] and so on. Its lens settings are under ["Camera Options", …].

Depth of field

Property (under Camera Options)What it does
Zoomlens focal length in pixels: bigger is more telephoto
Depth of Fieldon/off
Focus Distancedistance from the camera that is sharp
Aperturelarger is shallower focus
Blur Level0–100%+ strength
Iris Shape, Iris Rotation, Highlight Gainbokeh character

A rack focus: key Focus Distance from the foreground layer's distance to the background's over 15–30 frames, eased. To keep focus locked on a layer, use an expression on Focus Distance:

js
length(thisComp.layer("Subject").toWorld([0,0,0]), toWorld([0,0,0]))

What each renderer costs you

The renderer is not only about features; it changes which of your other tools still work. Test with one ae_render_frame after switching, because the viewport and the render can disagree.

RendererGives youTakes away
Classic 3Dlights, shadows, intersecting layers, everything 2D still worksno extrusion, no real materials
Cinema 4D (ADBE Ernst)extruded text and shapes, bevelsblend modes and track mattes on 3D layers are ignored; slower
Advanced 3D (ADBE Calder)imported 3D models, environment lighting, reflections, GPU speedneeds a capable GPU; some legacy effects behave differently

Whatever the renderer, effects are 2D: they run after the layer is placed in space, so a glow on a tilted 3D layer is a flat glow on the flat result. If an effect must live in the scene, put it on a precomp and make that precomp the 3D layer.

Lights and shadows

ae_create_layer {"kind": "light", "options": {"name": "Key", "lightType": "spot"}} (parallel, spot, point or ambient).

Light Options
Intensity, Colorbrightness (%) and tint
Cone Angle, Cone Featherspot size and softness
Falloff, Radius, Falloff Distancehow light fades with distance
Casts Shadows, Shadow Darkness, Shadow Diffusionshadows (soft = higher diffusion)

Layers only cast and receive shadows when their Material Options allow it:

json
ae_set_property {"layer": "Card", "path": ["Material Options","Casts Shadows"], "value": 1}
ae_set_property {"layer": "Floor", "path": ["Material Options","Accepts Shadows"], "value": 1}

Other material settings: Accepts Lights, Ambient, Diffuse, Specular Intensity, Specular Shininess, Metal, Reflection Intensity, Transparency, Index of Refraction. A classic setup: key light 100%, a dim ambient at 20–30% so shadows aren't black, and one rim light behind the subject.

3D models

With the Advanced 3D renderer (AE 2023+), ae_import_file a .glb, .gltf or .obj and add it with ae_create_layer kind footage. Models are lit by the comp's lights, or by an environment light (image-based lighting).

Camera shake and impacts

Shake the camera, not the layers, so the whole scene moves together and the parallax stays right. Put the marker-driven decaying shake from ae-expressions on Cam Orbit Position, scaled down (amplitude 4–10) for 3D.

What goes wrong in 3D

SymptomCauseFix
Layers slice into each othertwo 3D layers intersect, or a child was parented after it went 3Dseparate them in Z; parent while 2D, then set threeDLayer
A layer vanishes when the camera movesit is edge-on to the cameragive it a small X or Y rotation, or make it face the camera
The move flips halfwayOrientation and Rotation are both animatedanimate Rotation only
Everything is darka light is in the scene and layers accept lightsadd ambient light at 20–30%, or switch Accepts Lights off on flat UI layers
Shadows look like blobsa spot light very close, with high diffusionmove the light back, lower Shadow Diffusion
Focus driftsFocus Distance is keyed but the camera also movesdrive Focus Distance from the subject with the expression above
The background shows its edgesa far layer was never scaled upscale by (zoom + Δz) / zoom
It renders foreverdepth of field plus shadows plus motion blurpreview with downscale: 4, and turn depth of field on last

What needs a person

  • 3D Camera Tracker (tracking real footage to get a camera) isn't

scriptable. Ask the user to run Animation ▸ Track Camera on the footage. Once it has a solved camera, everything above works with it.

  • Choosing an environment light's image (HDRI) is set in the Effect Controls

or Project panel. Ask, or import the image and let the user assign it.

Check it

Depth and camera moves only read in motion. ae_review_motion over the whole move, and look for:

  • layers that pass through each other or pop in Z
  • edges of too-small background layers showing
  • shadows that swim
  • focus landing late

ae_render_frame at the start, middle and end confirms composition at each point of the move.

ae_proof helps less here than elsewhere, and says so: once a camera is in the comp it skips its space rules for 3D layers, because the sampler measures flat boxes, not what the camera sees (ae-motion-proof names the layers it skipped). Its timing, easing and integrity checks still apply to camera moves — a camera's keyframes are keyframes like any others.

Relacionados por tarefa

do mesmo repositório

Mais Skills

Todos os Skills
solomondivyananth
Comunidade

ae-ai-templates

Use and write AI-native After Effects templates through the AE MCP Bridge - finished animated designs (lower third, kinetic title, word reveal, app card, bar chart, logo sting, welcome) that an agent fills from a brief with aetemplate, built as one undo step with a contact sheet to check, in 16x9, 9x16, 1x1 or 4x5; plus how to author a new template as JSON (typed slots, steps, expressions, repeats) that npm test validates. Use when asked for a lower third, title, chart, logo sting, app or UI sho

instalações
1
GitHub Stars
68
Atualizado
5 de out.
solomondivyananth
Comunidade

ae-composition

Stage a frame in After Effects through the AE MCP Bridge - give every beat one dominant element, build scale hierarchy, use the whole frame instead of a band in the middle, vary the composition between beats, place things on a grid with real margins, crop and bleed deliberately, compose for 9x16 and 1x1, and check it with aeproof's staging checks. Use when work looks flat, generic, empty, "like a slide", "like a wireframe" or "not designed", when every beat looks the same, when nothing on screen

instalações
1
GitHub Stars
68
Atualizado
5 de out.
solomondivyananth
Comunidade

ae-effects

Special effects, blur and motion blur in After Effects through the AE MCP Bridge - glows, light rays and flares, fractal noise, displacement and distortion, particles, chromatic split, grain, stylized looks, paper and print finishes, stepped on-twos cadence, effects driven by map layers, and every kind of blur (Gaussian, directional, radial, lens blur, pixel motion blur, comp motion blur), with exact effect and parameter names. Use when asked for a look or an effect (glow, energy, glitch, heat h

instalações
1
GitHub Stars
68
Atualizado
5 de out.
solomondivyananth
Comunidade

ae-motion-proof

Proof-read motion in After Effects through the AE MCP Bridge - screen a comp with aeproof for overlapping or clipped elements, jitter, flicker, one-frame pops, keyframes off the frame grid, linear easing, text too small or too brief to read, uneven staggers, missing motion blur on fast moves, broken expressions, a solo switch left on or an empty first frame, plus staging checks for a beat with no focal point, no scale hierarchy or an unused frame, then verify each finding on a rendered frame. Us

instalações
1
GitHub Stars
68
Atualizado
5 de out.