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
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
角度
angle
Angle
0— / step 1

時計回りの回転角度です。入力ピン化すると回転アニメにも使えます

方式
sampling
Enum
RotSprite

回転の品質です

  • RotSprite(きれい)RotSprite
    Scale2xで8倍に拡大してから回転し、多数決で縮小します。色を混ぜずに輪郭が滑らかになります
  • そのまま回転Nearest
    最近傍サンプリングで回転します。速いですが輪郭が階段状になります
キャンバス
canvas
Enum
Expand

出力キャンバスの決め方です

  • 回転に合わせて拡張Expand
    回転後の画像が全部入るように、キャンバスを広げます
  • 元のサイズを保つKeep
    元のキャンバスサイズを保ちます。はみ出した角は切れます

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 SourceRemap(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
Pixel Rotate — PixPipeline Node Reference