Outils pour utilisateurs

Outils du site


issue96:inkscape

Ceci est une ancienne révision du document !


The last tab of the Tiled Clones dialog is labelled “Trace” and, unsurprisingly, it's used for tracing existing drawings or bitmap images to create an array of clones that are related to some aspect of the underlying image. Initially it looks complex, but it's actually far simpler than it appears. After using the Reset button in the dialog, most of the fields in this tab become disabled. To activate tracing mode, you have to first check the box on the top line. From then on it's just a case of choosing the options you want from each of the three numbered sections. These can be broadly described as: • Which aspect of the image do you want to use as your source of data values? • How do you want to modify those values? • What features of the clones do you want those values to apply to? To demonstrate, I'll use the familiar face of La Giaconda as a background image, with a red round-cornered square as the selected parent object for cloning. When tracing, the clones are first placed, sized and rotated in accordance with the other tabs in the dialog, then the background image is tested underneath each clone's position to extract a value that will be used to further adjust the clone.

Le dernier onglet de la boîte de dialogue des Clones en pavage est libellé « Calquer » et, sans surprise, il est utilisé pour calquer des dessins existants ou des images bitmap dans la création d'un ensemble de clones reliés par certains aspects à l'image sous-jacente. À première vue, ça parait complexe, mais c'est en fait plus simple qu'il n'y parait.

Après avoir utilisé le bouton R-à-z de la boîte de dialogue, la plupart des champs de l'onglet sont désactivés. Pour activer le mode de calquage, vous devez d'abord cocher la première ligne en haut. Ensuite, il s'agit juste de choisir les options que vous désirez dans chacune des trois sections numérotées. Elles peuvent décrites en gros ainsi :

• Quel aspect de l'image voulez-vous utiliser comme source des valeurs de données ?

• Comment voulez-vous modifiez les valeurs choisies ?

• A quelles caractéristiques des clones voulez-vous appliquer ces valeurs ?

Pour la démonstration, je vais utiliser la figure familière de la Joconde comme image d'arrière-plan, avec un carré à angles arrondis rouge comme objet parent sélectionné pour le clonage. Dans le calquage, les clones sont d'abord placés, dimensionnés et tournés suivant les autres onglets de la boîte de dialogue, puis l'image d'arrière-plan est testée sous la position de chaque clone pour extraire une valeur qui sera utilisée ensuite pour ajuster le clone.

In section 1, we need to tell Inkscape what value to extract. You can choose from a general color value or one of the individual components of that color – Red, Green, Blue, Hue, Saturation or Lightness. There's also an option for Opacity, which extracts the alpha value from the underlying image. This section results in a single number for each clone. If “L” was chosen, for example, the dark parts of the image will yield a low number, whereas the light parts yield a high number. Section 2 gives you the opportunity to modify the collection of numbers that you've created in section 1. You can adjust the “gamma”, which allows you to shift the midpoint of the number range. This is best adjusted in small amounts once you've seen what the output looks like. Positive numbers will shift the mid-point upwards, negative values will shift it downwards. For example, when tracing a dark image using the “L” channel, you might want to shift the mid-point down – to better center the range within the values you're extracting. When tracing a light image, on the other hand, you might want to shift it upwards. The Randomise field, as you might expect, just modifies each value from section 1 by a random number. The value in this field represents the maximum amount of randomness that is allowed. The Invert checkbox swaps low values for high values, and vice versa. It's used when you want low numbers from your light areas, and high numbers from the dark areas, for example.

Dans la section 1, nous devons indiquer à Inkscape quelle valeur extraire. Vous pouvez choisir une valeur générale de couleur ou une des composantes fondamentales de cette couleur - Rouge, Vert, Bleu, Teinte, Saturation ou Luminosité. Il y a aussi une option pour l'Opacité, qui extrait la valeur alpha de l'image sous-jacente. De cette section, il résulte une valeur pour chaque clone. Par exemple, si « L » a été choisi, les parties sombres de l'image vont donner un petit nombre, alors que les parties claires donneront un grand nombre.

Dans la section 2, c'est l'occasion de modifier l'ensemble des nombres que vous avez créé en section 1. Vous pouvez ajuster le « gamma », qui vous permet de décaler la valeur moyenne d'une tranche de nombres. C'est mieux de l'ajuster par petites touches, une fois que vous avez vu ce à quoi ressemble le résultat. Des nombres positifs vont décaler le point moyen vers le haut, des nombres négatifs vers le bas. Par exemple, si vous calquer une image sombre en utilisant le canal « L », vous pourriez désirer décaler le point moyen vers le bas - pour mieux centrer la fourchette des valeurs que vous avez extraite. A l'inverse, quand vous claquer une image claire, vous pourriez vouloir la décaler vers le haut.

Le champ Hasard, comme vous pouvez vous y attendre, modifie juste chaque valeur de la section 1 par un nombre aléatoire. la valeur dans ce champ représente la quantité maximum d'aléa autorisé. La case à cocher Inverser transforme les valeurs basses en valeurs élevées, et vice-cersa. C'est utilisé quand vous voulez des valeurs basses pour les parties claires et des valeurs élevées pour les parties sombres, par exemple.

Finally, section 3 is where we tell Inkscape what to do with the extracted, adjusted values. For each clone, you can use the corresponding number to modify any combination of Presence (the probability that the clone is created or not), Colour, Size and Opacity. The latter two are the easiest to explain: in both cases the original parent element represents the maximum value that is allowed. None of your clones can get any larger, or more opaque, than the parent. Instead, the generated values are used to reduce the size of the clone, or reduce its opacity (making it more transparent). Let's take a look at an example. I've traced the Lightness values of La Giaconda, adjusting them with a Gamma of -1.0, and finally applying the results to the Size and Opacity of the clones. The parent object is in the top left, and you can see that dark areas (where “L” is low) result in small reductions of size and opacity. Light areas (where “L” is large) result in much bigger reductions. Checking the Invert control would have resulted in the opposite effect: large, opaque clones in the light areas and small, transparent ones in the dark areas.

The Presence option in section 3 is, in my opinion, broken. A sensible way for this to work would be for values above a certain threshold to result in a clone being drawn, with values below that threshold producing no clone. That's not what happens though. Rather the value is used to adjust the probability that a clone will be drawn. Whether it actually is drawn or not then comes down to (weighted) luck. With “L” selected in section 1, it becomes likely that clones will be drawn in dark areas, and less likely they'll be drawn in light areas, but as it's all down to chance, it makes the results somewhat unpredictable. To make matters worse, the presence calculation, in all its randomness, is performed every time you click the “Create” button. Click it again and the arrangement will be different. Another click, another arrangement. Just take a look at this example – all three images were taken using exactly the same settings, just by clicking the button three times. With such radically different results from the same input values, it's no wonder I question the benefit of this “feature”. The Colour checkbox is perhaps the most useful of all the options in section 3. To use it you first have to unset the fill of your parent object, just as we did last time when using the “Colour” tab. This option is a little different to the others because it doesn't use the value from section 1. Instead, it takes the RGB value of the pixels under the clone and, after adjusting them in accordance with section 2, applies the resultant color to the clone. A picture describes it far better than a lot of words. This effect usually works best with a large number of fairly small clones. That combination can bring a lesser computer to its knees fairly quickly, though, so be careful before you hit the Create button.

One limitation of this dialog is that each of the four options in section 3 is tied to a single set of manipulations in section 2. You can't have Opacity set directly by the “L” value, whilst also having Size modified by the inverted value, or use a different gamma for the Colour and Presence. It's not usually a problem, but if you do need such combinations then you've little choice but to use the Tiled Clones dialog as a starting point, then manually adjust each clone afterwards. The Trace tab can be used in conjunction with the other tabs if you want to add some rotation to your clones, or perhaps adjust their size or spacing. The latter can be especially useful if you need to tighten up the array when using the Size checkbox in section 3. You should also bear in mind that the examples I've given here are deliberately simplistic. Your parent object can be almost any shape or group. The background you're tracing, similarly, can be a collection of objects rather than a bitmap image. Just remember that cloning complex parents takes more processing power and memory, so prepare for slowdowns or even crashes if you push the complexity or number of clones too high.

To conclude our look at the Tiled Clones dialog, I'm going to return to a couple of controls that I skipped over previously. The first is the “Use saved size and position of the tile” checkbox at the bottom of the dialog. Remember how Inkscape uses the bounding box of the parent as the basic unit of measurement throughout this dialog? This checkbox overrides that default to instead use the “saved” bounding box dimensions – where “saved” just means “the last value used before you checked this box”. Consider our color trace of La Giaconda. By using 16 rows and 11 columns, my particular rounded square covers the space quite nicely. But what if I decide to rotate the square to make a diamond? Doing that increases the size of the bounding box, so my 16 rows and 11 columns now spills well over the edges of the background image. One obvious solution is to reduce just the number of rows and columns, but that still leaves me with big gaps between the tiles. I could tweak the values in the Shift tab to compensate, but as I already had a tile placement that suited my needs, it's easier just to tell Inkscape to “save” that and re-use it for subsequent tiled clones.

Returning to the image as it was previously (by pressing CTRL-Z a few times) gets me back to a tile layout I'm happy with. At this point I can tick the “Use saved size…” checkbox to use that layout even while I change other parameters in the dialog, or make modifications that will alter the size of the parent's bounding box. Rotating the parent again, and adding a little variation with the Randomise field in the Rotation tab, produces a much better result. The last control to cover in the Tiled Clones dialog is actually the first one. It's the pop-up menu on the Symmetry tab, which determines how the tiles are initially arranged, prior to any adjustments from the other tabs. Mathematically speaking, there are 17 possible symmetries for a two-dimensional pattern – see the Wikipedia page for “Wallpaper group” for more technical details. These symmetries are based on translating (moving), rotating and reflecting the parent object to create a repeating pattern, and the pop-up lists each symmetry by its mathematical title in “short” notation (such as “P1”) followed by a description of the symmetry (such as “simple translation”).

So far, I've only used P1 for this tutorial, because it's the simplest to understand when used with the other tabs in the dialog. Other symmetries can quickly lead to complex (and confusing) results, but they can be useful if you want to create tiled patterns or kaleidoscopic art. Some work best with triangular arrangements of objects, others with more rectangular parents. Unfortunately, however, it's very easy to confuse Inkscape when using more complex symmetries. Even something as simple as switching your document from portrait to landscape mode can result in wildly misplaced clones. The following page shows examples of all 17 symmetries, but several of these had to be created in a fresh document and imported into the final image in order for them to work as expected. In a couple of cases, I was never able to produce the expected arrangement. They came close, but I had to manually arrange the clones a little to get the correct result. I've outlined those ones in red. If you do want to use the advanced symmetries, I recommend checking out this page in the official manual, which contains a similar set of images but with a little more detail: http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Tiles-Symmetries.html

issue96/inkscape.1431239560.txt.gz · Dernière modification : 2015/05/10 08:32 de d52fr