Stacked vs cutout mode
Published
After clustering has found the regions of an image, a tracer has to decide how to write them as shapes. VTracer offers two ways: stacked, its default, and cutout. Both look identical once rendered; they differ in how the shapes are built, which matters for file size, for editing and for machines that cut along every path.
Two ways to build the same picture
- Stacked layers the shapes like paper cutouts. The background is a plain rectangle, the drop is whole, and the highlight sits on top. Each shape carries on underneath the shapes above it, and SVG's painting order does the rest: later shapes cover earlier ones, as explained in What is SVG?
- Cutout cuts the shapes against each other like a jigsaw. Nothing overlaps: the background has a drop-shaped hole, and the drop has a hole where the highlight goes.
File size
In cutout mode, every boundary between two shapes is written twice: once as the edge of one shape, and again as the edge, or the hole, of its neighbour. In stacked mode the shape on top carries the edge alone, and the shape beneath does not have to follow it. For the drop above, traced by VTracer 1, that makes the stacked file 1.1 KB and the cutout file 2.9 KB.
That saving is reliable for logos and flat artwork, but it is not a rule for every image. A shape lower in the stack still needs an outline of its own, around everything that rests on it, and in an image with many nested shades, such as a photo, those outlines add up. Traced with VTracer 1's default settings:
| Image | Stacked | Cutout |
|---|---|---|
| The drop above, 120 × 120 | 1.1 KB | 2.9 KB |
| A lion badge logo, 144 × 144 | 9.8 KB | 17.3 KB |
| A photo of a cat and a dog, 800 × 597 | 1.04 MB | 675 KB |
So for logos, icons and illustration, stacked is usually the smaller file; for detailed, shaded images, cutout can be.
Editing
Stacked shapes are easier to work with in a design app:
- Every shape is whole. Select the drop and you get the whole drop, not a ring with a hole punched in it. Move or recolor a shape and nothing behind it shows through.
- The bottom layer is the silhouette. The lowest shape of the subject is its whole outline, ready to recolor, use as a mask, or thicken into a border.
That is why the cut line for a die-cut sticker is a single offset of one shape in stacked mode. See Why convert a JPEG or PNG to vector?
Cutout is now seam-free
Older versions of VTracer built cutout mode by tracing each region separately, so two neighbours did not always share exactly the same edge, and gaps opened where they should have met.
VTracer 1.0 rebuilt cutout mode as a seam-free mosaic: it traces each boundary once and gives it to both neighbours, so the pieces fit exactly, with no gaps and no overlaps. With curve simplification turned on, each shared boundary is simplified once for both shapes, so they stay matched.
Which to use
Use stacked, the default, for:
- Logos, icons and illustration you will edit, recolor or rearrange.
- Layered vinyl and paper crafts, where each layer sits on the one below.
- Stickers and masks built from the silhouette.
Use cutout for:
- Single-sheet cutting, plotting and laser work, where overlapping shapes would mean cutting the same line twice.
- Screen printing and embroidery, where colors should not be printed or stitched on top of each other.
- Detailed or photographic images, where it can be the smaller file.
- Anything where every point of the image should belong to exactly one shape, such as a mosaic or a paint-by-numbers template.