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
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
画像
input
Image
Required
入力画像

Output Ports

NameTypeDescription
画像
output
Image
変形後の画像です(キャンバスサイズは変わりません)

Parameters

NameTypeDefaultRangeDescription / Options
モード
mode
Enum
Trapezoid

変形の指定方法です

  • 台形Trapezoid
    向かい合う2辺を伸縮します。床や壁の簡易パースに便利です
  • 4隅指定Corners
    4つの隅を個別に動かします(コーナーピン)
方向
direction
Enum
Vertical

台形でどの辺の組を伸縮するかです

  • 上下辺の幅Vertical
    上辺と下辺の幅を伸縮します(床・天井のパース向け)
  • 左右辺の高さHorizontal
    左辺と右辺の高さを伸縮します(壁のパース向け)。上辺スケールが左辺に対応します
上辺スケール
top_scale
Float
10–2 / step 0.01

上辺の幅の倍率です(方向が左右のときは左辺の高さ)

下辺スケール
bottom_scale
Float
10–2 / step 0.01

下辺の幅の倍率です(方向が左右のときは右辺の高さ)

左上の移動X
tl_dx
Float
0-1024–1024 / step 0.5

左上の隅を横へ動かします。負で左、正で右へ動きます

左上の移動Y
tl_dy
Float
0-1024–1024 / step 0.5

左上の隅を縦へ動かします。負で上、正で下へ動きます

右上の移動X
tr_dx
Float
0-1024–1024 / step 0.5

右上の隅を横へ動かします。負で内側、正で右外側へ動きます

右上の移動Y
tr_dy
Float
0-1024–1024 / step 0.5

右上の隅を縦へ動かします。左上のYと組み合わせると傾いた上辺を水平にできます

右下の移動X
br_dx
Float
0-1024–1024 / step 0.5

右下の隅を横へ動かします。負で下辺が狭まり、正で広がります

右下の移動Y
br_dy
Float
0-1024–1024 / step 0.5

右下の隅を縦へ動かします。負で上、正で下外側へ動きます

左下の移動X
bl_dx
Float
0-1024–1024 / step 0.5

左下の隅を横へ動かします。正で下辺が狭まり、負で広がります

左下の移動Y
bl_dy
Float
0-1024–1024 / step 0.5

左下の隅を縦へ動かします。右下のYと組み合わせると傾いた下辺を水平にできます

方式
sampling
Enum
Auto

変形の品質です

  • 自動Auto
    輪郭が滑らかなRotSpriteを使います(現状はRotSpriteと同じです)
  • RotSprite(きれい)RotSprite
    Scale2xで8倍に拡大してから変形し、多数決で縮小します。色を混ぜずに輪郭が滑らかになります
  • そのまま変形Nearest
    最近傍サンプリングです。速いですが、斜めの辺が階段状になります

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
Quad Transform — PixPipeline Node Reference