ComfyTV/VideoFXgenerated

UV Remap(STMapStage)

UV Remap (class STMapStage) is a video effects node in the ComfyTV package.

ST Map Stage

video
uv_video
uv_image
video
flip_v
ComfyTV

Description

UV Remap (class STMapStage) is a video effects node in the ComfyTV package. It applies a UV remap to an input video by sampling pixels through a supplied UV map, the same principle used by an ST map in compositing software. For each output pixel, the UV map provides a coordinate that says where in the source frame that pixel's color should be read from. This lets you drive lens distortion correction, warps, stabilisation, or any other positional distortion with an external map rather than with fixed parameters.

The node combines a source video with a UV map supplied either as a video (for per-frame, animated maps) or as a still image (for a constant map), and outputs the remapped video.

Inputs

flip_v

Boolean, required. Defaults to true.

Flips the vertical (V) axis of the UV map before it is applied. UV and ST maps do not all share the same vertical origin convention: some tools store the V coordinate with the origin at the bottom of the image, others at the top. Enable this to match the convention your map was authored in. The default of true matches the convention used by most ST map exports, so leave it on unless your remap comes out vertically mirrored.

video

COMFYTV_VIDEO, optional.

The source video to be remapped. Its pixels are the ones looked up by the UV coordinates. If this input is not connected, the node has no source imagery to sample from.

uv_video

COMFYTV_VIDEO, optional.

A UV map supplied as a video. Use this when the distortion changes over time, for example a per-frame tracked warp or a moving lens effect. The coordinate information is read from the map's channels, and each frame of the map is applied to the matching frame of the source video.

uv_image

COMFYTV_IMAGE, optional.

A UV map supplied as a single still image. Use this for a constant, unchanging distortion such as a fixed lens profile. Because the map does not vary over time, the same remap is applied to every frame.

Provide either uv_video or uv_image to define the distortion; the two inputs cover the animated and static cases respectively.

Outputs

video output

COMFYTV_VIDEO.

The remapped result: the source video resampled according to the supplied UV map, with the vertical axis flipped if flip_v is enabled. This output can be fed into any other ComfyTV video node for further processing.

Usage Notes

  • If the result appears mirrored top to bottom, toggle flip_v. A vertically mirrored remap is the most common symptom of a UV map convention mismatch.
  • Use uv_image for a map that never changes and uv_video when the distortion is animated. A still map is cheaper because it does not need to be interpreted per frame.
  • The remap only moves pixels; it does not generate content that is absent from the source. Areas that sample outside the source frame will show whatever edge or fill behaviour the underlying sampler provides, so keep your map inside the valid 0 to 1 range where possible.
  • The category is ComfyTV/VideoFX, so this node sits alongside the other video effects stages in the ComfyTV menu.

Comments

Sign in with GitHub to join the discussion.

Loading comments…