Skip to the guide
Pixx Suite

Enhance · Lighting & shadow studio · Advanced

Pixxado — Advanced

Pixxado in depth: how pixel shadows are built, light maths, tile-map scenes with heights, the data sent with lit sheets, export layers and maps, and batch pipelines.

Open Pixxado

#What you'll learn

  • How Pixxado draws cast shadows that never break up, and how softness and dithering really work.
  • The numbers behind light direction, height and point-light stretch.
  • How tile-map scenes use collision and height layers to block light.
  • What travels with a lit sprite sheet (pivots, boxes, the shadow layer id) and how other apps use it.
  • How to export maps and setups and run Pixxado as a batch step.

#Before you start

  • Read Pixxado — Intermediate first: multiple lights, shading form, palette locks and Scene mode are assumed.
  • For the data sections, it helps to know how your engine draws sprite layers.

#How-tos

#How to get clean, readable pixel shadows

Pixxado builds each shadow by looking up, for every pixel of the output, which sprite pixel would cast onto it. That's why shadows never have holes, even when stretched far.

  1. Under Pixels, Solid draws a hard shadow; Dithered keeps a solid core and only dithers the tail and edges; Alpha steps uses a few fixed transparency levels.
  2. Softness widens the edge with whole pixels, never blur. Long thin shadows thin out but keep a minimum density, so they don't dissolve into speckles.
  3. Fade with distance fades the shadow along its length; Ground squash flattens it for a lower camera.
  4. If a dithered shadow looks noisy on a busy background, raise Opacity or switch to Solid: games often look cleaner with a solid shadow at lower opacity.

#How to reason about light direction and height

  1. Direction is measured with 0° = light from the right, 90° = from above, 180° = from the left.
  2. Height runs from 2° (light grazing the ground, very long shadows) to 88° (almost overhead, a short blob).
  3. Shadow length grows quickly below about 20°. With Automatic (fit every frame), the canvas grows to fit, but padding is capped at about two and a half sprites per side.
  4. Point lights cast shadows away from their position; the stretch is capped at 4× so a lamp near the top of a sprite still gives a sensible shadow.

#How to light a tile map with heights

  1. Send a level from Pixxori as a tilemap. It opens in Scene mode with the tiles rendered as the base image (cropped to 1024 × 1024 if larger).
  2. Under What blocks light, choose Level tiles. A cell blocks light if it is set in the collision layer or has a height above 0.
  3. Each height step raises the wall by a quarter of a tile. A collision cell without a height uses Prop height.
  4. With a sun light, a wall shades the floor as far as its height allows at the sun's angle, up to 128 px. Point lights still block light in 2D (heights only lengthen sun shadows).
  5. The map's tile size, collision and height are saved with the project, so you can reopen and relight it later.

#How to read the data on a lit sprite sheet

When you Send to App a lit sprite sheet, Pixxado writes extra data into the asset (see Pixx asset formats):

  1. meta.gameplay keeps every hitbox, pivot and socket that came in, moved by the canvas offset so they still sit on the right pixels.
  2. Each frame gets shadow: { layer: "pixxado-shadow" }, and meta.gameplay.shadowLayers lists { id: "pixxado-shadow", label: "Shadow (Pixxado)" }.
  3. meta.pixxado holds setup (the full light setup), offset (where the original sprite sits on the new canvas), groundY and layer (which layer this asset is: lit art, shadow or both).
  4. Pixxizi and Pixxula use these to pair a shadow layer with its sprite and export it as a child sprite or a separate shadow sheet.

#How to export every layer and map

  1. Export → What: Lit art + shadows, Shadow layer only, Lit art only or All three. All layers share one canvas size so they stack pixel for pixel.
  2. Animation as: Sprite sheet + JSON (frames, sprite offset and ground line in the JSON), GIF or Separate PNGs.
  3. Extras: Normal + height maps for engines with 2D normal-mapped lighting, and Light setup (.json) to reproduce the look later.
  4. A still sprite lit by a flickering light can export as an animation: tick Animate the flickering light (8 frames).
  5. In Scene mode, export Lit scene, Darkness overlay and Light overlay and layer the two overlays over the level in your engine.

#Workflows

#Batch-light a whole cast

  1. Build one setup on a representative sprite and Save setup.
  2. Click Batch and pick every sprite. Each is lit with the same setup.
  3. Download ZIP: lit art plus a separate shadow layer per sprite.
  4. Re-run the batch whenever the setup changes; keep the setup JSON in version control with your art.

#Normal-mapped lighting in an engine

  1. Export Normal + height maps with the lit art.
  2. In engines with 2D lights, assign the normal map to the sprite's material and let the engine's lights do the shading at runtime.
  3. Keep Pixxado's cast shadow layer: engine 2D lights rarely produce pixel-true ground shadows.

#A lighting step in Flow

  1. In Flow, map animation → Pixxado → Pixxizi.
  2. The Pixxado step opens with the newest animation already loaded. Light it, then Send result to Flow with the shadow layer.
  3. If the animation changes, the Pixxado and Pixxizi steps are marked Needs re-run.

#Tips and shortcuts

  • Frames are lit up to 480 × 480 px; levels in Scene mode up to 1024 × 1024. Bigger images open as sprite sheets in sprite mode.
  • Rendering runs in the page itself: large sheets with many frames take a moment after each change.
  • With a palette lock, the light colour never tints pixels; without one, Hue shift and Light tint shape the ramps.
  • Scene wall colours match the clicked colour almost exactly (within a few levels per channel), because they come from the level's own palette.
  • Saved setups and the Light setup (.json) are the same data: share either.

#Troubleshooting

  • The canvas got very wide. A grazing light makes long shadows. Raise Height or choose a fixed Room for shadows.
  • Pixxizi draws the shadow twice. You sent lit art with shadows plus a shadow layer. Send Lit art, no shadows with the shadow layer instead.
  • Hitboxes are off after lighting. Use the sheet Pixxado sent (its meta.gameplay is moved by the canvas offset), not the original sprite's data.
  • A tile wall doesn't block a lamp. Check the cell is in the collision layer or has a height; point lights block in 2D only.
  • The normal map looks wrong on later frames. An imported normal map applies to the first frame only; let Pixxado build normals from the shape for animations.