Nodes/Difforum/Difforum · Camera Export (AE / Blender / JSON)
ComfyUI Node

Difforum · Camera Export (AE / Blender / JSON)

Send the AI Camera into After Effects and Blender

By chillithebillis·Created 4 months ago·Updated 11 days ago· 10
Difforum · Camera Export (AE / Blender / JSON)
  • direction
  • params
  • camera
  • paths
  • json
◄formatsall►
◄filename_prefixdifforum_camera►
◄blender_unit_scale0.10►
◄translation_scale1.00►

Here's the situation this node exists for: your AI clip has a beautiful camera move and no titles, no 3D element, no relight. So you go to After Effects, and now you need the same move again - and tracking it off the render is either impossible (the frame morphs) or hours of work.

Camera Export writes the move out as a script. It's the only node in the pack flagged as an output node, which tells you what it's for: it's the end of the chain.

What it writes

Files land in output/difforum/:

  • .jsx - run it in After Effects and you get a 3D camera (in 3d mode) or a transform null that reproduces the 2D move exactly. It builds the camera from baked position/rotation/zoom values per frame, which is the brute-force approach and also the reliable one.
  • .py - run it from Blender's Text Editor (Alt+P) and you get an animated camera with fps, resolution and frame range matched to your Setup. Units come in metres; blender_unit_scale (0.1) is metres per Difforum scene unit, so tweak it if your scene has a scale you care about.
  • .json - camera-to-world matrices plus focal length per frame. This is the interoperable one: any tool that can read it can be driven by the same move.

formats defaults to all, which is what you want. filename_prefix defaults to difforum_camera.

Inputs

direction is the natural feed - camera, energy curve, scenes, keys and look in one cable. params supplies frame count, fps and resolution. camera overrides the Director's camera with any camera track you like (Camera keys, expressions, or an imported one), which means you can export a camera you typed in a text box ten seconds ago.

translation_scale matters more than it looks. It's there to match the sampler's translation_scale - if the render used 1.5 and the export used 1.0, your AE camera moves a different distance than the picture did, and the composite slides. If your exported camera feels "off by a bit", check this first.

Outputs

paths (where the files went) and json (the JSON as a string, so you can pipe it into Camera Import or write it yourself). Both are there so you don't have to go hunting in output/.

Install

Manager → search "Difforum", or:

cd ComfyUI/custom_nodes && git clone https://github.com/chillithebillis/Difforum.git difforum

Restart. No extra dependencies - the exporters emit text. Neither After Effects nor Blender needs to be installed on the machine running ComfyUI; you're generating a script, not driving an app.

The workflow people actually use it for

Template 09 (camera_to_ae_blender) is the round trip: export, composite, and - with the helper scripts in the pack's tools/ folder - bring a camera back in through Camera Import. That circularity is the interesting part. Block a move in Blender, import it, render the AI shot with it, export it back out, and put titles on it with a camera that is exactly the one the AI saw. That's a genuinely rare guarantee in AI video work, where the comp stage usually means hand-tracking a morphing render.

It's also the honest answer to the standing complaint about ComfyUI's post layer. The community doc on post-processing is blunt: the operations are old and simple, but the node ecosystem around them is uneven, so people leave ComfyUI for a compositor more often than the "it's just a gamma curve" framing suggests they should have to. Camera Export doesn't fight that exit - it makes it a clean handoff instead of a redraw.

Where people get burned

The 2D case is the one to understand. A flat move can't be expressed as an AE camera, so the node writes a null with position, rotation and zoom keyframes - which is correct, and also means you must parent your layers to it or nothing appears to happen. People who expect a camera object and get a null sometimes conclude the export failed. It didn't.

And if your 2D move had roll plus a zoom that changes rate, check the composite on a few frames rather than trusting the first one. Affine warps and AE's transform model agree on most moves and can drift a little on the exotic ones.

CategoryDifforum/6 · Export

Inputs (7)

NameTypeDefaultDescription
formatsCOMBOallWhich files to write to output/difforum: After Effects .jsx, Blender .py, JSON.
filename_prefixSTRINGdifforum_cameraFile name prefix.
blender_unit_scaleFLOAT0.100.0001–100Metres per Difforum scene unit.
directionoptDIFFORUM_DIRECTIONThe Director's wire: camera, energy curve, scene prompts, keys and look in one cable.
paramsoptDIFFORUM_PARAMSFrom Setup: frame count, fps, width and height. Plug the same Setup everywhere.
cameraoptDIFFORUM_CAMERAA camera track from Camera (keys), Camera (expressions) or Camera Import. Overrides the Director's camera.
translation_scaleoptFLOAT1.000–20Match the sampler's value so the exported move matches the render.

Outputs (2)

NameTypeDescription
pathsSTRING—
jsonSTRING—