Studio Yotsuba
Back to Node List

Pixel Rotate

pixel_rotate

Rotates an image by any angle. RotSprite mode keeps palette colors while smoothing edges

Reviewed
Guide available

Input Ports

NameTypeDescription
Image
input
Image
Required
Image to rotate

Output Ports

NameTypeDescription
Image
output
Image
Rotated image

Parameters

NameTypeDefaultRangeDescription / Options
Angle
angle
Angle
0— / step 1

Clockwise rotation angle in degrees

Method
sampling
Enum
RotSprite—

Rotation quality

  • RotSpriteRotSprite
    Upscales with Scale2x before rotating, then picks the majority color — smooth edges without mixing colors
  • NearestNearest
    Rotates by nearest-neighbor sampling — fast but stair-steps on edges
Canvas
canvas
Enum
Expand—

Output canvas size

  • ExpandExpand
    Grow the canvas so the rotated image fits entirely
  • KeepKeep
    Keep the original size — corners may be cut off

Overview

For 90° steps, Transform is enough. Use this node when you need arbitrary-angle rotation, such as a sword tilted 45° or a spinning coin. The RotSprite method is a pixel-art-specific rotation algorithm that preserves outlines without blending colors.

Usage tips

  • Use RotSprite (the default) in most cases. It introduces no antialiased intermediate colors, so the palette stays clean. Use Nearest only when you deliberately want a rougher look.
  • The go-to rotation animation is: promote angle to an input pin 📌 → time_source + remap (0–360) → animation_render. This can batch-produce coins, shuriken, or gears.
  • For a sprite sheet, set canvas = Keep to fix the frame dimensions before sprite_sheet_pack. With Expand, the dimensions can change from frame to frame.

Related nodes

  • transform — for 90° steps, flipping, and translation
  • animation_render — bake rotation animation
  • remap / time_source — drive the angle
  • sprite_sheet_pack — collect the frames

Modes

Method Description
RotSprite (clean) Enlarges by 8× with Scale2x, rotates, then downsamples by majority vote over 8×8 subpixels. Because it does not blend colors, it smooths the outline while preserving the palette.
Nearest (rotate as-is) Nearest-neighbor sampling. Fast, but produces stair-stepped outlines.

Canvas

Value Description
Expand (expand for rotation) Expands to dimensions that contain the entire rotated image. Empty areas are transparent.
Keep (preserve original size) Keeps the original dimensions. Corners extending outside are clipped.

Technical details

  • Rotation uses the center of the image as its pivot.
  • angle = 0 passes the input through as-is.
  • RotSprite's majority vote prefers opaque colors in a tie.
  • The output introduces no new colors; it contains only input colors and transparency.

Examples

  1. Rotation animation: Time Source → Remap(0..360) → connect to angle, then batch-produce a spinning coin sprite sheet with Animation Render.
  2. Alternate weapon poses: rotate a sword sprite with RotSprite, angle: 45 to create a diagonal pose variant.
  3. Prepare for batch production: use canvas: Keep to preserve dimensions after rotation, then send directly to Sprite Sheet Pack.
Back to Node List