132 lines
10 KiB
XML
132 lines
10 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
Textes source en anglais, traduits par le catalogue « grayisolayers »
|
|
(locale/<langue>/LC_MESSAGES/grayisolayers.mo). Après toute modification
|
|
d'un texte : python i18n.py, puis compléter po/fr.po et relancer.
|
|
-->
|
|
<inkscape-extension translationdomain="grayisolayers"
|
|
xmlns="http://www.inkscape.org/namespace/inkscape/extension">
|
|
<name>Gray Iso-Layers</name>
|
|
<id>fr.alexp.grayisolayers</id>
|
|
|
|
<param name="tab" type="notebook">
|
|
<page name="levels" gui-text="Levels">
|
|
<param name="levels" type="int" min="2" max="64"
|
|
gui-text="Number of gray levels:">16</param>
|
|
<param name="equalize" type="float" precision="0" min="0" max="100"
|
|
gui-text="Level distribution (% of equal areas):"
|
|
gui-description="0 keeps evenly spaced thresholds. 100 spreads the levels so that every board covers the same area: use it when most of the image sits in a few grays, as in a depth map.">0</param>
|
|
<param name="shapes" type="optiongroup" appearance="combo"
|
|
gui-text="Content of each board:">
|
|
<option value="light">Stacked, lightest in front (board no. 1 = darkest, whole image)</option>
|
|
<option value="dark">Stacked, darkest in front (board no. 1 = lightest, whole image)</option>
|
|
<option value="band">Its own gray only (flat areas tiling the image, no overlap)</option>
|
|
</param>
|
|
<param name="layout" type="optiongroup" appearance="combo"
|
|
gui-text="Position of the boards:">
|
|
<option value="stack">On top of each other, at the place of the image</option>
|
|
<option value="side">Side by side, in a grid to the right of the image</option>
|
|
</param>
|
|
<param name="mark" type="bool"
|
|
gui-text="Mark on each board the outline of the next one (stacked boards)"
|
|
gui-description="Assembly guide: the outline of the board to glue on top is drawn in the marking color, without being cut.">true</param>
|
|
<param name="numbers" type="bool"
|
|
gui-text="Write the board numbers"
|
|
gui-description="Drawn in the marking color, to engrave. Framed number: the number of the board itself, on each of its pieces, hidden under the next board when there is room. Plain number: the board to glue in that marked area.">true</param>
|
|
<param name="blur" type="float" precision="2" min="0" max="20"
|
|
gui-text="Smoothing (% of the image's longer side):"
|
|
gui-description="Smoothing applied before cutting the levels: the higher it is, the rounder and simpler the outlines.">1.0</param>
|
|
<param name="edges" type="bool"
|
|
gui-text="Preserve edges while smoothing (portraits, photos)"
|
|
gui-description="Flattens skin and textures but keeps sharp transitions (eyes, mouth, outline of a face). Uncheck for a plain blur, better suited to abstract reliefs.">true</param>
|
|
<param name="resolution" type="int" min="50" max="2000"
|
|
gui-text="Calculation resolution (points on the longer side):"
|
|
gui-description="The image is resampled to this size before the calculation. Higher is more accurate but slower.">800</param>
|
|
<param name="min_area" type="float" precision="3" min="0" max="10"
|
|
gui-text="Smallest island or hole kept (% of the image area):">0.02</param>
|
|
<param name="simplify" type="float" precision="2" min="0" max="5"
|
|
gui-text="Simplification (calculation points):"
|
|
gui-description="Largest deviation allowed when removing nodes. 0 keeps every node.">0.4</param>
|
|
<param name="smooth" type="bool"
|
|
gui-text="Smooth the outlines with Bézier curves">true</param>
|
|
</page>
|
|
|
|
<page name="depth" gui-text="Depth">
|
|
<param name="depth_mix" type="float" precision="0" min="0" max="100"
|
|
gui-text="1. Depth map share (%):"
|
|
gui-description="0 uses the grays of the image alone, 100 its estimated depth alone. In between, the depth gives the volumes and the grays keep details such as the eyes and the mouth. Needs the depth models, installed by deploy.ps1 -Depth.">0</param>
|
|
<param name="depth_model" type="optiongroup" appearance="combo"
|
|
gui-text="2. Depth model:">
|
|
<option value="midas_small">Fast (MiDaS small)</option>
|
|
<option value="depth_anything_v2_small">Fine (Depth Anything V2 Small)</option>
|
|
</param>
|
|
<param name="depth_detail" type="float" precision="0" min="0" max="200"
|
|
gui-text="3. Fine details of the photo (%):"
|
|
gui-description="Carves the fine contrasts of the photo (eyes, mouth, eyebrows, strands of hair) into the depth, which has none of them. A plain background brings nothing and stays at the back. 0 keeps the smooth depth alone.">100</param>
|
|
<label>Each setting carries a number: the examples below show, under the same number, what it does for several values.</label>
|
|
<separator/>
|
|
<!-- Schéma généré par docs/schema_profondeur.py, en anglais, affiché
|
|
aux 3/4 du PNG (900 px), comme celui de l'onglet « Help ». Une
|
|
ligne par paramètre, au numéro que porte son libellé. -->
|
|
<image width="675" height="622">images/depth_en.png</image>
|
|
<label>The estimate runs on the graphics card when possible and is kept in a cache: only the first run on an image takes a few seconds.</label>
|
|
</page>
|
|
|
|
<page name="style" gui-text="Style">
|
|
<param name="fill_mode" type="optiongroup" appearance="combo" gui-text="Fill:">
|
|
<option value="gray">Gray of each level</option>
|
|
<option value="color">Single color (below)</option>
|
|
<option value="none">No fill (outlines only)</option>
|
|
</param>
|
|
<param name="fill_color" type="color" appearance="colorbutton"
|
|
gui-text="Fill color:">4294967295</param>
|
|
<param name="stroke_width" type="float" precision="3" min="0" max="100"
|
|
gui-text="Stroke width (0 = no stroke):">0.2</param>
|
|
<param name="unit" type="optiongroup" appearance="combo" gui-text="Unit:">
|
|
<!-- Les unités ne se traduisent pas -->
|
|
<option translatable="no" value="mm">mm</option>
|
|
<option translatable="no" value="cm">cm</option>
|
|
<option translatable="no" value="px">px</option>
|
|
<option translatable="no" value="pt">pt</option>
|
|
<option translatable="no" value="in">in</option>
|
|
</param>
|
|
<param name="stroke_color" type="color" appearance="colorbutton"
|
|
gui-text="Cut stroke color:">4278190335</param>
|
|
<param name="mark_color" type="color" appearance="colorbutton"
|
|
gui-text="Marking stroke color:">255</param>
|
|
<param name="keep_original" type="bool"
|
|
gui-text="Keep the original image">true</param>
|
|
</page>
|
|
|
|
<page name="help" gui-text="Help">
|
|
<!-- Schéma généré par docs/schema_parametres.py, en anglais :
|
|
Inkscape ne traduit pas le chemin d'une image. Affiché aux
|
|
3/4 du PNG (900 px) pour limiter la hauteur de l'onglet. -->
|
|
<image width="675" height="617">images/parameters_en.png</image>
|
|
<separator/>
|
|
<!-- Un paragraphe par ligne : Inkscape le replie à la largeur de
|
|
l'onglet ; des retours à la ligne forcés le laisseraient étroit. -->
|
|
<label xml:space="preserve">Select one or more bitmap images (imported photo, height map, blurred noise), then run the extension. Colors are read as grays and transparency as white.
|
|
|
|
The image is smoothed, then split into the requested number of gray levels with evenly spaced thresholds. Each level becomes one closed path that follows the edge of its flat area, like a contour line on a map.
|
|
|
|
Each gray level goes into its own layer, named Board no. 1, Board no. 2... from the back to the front, added above the image: as many new layers as gray levels. The boards are meant to be cut and stacked: board no. 1 covers the whole image and each following board is smaller and lies in front of the previous one, lightest (or darkest) in front. In each layer, the cut outline of the board is drawn in the cut color (red), and the outline of the next board is carried over in the marking color (black), to show where to glue it. With the board numbers, each piece of a board carries its own number in a frame, and each marked area carries, without a frame, the number of the board to glue there. With "Its own gray only", a board holds the flat area of its gray alone: the flat areas tile the image without overlapping and carry no marking. Several selected images share the same layers. With the boards side by side, each board is moved into its own cell of a grid to the right of the image, with its marking, so that every board can be seen and cut on its own.
|
|
|
|
For a relief that follows the real volumes of a portrait rather than its light and shadows, raise the depth map share (Depth tab): at 100, the boards follow the volumes, and the fine details setting carves the eyes and the mouth into them. A depth map made elsewhere (8 or 16 bits) can also be imported and selected like any image, with a share of 0. In both cases, if most boards come out empty or the subject only gets a few of them, raise the level distribution.
|
|
|
|
For laser cutting, choose no fill: only the cut and marking strokes remain. For line art only, choose a white single-color fill, or no fill, with a black stroke and no marking. If the outlines are too busy, raise the smoothing or the smallest island; if they look angular, raise the smoothing or the simplification. If a face is no longer recognizable, lower the smoothing and keep "Preserve edges" checked.</label>
|
|
</page>
|
|
</param>
|
|
|
|
<effect>
|
|
<object-type>all</object-type>
|
|
<effects-menu>
|
|
<submenu name="AlexDesign"/>
|
|
</effects-menu>
|
|
</effect>
|
|
|
|
<script>
|
|
<command location="inx" interpreter="python">gray_iso_layers.py</command>
|
|
</script>
|
|
</inkscape-extension>
|