Skip to content

Atlas & Sprites

Sharp Stock provides professional texture atlas (Atlas / Plist) and sprite sequence (Sprites) management tools for 2D game developers, deeply optimizing the art slicing and packing workflow experience.

1. Atlas Resource Management (Atlas / Plist)

Atlases are a key solution for optimizing performance in 2D games. Sharp Stock supports deep parsing, sub-region preview, and reverse-slicing for various mainstream atlases.

Core Features

  • Intelligent Slicing Tools:
    • Alpha Slicing: Automatically analyzes image transparency to intelligently identify and extract individual sprite files.
    • Config-based Slicing: Reads .plist / .atlas description files exported from Cocos or TexturePacker to precisely restore the original boundaries and names of all sub-regions.
    • Auto Cutout / Slice: Supports solid background removal, visual boundary adjustments, and parameter filter constraints for sprite sheet matting and slicing.
  • Interactive Sub-region Preview: In the right detail panel, you can use the dropdown list or previous/next buttons on the toolbar to view all sub-regions contained within the atlas. The preview area supports zooming and dragging, and provides an automatic rotation mode.

2. Auto Cutout / Slice & Background Removal Guide

If you have a sprite sheet with an opaque background (e.g., black or white backing) or want to fine-tune filtering parameters and preview cuts before slicing, you can use the Auto Cutout / Slice feature.

Step-by-Step Guide

  1. Open the Dialog: Right-click the target image asset in the main view and select "Auto Cutout / Slice". A full-screen interactive dialog will open. Close it with the × button in the settings panel header, Esc, or Cancel at the bottom.
    • Use the buttons in the top-left of the preview area to switch the backdrop: Transparent (checkerboard), White, or Black (default: transparent).
    • Hold for original: Press and hold to view the unprocessed image; release to return to the live preview.
  2. Background Removal Settings:
    • Check "Background Removal". If the image lacks an alpha channel, this is enabled by default.
    • Eyedropper Color Picker: Click the eyedropper icon, then click anywhere on the background color in the left preview canvas. The system will extract that pixel's color values.
    • Removal mode:
      • Connected flood (recommended): Removes only background connected to the canvas edges; preserves same-color pixels inside sprites.
      • Global flood: Removes all similar colors across the image when needed.
    • Tolerance Threshold: Drag the slider (0 - 255). Uses RGB Euclidean distance (Magic Wand–like). Higher values widen the similar-color range. The preview updates in real time.
    • Edge feather (optional): Set a radius (1–20 px) to soften edges in preview and exports. Split bounding boxes still use hard edges.
    • Save Transparent Image: Checked by default, this saves the background-removed full image as <original_name>.transparent.png. Opaque formats like .jpg are automatically converted to .png. You can uncheck this if you do not want to save the full background-removed sheet.
  3. Image Splitting & Filtering Constraints:
    • Check "Image Splitting". The preview canvas on the left will display real-time bounding boxes around detected sprite islands.
    • Size Constraints: Enable this to specify "Min Width/Height" and "Max Width/Height" bounds. Slices falling outside this range (e.g., tiny color artifacts or large text blocks) will be automatically filtered out.
    • Aligned Height: Check "Aligned Same Height" to force all exported slices to match a uniform height.
  4. Save & Export:
    • Click "Confirm" in the bottom-right corner. The processor will generate and save the transparent sheet and/or individual sliced images to the same directory as the original asset, then refresh the asset library.
    • Note: The "Confirm" button is disabled if neither background removal output nor sprite slicing is selected.

3. Virtual Sprite Assets (Sprites)

"Sprites" is a core virtual asset concept introduced by Sharp Stock. It aims to aggregate scattered sprite image sequences (e.g., run_01.png, run_02.png) on the physical disk into a single logical object.

Core Advantages

  • Maintain Grid Cleanliness: Consolidates hundreds of tiny frame images into a single "Sprites" card, significantly reducing visual noise in the main view.
  • Interactive Simulation Playback: Supports directly loop-playing sequences in the asset card or preview viewport to review animation smoothness in real-time.

Operation Guide

  • One-click Merge: Select multiple individual images -> Context Menu -> Select "Merge to Sprites."
  • Deconstruct & Restore: If you need to edit individual frames, right-click and select "Deconstruct Sprites" to revert the aggregated item back into independent disk files.

4. Packing & Slicing Workflow

Sharp Stock integrates lightweight atlas generation features:

  • Automated Packing (Generate Atlas):
    • Select a "Sprites" asset or multiple individual images.
    • Right-click and select "Generate Atlas" or "Generate Plist."
    • The system will call a built-in Packing algorithm to output a compact large texture and accompanying coordinate configuration file for you.

5. Important Tips

  • Virtual Management Logic: Sprites are a logical view within the software. While they greatly facilitate management, the original images still exist on the physical disk in a specific metadata directory (automatically managed by the system).
  • Synchronization Suggestion: We recommend committing generated atlases to the SVN server promptly to ensure team members can share the latest atlas configurations.