#What you'll learn
- How to export normal maps and light masks for lighting inside a game engine.
- The Stack (shader config) and sprite-sheet JSON formats, field by field.
- How animated sprites and timed effects decide the number of frames.
- Why the preview and the bake can differ in speed but never in pixels.
- How to keep a reusable lighting library across projects and teammates.
#Before you start
- Work through Pixxura — Intermediate: lighting rigs, normal-map methods and the effect stack.
- You need a plan that includes Pixxura.
- For engine lighting, know how your engine reads normal maps (most use the same convention as Pixxura; see below).
#How-tos
#How to export a normal map for engine lighting
- Set up the normal map in the Normal map panel and check it in View → Normals.
- Open Bake & export, choose Normal map and a Scale (1×, 2×, 3×, 4×, 6× or 8×), then Download.
- The PNG uses the common OpenGL convention: red points right, green points up, blue points out of the screen. Godot and Unity read this directly. If your engine expects DirectX-style maps (green down), flip the green channel.
- The map includes the Padding around the sprite, so export the sprite itself at the same padding and scale to keep them aligned.
#How to export a light mask
- In Bake & export, choose Light mask.
- You get only the light falling on the sprite, without its colours.
- Use it in your engine or another app as a separate layer, for example added on top of the sprite for a glow pass, or to drive an emissive map.
#How to save and reuse a lighting setup
- Choose Stack (shader config) in Bake & export and Download. You get a .pxura.json file with no pixels in it.
- Load it into any project with Import stack… (in the Bake & export dialog).
- The file uses the format pixxura-stack, version 1, and holds:
| Field | What it holds |
|---|---|
| size | The sprite's w and h, and the pad around it |
| anim | frames (the loop length) and fps |
| normal | The normal-map mode, method, strength, smoothing and edge depth |
| lighting | Lighting on/off, ambient and its colour, bands, snap, steps, specular, shininess, shadows, halos, any palette, and every light |
| stack | Every effect in order: type, on and its settings |
#How to read the sprite-sheet export
- Choose Sprite sheet + JSON, a Scale and Columns (One row, 4, 8 or 16).
- You get a zip with name_sheet.png and name_sheet.json.
- The JSON has app (pixxura), frames (the count), frameWidth, frameHeight, cols, rows, durations (one per frame, in milliseconds) and config, the same lighting setup as a stack file, so the sheet documents how it was lit.
#How to control how many frames you get
- A still sprite with steady lights and no timed effects exports as one frame.
- As soon as anything moves (a flickering or pulsing light, a timed effect, or an animated sprite), it becomes animated.
- The number of frames is the larger of the sprite's own frame count and Loop frames in the Canvas panel.
- Every timed effect and light animation is calculated as whole cycles over the loop, so frame 1 always follows the last frame cleanly.
- Displacement effects (Wave, Heat haze, Ripple) move whole pixels, so no in-between colours appear.
#How to get the fastest preview
- The GPU preview badge shows whether your device's graphics chip draws the live preview. Turn it off from its toggle if a device draws incorrectly.
- The graphics chip speeds up the lighting (shadows and halos included) and simple colour effects at the top of the stack; the rest runs on the main processor afterwards.
- Palette snapping (Sprite palette or a library Palette) always runs on the main processor, so it's slower to preview.
- Exports always use the main-processor method, which is the reference: a bake is pixel-identical on every device.
#Workflows
#Real-time lights in Godot
- Light and tune the sprite in Pixxura so it looks right on its own.
- Export the sprite (PNG (this frame) or Sprite sheet + JSON) and the Normal map at the same scale.
- In Godot, assign the normal map to the sprite's texture as its normal map; add Light2D nodes. Godot's lights now shade the sprite using Pixxura's shape.
#A lighting kit for a whole team
- Make one stack per mood and save each as Stack (shader config).
- Share the files, or save a project to the Cloud so teammates can open it from their account.
- In Flow, add Pixxura as a step after the art step; each teammate's result goes to the next step with Send result to Flow.
#Lit sprites into a game package
- Light the animation, then Send to App → The lit animation (frames) to Pixxizi.
- Pixxizi packages it for your engine. Add hitboxes in Pixxeta before packaging if needed.
#Tips and shortcuts
- Limits: sprites up to 480 × 480; Padding 0 to 32; Loop frames 2 to 64; FPS 1 to 30; export Scale up to 8×.
- Light halos are drawn as solid rings that are always partly see-through, so Outline, Drop shadow and Pixel glow never treat a halo as part of the sprite.
- Your current project is saved on this device automatically ("Restored your last session" appears when you come back). A cloud save is a zip with stack.json, the sprite's frames and any imported normal map.
- Send to App offers the lit sprite or animation as frames, This frame (image), or The palette.
- Library opens an image, frames or a sheet as the sprite, or a palette for Snap.
#Troubleshooting
- Engine lighting looks inverted vertically. Your engine expects green-down normal maps; flip the green channel.
- The normal map and the sprite don't line up in the engine. Export both at the same Scale, and remember both include the Padding.
- The export has far more frames than expected. A flickering light or a timed effect made it animated. Set lights to Steady and untick timed effects for a still.
- Import stack fails with "not a Pixxura stack file". Only .pxura.json files from Stack (shader config) can be imported; a sprite-sheet JSON isn't a stack file.
- The preview is slow but the badge says GPU. Snap set to a palette and effects lower in the stack run on the main processor; switch Snap off while you work.