算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
gamedev-2d-art-pixel-art-fundamentals【设计与创意】Pixel art fundamentals: resolution choice, anti-aliasing rules, dithering (Bayer / Floyd-Steinberg / hand-placed), outline philosophy, pixel hinting / sub-pixel rules, common mistakes (pillow shading, PSD-soft rendering, jaggies). USE WHEN: starting a pixel-art project, evaluating sprite quality, fixing soft / blurry pixel art, choosing resolution. …
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: gamedev-2d-art-pixel-art-fundamentals description: | Pixel art fundamentals: resolution choice, anti-aliasing rules, dithering (Bayer / Floyd-Steinberg / hand-placed), outline philosophy, pixel hinting / sub-pixel rules, common mistakes (pillow shading, PSD-soft rendering, jaggies).
USE WHEN: starting a pixel-art project, evaluating sprite quality, fixing soft / blurry pixel art, choosing resolution.
unity-2d-core AI section).
allowed-tools: Read, Grep, GlobQuick refs: dithering-patterns.md, antialiasing-rules.md
Pixel art = an aesthetic where individual pixels are intentional and visible. Different rules from "paint at any resolution then downscale" PSD work.
Native res Use case Examples
160 × 144 GameBoy / handheld retro Link's Awakening (DX)
240 × 160 GBA-era handheld Pokemon GBA, Castlevania
256 × 224 SNES original Chrono Trigger
320 × 180 Modern lo-fi 16:9 (1080p × 6) Celeste
320 × 240 Modern lo-fi 4:3 (480p × 2) Stardew Valley
384 × 216 1.2x SNES-ish Hyper Light Drifter (rendered higher)
480 × 270 1080p × 4 (clean integer scale) Many indies
Native res = the resolution you draw at. Display scales it integer (2x, 3x, 4x...) for clean pixels. Non-integer scaling = blurry.
Choose smaller = retro, smaller team art budget. Choose larger = more expressive characters, larger animations, but more work per frame.
Always integer scale:
Engine settings:
com.unity.2d.pixel-perfect).Project Settings → Display → Stretch Mode = canvas_items or
viewport.nearest-neighbor filter on final present pass; pin camera
to integer world coords.Pixel art AA is selective and manual. Three approaches:
Just black + 1 fill color. Style: GameBoy DMG, Minit. Great for very small sprites (≤16×16). Hard at larger sizes.
Place 1-2 intermediate-color pixels at:
NOT at:
See quick-ref/antialiasing-rules.md for the canonical "where to AA" decision tree.
Paint sprite using a defined color ramp (5-7 colors from dark to light). AA = pixels of intermediate ramp values along edges. Looks cohesive when palette is restricted.
Dithering = placing pixels in a pattern to simulate intermediate colors between palette entries.
Geometric, regular, retro look. Looks digital/clinical. Used in NES / early Mac. Works well in backgrounds.
Algorithmic, scattered, looks like noise. Used in image conversion tools. Avoid for hand-painted pixel art (looks generated).
Place dither pattern manually where light hits a surface gradient. Most expressive — used in Hyper Light Drifter, Owlboy. Time-consuming.
See quick-ref/dithering-patterns.md for the catalog of dither shapes (50%, 25%, 75%, gradient, edge).
Three styles:
Every sprite edge gets a 1-pixel dark outline. Very readable, classic look. Use case: low-res sprites where readability beats subtlety.
Outline only where sprite would otherwise blend with background. Modern indie standard. Style of Celeste, Hyper Light Drifter.
Outline replaced by darker shade of fill color (selout taken further). Or no outline at all. Painterly pixel art (Owlboy, Sword and Sworcery).
Outline color shifts along the sprite (warm side / cool side). High visual quality but expensive to author.
Pixel art breaks if you allow sub-pixel positioning during gameplay:
Modern engines have "pixel-perfect cameras" that handle this; on custom renderers, do it explicitly.
Light pixels in center, dark pixels around edges, regardless of light direction. Looks "puffy", uniform, no form. Fix: pick a light source direction (e.g., upper-left) and shade based on surface normal / prominence.
Long uniform-width stripes of single color along a curve. Breaks form. Fix: vary the stripe width along the curve or break it with intermediate shade pixels.
Sharp "staircase" edges that should curve smoothly. Fix: selective AA on diagonals.
Pixel art that looks like a photo downsampled — full smooth gradients, soft outlines, anti-aliasing on every edge. Defeats the medium. Fix: restrict palette, use ramps, hand-place every edge pixel.
AA pixels not in palette ramp (random gray pixels in a green ramp). Fix: AA only with colors that ARE in the ramp.
Some sprites at 1x, some scaled non-integer. Fix: every sprite at the same PPU, integer-only scaling.