Cleaning the artwork
What is the black-and-white stage for, and what does each control do?
Before anything can be cut, your picture has to become a decision: for every point on the sheet, is there material here or is there a hole? That is what this stage produces — a mask (a flat black-and-white version, with no grey at all). The preview shows the sheet as it will be cut: white is wood you keep, black is cut away.
Most of the time the studio gets this right on its own and you can walk straight past it. Look at it when the layers come out wrong, because the mask is usually why. Nothing here costs credits, and the original picture is never touched — the mask is recalculated from it every time, so you can always reset and start again.
When the mask is cleaned again
You do not have to press anything after moving a control here. About half a second after you stop, the studio cleans the picture again with the new settings and the preview updates. Re-clean does the same thing at once. While the controls and the mask disagree, the bar at the foot of the studio says mask settings changed · re-clean; normally that is only for the moment before the clean runs, and building the layers cleans first if it is still showing.
Sometimes a clean is refused, because the settings would leave a mask that is all wood or all holes. The studio says why and keeps the mask it had; it does not try the same settings again on its own. Move a control, or press Re-clean, to try again.
Only this page cleans the mask on its own. Reset to defaults at the foot of the left pane leaves these controls as they are - Reset cleanup here is the one that resets them - and a template you choose for a project whose picture is already cleaned keeps this cleanup too.
A clean always starts again from the picture, so two things go with it.
- The built layers. They were cut from the old mask, so they are thrown away and the button at the foot of the studio reads Generate Layers again. Building the same picture again is free, whatever you changed here.
- Anything you painted with the brush. Painting edits the mask itself, and a fresh clean replaces the mask. Get the controls right first and paint last.
Deciding black from white
Everything in this group answers one question: how bright does a pixel have to be before it counts as paper rather than ink?
Threshold mode
Which method picks that brightness cut-off. Three choices, and the right one depends on how evenly lit your picture is.
- Automatic (Otsu) — reads the whole picture’s histogram and picks the cut-off that best separates the two peaks. The default, and right for almost all generated artwork, which is evenly lit by construction.
- Adaptive — judges each pixel against its own neighbourhood rather than against one number for the whole image. Use this when the picture is unevenly lit: a photographed drawing with a shadow across one corner, or a scan that is darker at the spine. Automatic gives up on those, because no single cut-off is right in both the bright and the dark half.
- Manual — you choose the number yourself with the Threshold value slider. Worth reaching for when both of the others are close but not quite, and you can see exactly which way you want it to move.
Threshold value
The brightness cut-off itself, from 0 to 255, and only used in Manual mode. In the other two modes the studio computes this number for you and the slider is disabled; the figure it landed on is shown as threshold used in the readout above the controls.
Which way to move it depends on Invert, which is why the hint under the slider changes with it. With Invert on — the normal case, where the dark ink is the wood — a lower value keeps less material and a higher value keeps more. If your design has come out spidery and fragile, raise it. If the openings have closed up and it reads as a solid blob, lower it.
Adaptive block
How big a neighbourhood each pixel is judged against, in pixels, and only used in Adaptive mode. Always an odd number, because the neighbourhood is a square centred on the pixel being judged.
Small values see fine texture and will happily find edges inside what you meant to be a solid area. Large values only see the big shapes and behave more like Automatic. If adaptive is producing a grainy, noisy mask, this is usually too small; if it is ignoring the uneven lighting you turned it on for, it is too large.
Adaptive C
A constant subtracted from each neighbourhood’s average before the comparison — in plain terms, a thumb on the scale, and only used in Adaptive mode. It nudges the judgement one way or the other after the neighbourhood has been measured.
With Invert on, higher keeps less material and lower keeps more; with Invert off it is the other way round. Reach for it when Adaptive has the right idea but is consistently a little too generous or too mean across the whole picture.
Pre-blur
Softens the picture before the black-and-white decision is made, measured in pixels. A little smooths out speckle and jagged, stair-stepped edges, so the traced outline comes out cleaner. Too much loses real detail — fine line work blurs into its neighbours and then thresholds as one solid mass.
Which side is the wood
Invert
Which of ink and paper becomes material. On — the normal case — the dark ink in the artwork is the wood, so the mask looks like a negative of your picture. Off means the light ground is the wood and the ink is cut away, so the mask looks like the artwork.
Either polarity can be correct; it depends on whether you drew the thing you want to keep or the thing you want to remove. The preview is the fastest way to tell, because it always shows the wood as white.
Auto polarity
Lets the studio choose Invert for you, by looking at which reading produces a mask that could actually be cut. Leave it on unless you are deliberately working against the obvious reading; turning it off is how you keep a polarity the studio would otherwise override.
It also reads the border. A drawing in dark ink on white whose strokes do not touch one another would normally have the white paper taken as the wood, with the strokes cut out of it. Under the Outline and Open frame borders it never does that: the paper reaches every edge of the picture, so cutting round it would cut the rectangle. The ink stays the wood and its loose strokes are held together with small tabs. Under Frame or Circle the paper is still the wood, with no tabs needed. The clean happens before you choose the border, so when you change the border between Outline or Open frame and Frame or Circle, the next build cleans again first if that changes which side Auto polarity picks. It never does that over a mask you have painted, because a clean would lose the painting: the build keeps your painted mask as it is and says so in its notes, and if the piece then does not look right, Re-clean (which starts the painting over) or change Invert. Choosing the border before you paint avoids the question.
Remove background
Drops a plain background so only the subject is cut. Turn it off when the background is part of the design — a border, a frame, a field of pattern the piece needs. Leaving it on in that case quietly deletes half the artwork.
Tidying up what is left
Thresholding is a per-pixel decision, so it produces stray pixels: specks of material floating in an opening, pinholes inside a solid area. These controls remove the ones too small to cut, which the laser would otherwise spend time tracing and which would fall out of the sheet anyway.
Min blob area
Throws away islands of material smaller than this, measured in square pixels. These are specks of wood too small to cut — they would char rather than cut cleanly, and anything that did survive would drop through the bed. The readout above shows blobs removed so you can see what it caught.
The default, 400 px², is set high on purpose, because hatching and speckle would otherwise each be given a tab to hold them. On a 1024-pixel picture cut 300 mm wide it takes anything smaller than a speck about 6 mm across. It is judged in pixels before the studio knows how big anything will be, so it is the first control to turn down when small separate pieces you drew — dots, the pupil of an eye, the dot over an i — go missing. At 0 it removes nothing.
Min hole area
The same idea the other way round: fills interior holes smaller than this. A hole that small is usually a stray pixel rather than something you drew, and cutting it means the beam plunging in for a cut nobody will see. holes filled in the readout shows the count. It is 0, filling nothing, by default: stray pinholes left in the mask are dropped by the build anyway, while filling them also filled in small dots people had drawn.
Open and Close
Two shape operations applied after thresholding, both measured in pixels.
- Open erodes then dilates, which removes thin protrusions and isolated specks while leaving big shapes their original size. Reach for it when edges are furry.
- Close dilates then erodes, which fills pinholes and joins gaps that are nearly touching while leaving big shapes their original size. Reach for it when a line that should be continuous has broken into dashes.
Both round off corners as a side effect, so use the smallest value that fixes the problem you actually have. Both are 0 (off) by default, and on line-work, where the lines themselves are the wood, Open erases thin strokes and Close fills in the gaps between them.
Smoothing passes
How many times the outline is smoothed after everything else. Each pass rounds the boundary a little further. It makes for a nicer cut path and a less jagged edge on the finished piece; too many and sharp corners you meant to keep become soft.
Keep largest region only
Discards everything except the single biggest connected piece of material. Useful when the artwork has one clear subject and the rest is debris. Destructive when it does not — a design made of several separate elements loses all but one of them, and there is no warning because each one was genuinely a separate region.
Painting the mask by hand
The controls above are global: they apply the same rule everywhere. When one area needs different treatment from the rest, paint it directly on the mask preview with the brush in the toolbar. Each stroke is applied to the mask when you let go.
- Erase removes material — paints an opening.
- Restore puts material back.
- radius is the brush size in pixels, from 2 to 120.
Two things to know before you paint. A stroke changes the mask the layers were cut from, so it throws away the built layers and you build again with Generate Layers, which is free for a picture you have already built. For the same reason the brush waits while the studio is working on the project - during a build above all, which is cutting from the mask as it stands - and the strip above the mask says so. And a stroke only lasts until the next clean: moving any control on this page, Reset cleanup or Re-clean start from the picture and lose what you painted. A change of border does not — the build keeps a painted mask rather than cleaning it again. Paint last, once the controls are where you want them.
Reset cleanup puts every control on this page back to its default. If that changes anything, the mask is cleaned again a moment later, which also clears anything you painted. Re-clean recomputes the mask from the picture with the current settings straight away; you rarely need it, because changing a control does the same by itself.
Reading the numbers
The row above the controls reports what the current settings actually produced.
- material fraction — how much of the sheet is wood. Very low means a fragile design; very high means one with few openings. material pixels is the same thing as a pixel count.
- components — how many separate pieces of material there are. A number in the hundreds usually means speckle that Min blob area should be removing.
- interior holes — openings fully enclosed by material.
- bridges needed — roughly how many tabs the build will need to hold the loose pieces: the separate pieces, less the dust the build sweeps away and the one main piece. The build adds a few of its own, so treat it as an estimate. It is left out when the studio does not know the picture's size yet.
- largest component — what share of the material is in the biggest piece. Close to 100% means one connected design; a low number means many separate pieces, which is worth knowing before you cut.
- threshold used — the cut-off the studio actually chose, which is the number Manual mode starts from if you switch to it.
- blobs removed and holes filled — what the two minimum-area controls caught.
Above the numbers there is sometimes a line starting if inverted or with Invert off. It measures the other side of the drawing as the wood and says whether that would need fewer bridges, and which way to set Invert if it would.
What good looks like
Crisp edges, solid areas that are solid, and openings that are clearly open. If you squint at the preview and it reads as a stencil, it will cut.
What to worry about: grey mush around every edge, openings that have filled in, or a field of tiny dots across the background. Each of those is a threshold or cleanup problem, and each is much easier to fix here than in the layer stage.
Questions
Does cleaning cost credits?
No. Cleaning, painting and re-cleaning are free on every plan, as often as you like. The one step after the picture that can cost anything is building it into layers: on Pay as you go the first build of each new picture costs 250 credits, and every rebuild of that picture afterwards is free, whatever you changed here. On Studio every build is included.
I moved the sliders and made it worse.
Press Reset cleanup to put every control back to its default. The original picture is kept and the mask is recalculated from it, so nothing of the picture is lost — but anything you painted on the mask is, along with the built layers, which you build again for free.
My small dots and details disappeared.
Start here, with Min blob area. It throws away separate specks of wood below a size in pixels, its default is high on purpose, and it will take small deliberate dots with the speckle. Turn it down, and watch blobs removed fall. If the dots are in the mask but missing from the layers, the next setting is Min feature size in Build quality: a piece of wood standing inside an opening that is smaller than that is cut away with its opening rather than held with a tab. Lower it and rebuild, which is free. A high Contour smoothing under Vector tracing can also close very fine gaps, and Keep largest region only throws away every separate piece but one.
Why did my painting disappear?
Something cleaned the mask again. Any change to a control on this page does it a moment later, and so do Reset cleanup and Re-clean. A clean starts again from the picture, so paint last. Reset to defaults in the left pane and choosing a template do not clean it. Changing the border no longer does it: before this was fixed, switching between Outline and Frame or Circle could clean a painted mask again without saying so, and now the build keeps the painting and notes that it did.
The threshold sliders are greyed out.
Threshold value only works in Manual mode, and Adaptive block and Adaptive C only work in Adaptive mode. Switch Threshold mode to the one you want and its controls become available.
My photograph will not clean up.
It probably will not. Photographs have soft edges everywhere and the studio needs hard ones. Adaptive mode and Pre-blur will get you closer than the defaults, but the honest answer is to use the photograph as a reference and generate or draw line art from it instead.
Still stuck? Write to hello@mandalalayers.com — a person reads it, and a photograph of what came off your cutter helps more than a description.