Interface

Zwoptex hopefully is fairly straightforward and intuitive to use. For any newcomers though below walks through the major components of the interface and how the different settings and options affect the final output.


Inspector

The inspector on the left lets you adjust the settings that determine how the layout engine determines how many sheets are necessary and where and how to place sprites in the sheets.

Sheets

Sheet options are in the top section; the max width, max height and sizing mode all go together to your sizing restrictions.

inspector-sheets

  • Max Width is the maximum width a single sheet can be
  • Max Height is the maximum height a single sheet can be
  • Size Mode
    • Any will shrink the size of the sheet to fit the sprites inside of it
    • Power Of Two will first shrink the size of the sheet to fit the sprites inside of it and then increase to the next power of two
    • Squared Power Of Two is identical of power of two but ensures both the width and height are the same
    • Fixed - will fix the size of the sheet to the max width and height

When using power of two sizing modes the sheet width or height may be increased larger than the specified max width or height.

Layout

Layout options in the middle section; specify the algorithm, padding on the inside edge of each sheet and the spacing around each individual sprite the layout engine will use.

inspector-layout

  • Algorithm
    • Complex uses heuristics to help pack sprites into the small space possible and avoid whitespace.
    • Basic sorts the sprites by name descending and then packs them one by one without attempting to avoid whitespace.
  • Padding is the minimum amount of space between the inside edge of each sheet and the sprites inside of it
  • Spacing is the minimum amount of space between each sprite

Sprites

Sprite options in the bottom section; manipulate each individual sprite before it is put through the layout engine.

inspector-sprites

  • Common Divisor ensures the sprite’s resulting coordinates are divisible by this number. Useful for when downscaling to avoid jittering or blurry half pixel transformations.
  • Extruding extends the edges of the sprites past their bounds which can be helpful to reduce edge artifacts in seamless tiles
  • Padding adds transparency to the inside edges of sprites
  • Aliasing will match identical sprites and use only one entry across all the sheets
  • Trimming will remove transparent edges around sprites to avoid wasting space that could be used by other sprites

Viewer

The viewer is the center piece of the interface that allows you to preview and browse around the output of the layout engine without exporting it.

Tab Bar

The the tab bar shows how many sheets have been packed and allow you to switch between them to preview each one’s contents.

viewer-tab-bar

You can also use swipe gestures to switch between the sheets quickly.

Canvas

The canvas is the window into your artwork and will be exported as it’s displayed without the borders and highlights.

viewer-canvas

By default all sprites have a black border, a selected sprite is highlighted green and sprites with one or more aliases are highlighted blue. You can customize these colors in preferences.

Tip: hold down the space bar and a hand cursor will allow you to drag the canvas around instead of having to use the scollers.

Info Pop Over

Sometimes a individual sprite can look off or you simply want to know more about where it is in it’s sheet. Double clicking brings up an info pop-over containing more detailed information about the sprite such as it’s name, location on disk, origin, size and list of aliases.

viewer-info-pop-over

Tip: right-click on a sprite and reveal it in the library.

Info Bar

The info bar at the bottom of the canvas displayed which sheet you’re on and some useful information such as it’s final dimensions, number of sprites and number of aliased sprites.

viewer-info-bar


Library

The library displays a tree of all the resources your document contains. Each resource will contain one or more sprite at the as leaf entries. The resources list is copied and built into the document structure so you are free to delete the source sprites on disk if you no longer need them. If you need to refresh them from disk it's easiest to use the Update All button in the toolbar.

library

You can drag and drop onto the document, use the add button in the toolbar or use the add button next to the filter entry to add additional resources to your document. Once added you can right-click and delete any root level resource to remove them from the library.

Tip: right-click on any item in the library to update it or reveal it in the Viewer