Studio Yotsuba
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

Input Ports

NameTypeDescription
Front
front
Image
Required
Front face image. Output canvas matches this size
Back
back
Image
Back face image shown past 90°. When not connected, the mirrored front is used. Different sizes are stretched to the front size

Output Ports

NameTypeDescription
Image
output
Image
Flipped image

Parameters

NameTypeDefaultRangeDescription / Options
Axis
axis
Enum
Vertical—

Rotation axis

  • VerticalVertical
    Rotate around the vertical axis: the sprite squashes horizontally, like a card turning left-right
  • HorizontalHorizontal
    Rotate around the horizontal axis: the sprite squashes vertically, like a coin tossed end over end
Axis Tilt
axis_angle
Angle
0— / step 1

Tilts the rotation axis clockwise in the image plane. 0° keeps the axis chosen above; 45° flips around a diagonal

Angle
angle
Angle
0— / step 1

Flip angle in degrees: 0° front, 90° edge-on (a 1-pixel line), 180° back face. Promote and animate for a flip animation

Perspective
perspective
Float
00–1 / step 0.01

Perspective strength: the near edge grows and the far edge shrinks. 0 keeps the orthographic pixel-art look

Shading
shading
Float
00–1 / step 0.01

Darkens the sprite as it turns edge-on (brightness follows |cos angle|)

Edge Line
edge_enabled
Bool
true—

Keeps a 1-pixel line when edge-on instead of vanishing — the sprite has thickness. Sampled per row from the sprite center

Method
sampling
Enum
Auto—

Resampling quality

  • AutoAuto
    Axis-aligned flips use exact Nearest; tilted axes switch to RotSprite for smooth edges
  • RotSpriteRotSprite
    Upscales with Scale2x before mapping, then picks the majority color — smooth edges without mixing colors
  • NearestNearest
    Nearest-neighbor sampling — pixel-exact for axis-aligned flips, stair-steps on tilted axes

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