Studio Yotsuba
Back to Node List

Quad Transform

quad_transform

Perspective-style warp: trapezoid (top/bottom stretch) or free 4-corner pinning via a projective transform

Reviewed
Guide available

Input Ports

NameTypeDescription
Image
input
Image
Required
Input image

Output Ports

NameTypeDescription
Image
output
Image
Warped image (canvas size unchanged)

Parameters

NameTypeDefaultRangeDescription / Options
Mode
mode
Enum
Trapezoid—

Warp mode

  • TrapezoidTrapezoid
    Stretch or squash two opposite edges — quick fake perspective for floors and walls
  • CornersCorners
    Move each corner freely (corner pinning)
Direction
direction
Enum
Vertical—

Which pair of edges the trapezoid scales

  • VerticalVertical
    Scale the widths of the top and bottom edges (floor/ceiling perspective)
  • HorizontalHorizontal
    Scale the heights of the left and right edges (wall perspective). Top scale acts on the left edge
Top Scale
top_scale
Float
10–2 / step 0.01

Width scale of the top edge (left edge when direction is Horizontal)

Bottom Scale
bottom_scale
Float
10–2 / step 0.01

Width scale of the bottom edge (right edge when direction is Horizontal)

TL Offset X
tl_dx
Float
0-1024–1024 / step 0.5

Moves the top-left corner horizontally. Negative pulls it left; positive pushes it right

TL Offset Y
tl_dy
Float
0-1024–1024 / step 0.5

Moves the top-left corner vertically. Negative raises it; positive lowers it

TR Offset X
tr_dx
Float
0-1024–1024 / step 0.5

Moves the top-right corner horizontally. Negative pulls it inward; positive extends it right

TR Offset Y
tr_dy
Float
0-1024–1024 / step 0.5

Moves the top-right corner vertically. Use it with TL Y to level a slanted top edge

BR Offset X
br_dx
Float
0-1024–1024 / step 0.5

Moves the bottom-right corner horizontally. Negative narrows the lower edge; positive widens it

BR Offset Y
br_dy
Float
0-1024–1024 / step 0.5

Moves the bottom-right corner vertically. Negative pulls it up; positive extends it down

BL Offset X
bl_dx
Float
0-1024–1024 / step 0.5

Moves the bottom-left corner horizontally. Positive narrows the lower edge; negative widens it

BL Offset Y
bl_dy
Float
0-1024–1024 / step 0.5

Moves the bottom-left corner vertically. Use it with BR Y to level a slanted bottom edge

Method
sampling
Enum
Auto—

Resampling quality

  • AutoAuto
    Uses RotSprite for smooth edges (same as RotSprite today)
  • RotSpriteRotSprite
    Upscales with Scale2x before mapping, then picks the majority color
  • NearestNearest
    Nearest-neighbor sampling — fast but stair-steps on slanted edges

Overview

A projective transform that moves an image's four corners. Trapezoid mode provides simple floor or wall perspective, while corner-pin mode handles arbitrary quadrilaterals. Because projective transforms cannot be represented exactly by Bezier paths, this remains an image-stage operation.

Usage tips

  • Double-click the node or choose Visual Tilt/Perspective Correction in Inspector. For Straighten Line, place two points on a long edge. For Rectify Four Corners, place points clockwise from top-left. Apply converts the result into Corner Pin and eight offsets in one undo step.
  • A long roof edge, shelf, or tile seam gives a more stable two-point angle than a short line. For four points, place them close to the intended tile or sign boundary because the selected quadrilateral expands to the output rectangle.
  • For floor perspective, use Trapezoid with Top Scale around 0.5–0.8.
  • For wall perspective, select the left/right edge-height direction and shorten one side.
  • In Corner Pin, all-zero offsets are identity. Promoting them allows wobble animations.
  • Auto quality, which normally selects RotSprite, is the default. Use direct/Nearest-style transformation only for deliberately rough pixel-art deformation.

Common mistakes

  • Content outside the canvas disappears: canvas size is fixed. Add padding with canvas_resize before transforming.
  • Crossed corners scramble the image: a self-intersecting quadrilateral is not a valid projective transform. The node remains crash-safe, but the visual result is undefined.
  • A real 3D card rotation is needed: use sprite_flip for an axis, back face, and lighting. This node is a free four-corner transform.

Related nodes

  • sprite_flip — perspective-like 3D flip controlled by an angle
  • free_transform — affine transform, sufficient up to parallelograms
  • canvas_resize — add room before the transform
Back to Node List