agentleFS
AlphaSaleAidanAlphaSaleAidan/pierce-skill-kit/skills/greenscreen-to-ai-plate-comp/SKILL.md

greenscreen-to-ai-plate-comp

Skill0 starsChanged 30 days agoMITView on GitHub

Use when green-screen talent must be placed into a generated or built environment for a commercial — the composite looks pasted, talent floats, lighting or focus doesn't match the background, the background is a dead still, or edges/hair/props glitch green. Covers the Higgsfield Ad Multiplier merge and the raw-key-over-animated-plate chain.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never loop a short take to fill a shot (visible repeat).

    line 27

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Green screen → AI plate composite

Overview

Two working routes, pick by lighting:

  • A. Ad Multiplier merge (Higgsfield ad_multiplier, video_edit): the model renders the people INTO the scene — bokeh, sun, shadows. Fastest route to "one real shot" when the set light doesn't match the background. Costs: talent gets an AI pass (waxy after several), props move, the model redoes focus.
  • B. Raw key over an animated photoreal plate (the version the client finally shipped): generate the background to MATCH the set light (overcast for flat studio light), animate the SHARP still, blur by depth after, key the raw 4K take. Talent stays 100 % real.

Rule of thumb: if you can make the plate's light match the set, B wins; otherwise A.

Shared front end

  1. Layout per shot from boards / a Blender set (blender-set-from-storyboard), 16:9 window, camera height + lens matched to the take.
  2. Photoreal background — gpt_image_2_5 edit (≈3 cr, 2k, high) with ONLY the layout render as reference (adding the painted board made it look painted): "a real photograph … 35 mm f/2.8, plain sky, no HDR, imperfections: parked car, power line, garden hose, patchy lawn, wet paving". To match flat studio light: "relight this exact photograph … overcast" with the sharp still as the only ref — layout held perfectly. Keep the background SHARP here.
  3. Never loop a short take to fill a shot (visible repeat). Scan every source take for black/foreign frames at its ends (a cropped take carried black frames 0–1 and 71–75 plus a foreign close-up at 76).

Route A — Ad Multiplier

get_workflow_instructions(workflow:"ad-multiplier") first. Source = raw green-screen cut (4–30 s) as @Video1; backgrounds as @Image1..N (generation job ids work as media); a COMPACT prompt per time segment ("Replace only the green-screen studio background in @Video1 with the location from @Image1, lit by that sun…") + the mandatory preservation block; name every key prop per segment or it's dropped; declined_preset_id when the "IN THE DARK" preset nag blocks the literal job. ≈132 cr / 10 s at 1080p, ≈12 min, output is SILENT → mux the take's audio back. Crop the output to lose feet if the model regenerated full bodies.

Route B — raw key over a moving plate (0 cr except the plate animation)

  1. Moving plate: kling3_0 pro image-to-video from the SHARP 16:9 still, no end image, "steady autumn wind… canopy sways visibly… hedges rustle… camera locked off" (≈10 cr / 5 s). Check locked regions drift < 0.4 px (cv2.phaseCorrelate on a static patch) and that foliage actually moves.
  2. Depth + focus AFTER animation: Depth Anything V2 Small (Apache; Base/Large are non-commercial) → scripts/lens_blur.py --inverse --focus 4.3 --fstop 4 --focal 35 per frame. The client picks the f-stop; "focus proportional", not evenly soft.
  3. Key the raw 4K take: colour-difference key with the high threshold taken from the MEASURED screen colour (a fixed hi .16 below the screen's .25 chopped hair and paper edges); despill g ≤ avg(r,b) (max greened skin; gate paper despill to bright AND g>max(r,b)); eroded RVM core as holdout; hole fill; a screen-guard for hair wisps over shaded green (holes near screen colour + dark neighbourhood → alpha 0, 1 px soft rim). ffmpeg alternative: format=rgba,chromakey=0x<screen>:0.045–0.055:0.02, despill=mix=0.35; decode alpha webm with -c:v libvpx-vp9 or the alpha is lost.
  4. Match: measure whites/median of talent vs plate and map 75 % of the way; light wrap 0.2; 0.55 px blur on close-ups; measured grain; subtle "breathe" camera move only if the client wants it; ambience bed (wind/leaves at −24/−36 dB) under the take audio.

What FAILED (in order of cost)

TriedWhy it failed
14 rounds of key + numpy comp over Blender plates (defocus, relight, wrap, moving plates)Scored 0–4/10: flat frontal set light vs warm side sun; pasted look
Prompting apertures into Ad Multiplier backgroundsIt re-renders focus itself (house sharpness 61 → 6); refocusing after with the Blender depth failed because it MOVES objects
Ad Multiplier + Seedance wind + RVM re-matte on talentThree AI passes = waxy, over-sharpened face; newspaper morphed
Seedance video_edit wind over the whole cutRepainted the wide (new trees, house gone) — per shot only, "do not add any new objects"
Seedance video_edit on some shotsRefused as nsfw on harmless input (refunded) — treat a refusal as final for that input; don't re-submit variations
FLUX video edit / Kling Omni Edit for foliage motionShimmer on the house / frozen
Kling i2v from a pre-blurred stillFrozen — animators need a sharp start frame
Warping the still (hand sway masks, Blender optical flow) for windRubber-sheet wobble — "the screen is moving the bushes"
Ad Multiplier with black padding around a reframed wideLeft the black bars; do the reframe as its own ≥4 s job from a padded comp
Chroma key with a fixed high thresholdAte hair/paper edges; printed green props lost to the key

Deliver

Upscale the final to 4K with Topaz (upscale_video 2160p) only after picture lock; host a download page that stays up (not a quick tunnel); per-version folders; see commercial-production-pipeline.

Status

lens_blur.py is an untested rewrite of the job's layered thin-lens blur; the key/despill/match steps are documented from the shipped version, not packaged as a script.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.