Back to Node List

Sprite Flip

sprite_flip

Flips a sprite like a card turning in 3D: squashes toward the axis, shows the back face past 90°, with optional perspective and shading

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
表面
front
Image
Required
表面の画像です。出力キャンバスはこの画像と同じサイズになります
裏面
back
Image
90°を超えたときに見える裏面の画像です。未接続なら表面のミラーが使われます。サイズが違う場合は表面のサイズに引き伸ばされます

Output Ports

NameTypeDescription
画像
output
Image
フリップ後の画像です

Parameters

NameTypeDefaultRangeDescription / Options
回転軸
axis
Enum
Vertical

回転させる軸です

  • 縦軸(左右フリップ)Vertical
    縦の軸で回します。カードを左右に返すように、横方向に潰れます
  • 横軸(上下フリップ)Horizontal
    横の軸で回します。コイントスのように、縦方向に潰れます
軸の傾き
axis_angle
Angle
0— / step 1

回転軸を画面内で時計回りに傾けます。0°で上の軸のまま、45°で斜めの軸を中心にフリップします

角度
angle
Angle
0— / step 1

フリップの角度です。0°で正面、90°で真横(1pxの線)、180°で裏面。ポート化してアニメーションさせるとフリップ動画になります

パース
perspective
Float
00–1 / step 0.01

パースの強さです。手前の辺が大きく、奥の辺が小さくなります。0なら正射影のドット絵らしい見た目のままです

陰影
shading
Float
00–1 / step 0.01

横を向くほど暗くします(明るさが|cos 角度|に沿って落ちます)

エッジ線
edge_enabled
Bool
true

真横のとき消える代わりに1ピクセルの線を残します(カードの厚み表現)。線の色は行ごとにスプライト中央から拾います

方式
sampling
Enum
Auto

変形の品質です

  • 自動Auto
    軸が縦横のときはピクセル厳密なニアレスト、軸を傾けたときは輪郭が滑らかなRotSpriteに自動で切り替えます
  • RotSprite(きれい)RotSprite
    Scale2xで8倍に拡大してから変形し、多数決で縮小します。色を混ぜずに輪郭が滑らかになります
  • そのまま変形Nearest
    最近傍サンプリングです。縦横の軸ではピクセル厳密ですが、斜め軸では輪郭が階段状になります

Overview

Flips a card or coin in 3D-like motion with one node. The sprite compresses along the rotation axis, becomes a centered 1px edge at 90°, and switches to the back after 90°. It is designed for item pickups, card turns, coin tosses, and other common pixel animations.

Usage tips

  • Promote Angle and drive it from 0 to 180° with time_source and animation_render for one flip, or 0 to 360° for a full rotation.
  • Connect an image of the back as seen head-on. At 180° it is displayed in that orientation. With no back input, the front is mirrored automatically.
  • Perspective 0 is the standard orthographic pixel-art look. Try 0.2–0.5 when the near edge should grow and the far edge should shrink.
  • Shading darkens the sprite near edge-on; 0.3–0.6 usually adds enough rotational depth.
  • Axis Tilt supports diagonal flips. With Auto sampling, a diagonal axis selects RotSprite to reduce jagged outlines. For a thrown, spinning card, combine this node with pixel_rotate.
  • Output keeps the front image's canvas size and collapses around its center. Center the subject first with fit_to_canvas when needed.

Common mistakes

  • A line remains at 90°: turn Edge Line off when the sprite should disappear completely.
  • The edge needs a dedicated rim color: the built-in edge samples the sprite center. Switch to a custom rim image around 90° with value_select for a designed coin edge.
  • The back looks mirrored at 180°: supply the back image as it should look from the front; the node does not mirror an explicit back input.
  • Strong perspective clips the near edge: reduce Perspective or add canvas padding.
  • A tilted axis produces stair steps: use Auto or RotSprite instead of Nearest.
  • A tilted axis shifts pixels slightly: diagonal-axis deformation requires resampling. Use horizontal/vertical axes for pixel-exact motion, or transform a path before rasterizing.
  • A Bezier-based outline becomes rough: use path_flip before rasterization and lighting for higher-quality path assets.

Related nodes

  • path_flip — lossless Bezier-stage flip
  • path_transform — manual path rotation and negative scaling
  • transform — 90° rotation and mirroring without 3D depth
  • value_select — switch to a custom edge or alternate face
  • animation_render — render the flip as an animation
Back to Node List
Sprite Flip — PixPipeline Node Reference