Nodes/RyanOnTheInside/Moving Shape βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
ComfyUI Node

Moving Shape βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜

A procedural mask that slides, grows, and bounces across the frame

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Moving Shape βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
    • MASK
    β—„frame_width512β–Ί
    β—„frame_height512β–Ί
    β—„num_frames30β–Ί
    β—„rgb(255,255,255)β–Ί
    β—„shapeβ–Ύβ–Ί
    β—„shape_width_percent50.0β–Ί
    β—„shape_height_percent50.0β–Ί
    β—„shape_start_position_x0.0β–Ί
    β—„shape_start_position_y0.0β–Ί
    β—„shape_end_position_x0.0β–Ί
    β—„shape_end_position_y0.0β–Ί
    β—„movement_typeβ–Ύβ–Ί
    β—„grow0.0β–Ί
    β—„palindromefalseβ–Ί
    β—„delay0β–Ί

    Every other mask node in this pack starts from something - a video, an audio signal, motion, a color. Moving Shape starts from nothing. Give it a canvas size and a shape, and it draws a square, circle, or triangle that travels from one point to another over your sequence, with its own easing and optional growth. No image or mask input required at all - it's a pure generator, which makes it handy for wipes, spotlight reveals, synthetic test masks, or just something animated to drive a compositing effect when you don't have (or don't want to derive from) real footage.

    How it works

    frame_width/frame_height set the canvas, num_frames the sequence length, shape picks square/circle/triangle, and rgb sets its color as a literal string like (255,255,255). Size is set as a percentage of the frame (shape_width_percent/shape_height_percent), and position is relative too - shape_start_position_x/y and shape_end_position_x/y run from -100 to 100, not pixels, so the shape travels from a start point to an end point over the animation.

    movement_type is the easing curve for that travel - linear, ease_in_out, bounce, elastic - note this is a separate, smaller list than the temporal_easing options you'll see elsewhere in the pack (no none option here; movement always happens). grow lets the shape expand as it moves. palindrome plays the whole animation forward then reverses it within the same frame count, rather than just moving one-way. delay holds the shape static for a number of frames before the movement starts - useful for a beat of stillness before a reveal begins.

    The inputs and outputs that matter

    • shape - square, circle, or triangle.
    • shape_width_percent / shape_height_percent (default 50) - size as a percent of the frame.
    • shape_start_position_x/y / shape_end_position_x/y (-100 to 100) - the travel path, relative to frame center, not pixels.
    • movement_type - linear / ease_in_out / bounce / elastic.
    • grow - expansion over the animation.
    • palindrome / delay - reverse-and-repeat, and a static hold before motion starts.

    Output is a single MASK - feed it straight into any masking or compositing node, or into FlexMaskWarp and friends if you want to layer the pack's other mask distortions on top of a clean synthetic shape.

    How to install it

    ComfyUI Manager: search "RyanOnTheInside", install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside
    cd ComfyUI_RyanOnTheInside
    pip install -r requirements.txt
    

    then restart. Pure procedural drawing - no model download, and this node doesn't touch the pack's heavier audio or particle dependencies.

    Common issues & troubleshooting

    Shape doesn't move at all. shape_start_position_x/y and shape_end_position_x/y all default to 0 - if you leave the end position equal to the start, there's nothing to animate toward. Set an actual end position different from the start.

    Shape ends up off-screen or clipped. The -100 to 100 position range is relative to the frame, not pixel coordinates, and it stacks with shape_width_percent/shape_height_percent - a large shape pushed to a position near Β±100 will run off the visible canvas. Bring the position closer to 0 or shrink the shape if it's getting clipped.

    Movement looks abrupt instead of smooth. That's movement_type set to linear (constant speed, no easing) - switch to ease_in_out for a gentler start/stop, or bounce/elastic if you want overshoot.

    CategoryRyanOnTheInside/Masks

    Inputs (15)

    NameTypeDefaultDescription
    frame_widthINT5121–3840Width of each frame in pixels (1 to 3840)
    frame_heightINT5121–2160Height of each frame in pixels (1 to 2160)
    num_framesINT301–120Number of frames in the animation sequence (1 to 120)
    rgbSTRING(255,255,255)Color of the shape in RGB format (e.g., '(255,255,255)')
    shapeCOMBOType of shape to generate ('square', 'circle', 'triangle')
    shape_width_percentFLOAT50.00–100Width of the shape as percentage of frame width (0 to 100)
    shape_height_percentFLOAT50.00–100Height of the shape as percentage of frame height (0 to 100)
    shape_start_position_xFLOAT0.0-100–100Starting X position relative to frame (-100 to 100)
    shape_start_position_yFLOAT0.0-100–100Starting Y position relative to frame (-100 to 100)
    shape_end_position_xFLOAT0.0-100–100Ending X position relative to frame (-100 to 100)
    shape_end_position_yFLOAT0.0-100–100Ending Y position relative to frame (-100 to 100)
    movement_typeCOMBOType of movement animation ('linear', 'ease_in_out', 'bounce', 'elastic')
    growFLOAT0.00–100Growth factor during animation (0 to 100)
    palindromeBOOLEANfalseWhether to play the animation forward then reverse
    delayINT00–60Number of static frames at the start (0 to 60)

    Outputs (1)

    NameTypeDescription
    MASKMASKβ€”