# Afterimage: a generated environment around a performed action

Status: one direct Runway Aleph 2 edit completed. The frozen environment is visible, but exact character appearance and terrain-layout preservation do not pass sampled review. Historical first-run record. The later two-stage guided study is complete; see ../controlled-revisions/CONTROL-RECORD.md.

## Authorial brief and scope

The user delegated the next experiment after reviewing `index_rfs.html`. The agent proposes a conspicuous environment transformation on Settlers frames 83–174 at the native 24 fps (92 frames, 3.8333 seconds). This is the existing development asset, not held-out validation.

Revision 1: transform the desert's surface appearance into a frozen blue canyon. Preserve the original character, source camera, terrain layout, performance timing, airborne/fall/recovery sequence and released backpack behavior.

Revision 2: retain the frozen canyon and all performance commitments, then change the environment to warm amber dawn. Lighting may change in the environment; the character's original appearance is a protected choice whose integration must be judged, not assumed.

No new action, snowfall, objects, looping, interpolation, slow motion or duration padding. A face-first fall may obscure the face. Minimum head height/visibility is not a universal acceptance rule in this new experiment. The prior study's failure remains unchanged.

The blue-ice / amber-dawn choices and numeric diagnostics are agent-authored interpretations, not verbatim user instructions.

## Comparison

1. Competent direct video-to-video edit: source clip, full preservation brief and the same reference frame when the selected service supports it. Do not deliberately withhold the commitments.
2. Conventional compositing reference: the same generated result with native character/released-prop pixels restored through reviewed mattes. Count matte work and inspect seams, reflections, shadows and lighting. This is established compositing, not a novel controller.
3. Revision two consumes revision one's accepted result and carries the same commitment record. Retain the raw second result and any compositing separately.

A prompt or supplied keyframe is a soft guide. Measurement reports a result. Source-pixel copying can enforce pixel preservation only where valid coverage is known. Do not turn those into interchangeable promises.

Environment replacement and relighting are already advertised capabilities of current video editors. Completing these two edits would establish an integration feasibility result, not novelty. This pilot asks which authored decisions survive generative processing and whether ordinary compositing already suffices. Any stronger claim needs untouched cases, independent judgment and measured comparison/repair effort.

## Evaluation before results

Check returned duration, frame rate, source/action correspondence, silhouette and characteristic pose events, released-prop continuity, environmental change completion, new unwanted objects, flicker, and lighting/seam integration. Store all outputs, inputs, model/version, parameters, timestamps, prompt/reference hashes, quoted charge and actual review/repair time.

Geometric mattes are diagnostic until visually reviewed. They omit beauty-pass refraction, motion blur, transparency and shadows; no exact production-alpha claim is supported by them. Do not score the unchanged original as a successful transformation. Do not count black/empty masks as successful protection. Do not count source-protected pixels as evidence of generative model obedience.

Use source correspondences to inspect outputs; do not time-warp an output before reporting its timing errors. Broad color distance is a change diagnostic, not a perceptual success score. Independent artistic judgment and a held-out scene remain outside this initial demonstration.

## Current execution boundary

The bundle includes the original 640×360 preview and a separately labeled 1280×720 upload copy, spatially upscaled with Lanczos from the same 92 native frames. This adds no temporal frames or source detail. [Runway Edit Studio's input specification](https://help.runwayml.com/hc/en-us/articles/51683104370451-Creating-with-Edit-Studio) currently requires 480p–1080p, 24–30 fps and a duration between 2 and 30 seconds. Confirm the selected connector's actual contract before submission. Higher-resolution native rendering is still needed before making production-quality claims.

The user approved uploading the prepared source and one Aleph 2 generation through the Runway developer API. Task `841ed224-bbdc-491d-becd-de9470e61034` completed for 84 credits, leaving 416 credits at the account check. The unaltered output has 92 frames at 24 fps, 3.833333 seconds and 1920×1080 resolution. The earlier generated reference still was not supplied because it had already redrawn character and geometry. The prior Weave upload was blocked before transfer.

See `runway-revision-1.json`, `runway-media-check.json` and `runway-review.json` beside the public protocol (or in the source reports folder). Hair and character details changed, and terrain contours were reconstructed. Broad action timing appears retained in sampled pairs; prop continuity remains unresolved. This is a useful direct-model baseline, not an accepted exact-preservation result. Two later guided generations are documented separately in ../controlled-revisions/; this section retains the original first-run findings. A conventional source-over restoration baseline is now available below the raw result; it does not resolve integration. The original input ZIP is retained as a pre-run preparation snapshot.

## Inputs and attribution

Settlers — [Blender Studio / Blender Foundation](https://studio.blender.org/projects/settlers/?asset=2533), [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Native preview rendering and the frozen-canyon reference are adaptations by this project. Original source and native runtime paths are inherited from `../revisions/plan.json`. Existing native controls and resource guard are reused. Source scene files remain untouched. The previously published native results remain separate.


## Conventional source-restoration baseline

`character-restoration-comparison.mp4` compares source, raw Runway and source-over restoration at matching native frames. The restoration works at 640×360 using original beauty PNGs and existing geometric diagnostic masks; it blends in linear RGB and retains the unmodified raw output separately. No additional paid generation or API call occurs. Reproduce with `scripts/restore_character.py` after decoding the raw output with `scripts/review_runway.py`. Python requires Pillow/numpy and ffmpeg.

Opaque mask interiors are verified to equal source pixels before video compression; uncovered pixels equal downsampled Runway. These equalities follow from copying and cannot establish generative obedience or artistic quality. The source masks do not clear a differently shaped generated character. Residual contours/limbs, source edge colors, lighting/detail mismatch and unresolved contact/shadows remain. This is a simple conventional baseline, not a skilled-compositor comparison. The user accepted redraw as a valid interpretation; exact preservation remains a specific authorial choice rather than a universal success rule.

Current findings and limitations are in `character-restoration-review.json`; frame receipts are in `character-restoration.json`. No stronger comparative claim is supported by this stage.


## Conventional contour cleanup trial

`production.html#character-cleanup` compares source-over restoration with a local cleanup trial across all 92 frames. Native-guided GrabCut estimates generated coverage. ORB/RANSAC 2D affine registration gathers temporal background donors; a median uses at least three valid donors, and Telea fills remaining gaps. Partial native edges borrow nearby opaque-source colors. These are conventional image-processing operations, not a new learned controller.

Full cleanup produced a pale lower edge at the face-down pose (frame 127). The selected candidate keeps a narrow bottom-contour band from the earlier composite for agent-selected contact frames 83–169. It can preserve some old residues and does not solve physical contact or shadows. Both the unguarded candidate and the selected version are retained. Green/pink/yellow inspection overlays distinguish temporal donors, local fill and the contact exception. Lighting, true alpha and full temporal quality remain unresolved.

Reproduce in order: `scripts/cleanup_character.py`, `scripts/package_cleanup.py` to retain the unguarded preview, `scripts/guard_cleanup_contact.py`, then `scripts/package_cleanup.py` again. Dependencies: Python, OpenCV, scipy, numpy, Pillow and ffmpeg. Native source/mattes and decoded raw output are required. Current method receipts and review are `character-cleanup.json` and `character-cleanup-review.json`. No additional API calls or credits were used.
