Outils pour utilisateurs

Outils du site


issue111:inkscape

Ceci est une ancienne révision du document !


It appears that last month's announcement about forums was premature. Suffice to say that politics and personalities have been at loggerheads in the world of Inkscape support forums, but things have since calmed down. So I'll stick to pure facts: Both the inkscapeforum.com and inkscapecommunity.com forums continue to operate, each with a different subset of users (and some degree of overlap). Support requests posted to either will generally elicit a response, and there's no need for normal Inkscape users to concern themselves with the behind-the-scenes shenanigans. None of this has any impact on the development of Inkscape itself. If and when there is any more concrete information about an official forum, I’ll write about it, but until then I'll be keeping forum politics well out of this column!

Il apparaît que l'annonce du mois dernier à propos des forums fut un peu précipitée. Il suffit de dire que que les comportements et les personnalités étaient en opposition dans le monde des forums de soutien Inkscape, mais que, depuis, les choses se sont calmées !

Aussi, je vais m'en tenir aux faits : les deux forums inkscapeforum.com et inkscapecommunity.com continuent à fonctionner, chacun avec un sous-ensemble des utilisateurs (et un peu de recouvrement). D'une manière générale, les demandes de support postées sur l'un d'eux auront droit à une réponse et les utilisateurs ordinaires d'Inkscape n'ont pas à s'inquiéter des manigances de coulisse. Rien de tout ça n'a un impact sur le développement d'Inkscape lui-même. Si et quand des informations plus concrètes se font jour à propos d'un forum officiel, je vous en parlerai, mais, jusqu'à maintenant, je garderai les jeux politiques des forums en dehors de ces colonnes !

Now, where were we…? Oh yes, filters. Let's return to the single-colored drop shadows of Part 49 to show you a simpler way to create the same effect. Previously, I introduced you to the Color Matrix primitive as a means of converting one color to another, but when all you need to do is to introduce a specific fixed color into your filter chain, it's usually easier to use the Flood primitive. As you might have guessed from the name, the Flood primitive floods an area with color. You may now be thinking along the lines of the bucket tool in Inkscape or other graphics programs, which typically floods an area by working outwards until it hits a differently colored boundary line. But there's no such finesse here; the flood primitive simply fills the whole of the “filter effects region” with a flat color. The filter effects region is the rectangle defined by the Filter General Settings tab (see part 48), and is typically larger than the bounding box of your selected objects.

Maintenant, où en étions-nous ? Ah, oui, aux filtres. Revenons à l'ombre portée monochrome de la partie 49 pour vous montrer une façon plus simple de créer cet effet. Précédemment, j'avais parlé de la primitive Matrice des couleurs comme un moyen de convertir une couleur en une autre, mais, quand tout ce qu'il y a à faire est d'introduire une unique couleur fixe dans votre chaîne de filtres, il est généralement plus simple d'utiliser la primitive Remplissage.

Comme vous pouvez le deviner par son nom, La primitive Remplissage inonde une zone avec des couleurs. Vous êtes peut-être maintenant en train de penser entre les lignes à l'outil Pot de Peinture ou à d'autres programmes graphiques, qui généralement remplissent une zone en travaillant du centre vers le bord jusqu'à ce qu'il rencontre une bordure d'une autre couleur. Mais il n'y a pas autant de finesse ici ; la primitive Remplissage remplit simplement la totalité de la « région des effets du filtre » avec une couleur unie. La région des effets du filtre est le rectangle défini dans l'onglet Paramètres généraux des filtres (voir partie 48) et est typiquement plus grand que la boîte englobante des objets sélectionnés.

Starting again with some simple text, create a filter and add the Flood primitive. With the primitive selected, use the controls at the bottom of the Filter Effects dialog to choose a color and opacity, and you should get a result something like this (note that it doesn't matter what the input of the Flood primitive is connected to, as it has no effect on the output): Not terribly inspiring, is it? So the question now is how to turn this big blue rectangle into a softly shaped drop shadow. If you followed last month's tutorial, you'll know that the Composite filter (used in “In” mode) can be used to crop the blue rectangle into the shape of our text. It's not very common that you'll want the output from your filter to be strictly rectangular, rather than following the shapes and curves of your selected objects. So whenever you see a Flood primitive in a filter chain, there's a good chance that there will be a Composite filter following along shortly afterwards to trim it to shape.

En recommençant avec un nouveau texte simple, créez un filtre et ajoutez la primitive Remplissage. Avec la primitive sélectionnée, utilisez les contrôles en bas du dialogue des effets de filtres pour choisir une couleur et une opacité, et vous devriez obtenir un résultat comme celui-ci (notez que l'entrée à laquelle le filtre est connecté n'a pas d'importance , car elle n'a pas d'effet sur la sortie) : Pas vraiment exaltant, n'est-ce pas ? Aussi, la question, maintenant, est de savoir comment transformer ce grand rectangle bleu en ombre portée aux formes douces. Si vous avez suivi le tutoriel du mois dernier, vous savez que le filtre Composite (utilisé en mode « In ») peut être utilisé pour découper le rectangle bleu à la forme de votre texte.

Ce n'est pas très classique d'avoir une sortie de filtre bien rectangulaire ; vous voudriez plutôt qu'il suive les formes et les courbes de vos objets sélectionnés. Ainsi, si vous voyez une primitive Remplissage dans votre chaîne de filtres, il y a une bonne chance qu'il y ait un filtre composite qui suive pas loin derrière pour ajuster à la forme.

Now that we've got a colored version of the text, it's a straightforward matter to offset and blur it, before merging it with the Source Graphic – you should be adept at those steps by now, so I'll spare you a detailed description and instead present the result, a graph version of the chain, and a screenshot from Inkscape. Whilst Flood provides you with a rectangle of a single color, the Turbulence primitive gives you a rectangle filled with a chaotic mix of colors. It's not strictly random, in the mathematical sense, as the output is well defined and repeatable (meaning that your filters should look the same in any renderer – although in reality that may not be the case), but, in the colloquial sense, it's this primitive that you should head for if you want to add a degree of randomness or noise to your image. It has two modes: Fractal Noise and Turbulence. The difference between them is that the latter has more “troughs” in the output, where the background shows through, giving the appearance of joined up lines running throughout the output, whilst the former has more of a cloudy appearance.

Maintenant que nous avons obtenu une version colorée du texte, il y une manière directe de le décaler et de le flouter, avant de le fusionner avec la Source image - vous devriez être habitué à ces étapes maintenant, aussi je vous épargnerai une description détaillée et je présenterai les résultat, une vision graphique de la chaîne et une copie d'écran d'Inkscape.

Alors que Remplissage vous fournit un rectangle d'une seule couleur, la primitive Turbulence vous donne une rectangle rempli d'un mélange chaotique de couleurs. Ce n'est vraiment aléatoire, au sens mathématique, car la sortie est bien définie et reproductible (ça signifie que tous vos filtres se ressembleraient quelque soit l'outil de rendu - ce qui n'est pas les cas en réalité), mais, dans un sens courant, c'est vers cette primitive que vous devez aller si vous voulez ajouter un degré d'aléa ou de bruit à votre image. Elle a deux modes : Bruit fractal et Turbulence. La différence entre les deux est que le dernier a plus de « creux » dans la sortie, où le fond transparaît, donnant l'apparence de lignes réunies pendant la sortie, alors que le premier a plus l'apparence d'un nuage.

Whichever mode you choose, the rest of the controls remain the same. The Base Frequency sliders control how “dense” the noise appears – low values give slow, smooth transitions, whereas higher values result in transitions that change more rapidly, making the output more reminiscent of “snow” on an old un-tuned TV set. The horizontal and vertical frequencies are usually the same, but can be changed independently by toggling the Link button to the right. The Octaves slider controls how detailed or complex the noise appears; taking this much beyond about 4 is rarely worthwhile as the increased detail is too small to see, and it imposes an extra load on the processor. Finally, the Seed value can be used to prime the pseudo-random number generator at the core of the filter to give you a slightly different output pattern without changing the other parameters. The following images show the effect of varying the Base Frequency and the Octaves sliders, for both the Fractal Noise and Turbulence modes. You'll notice that the images are fairly pastel in tone. This is because all four channels (R, G, B, A) are calculated independently – each pixel actually consists of a combination of four pseudo-random numbers. The value of the Alpha channel will override all the others, so even if you happen to have a strong color from the RGB components, a low Alpha can knock it back to a translucent shadow of its former self.

Quelque soit le mode choisi, le reste des contrôles est le mème. Les réglettes de la Fréquence de base contrôle la « densité » affichée de bruit - les basses valeurs en donnent peu, avec transitions douces, alors que les hautes valeurs, dans les transitions, les changements sont plus rapides, donnant à la sortie une réminiscence de l'aspect « neigeux » des vieilles télés non réglées. les fréquences horizontale et verticale sont en général à la même valeur, mais peuvent être modifiées indépendamment en appuyant sur le bouton Lien sur la droite.La réglette Octave contrôle la précision ou la complexité du bruit ; le pousser au-delà de 4 est rarement valable car l'augmentation du détail est est trop petit pour le voir et cela impose un charge supplémentaire au processeur. Enfin, la valeur du Germe peut être utilisée alimenter le générateur de nombre pseudo-aléatoire au cœur du filtre pour avoir un motif de sortie légèrement différent sans changer les autres paramètres.

Les images suivantes montrent l'effet de différentes valeurs des réglettes Fréquence de base et Octaves, pour les modes Bruit fractal et Turbulence.

Vous aurez noté que les images sont d'un ton nettement pastel. C'est parce que les quatre canaux (R, G, B, A) sont calculés indépendamment - chaque pixel consiste réellement en une combinaison de 4 nombres pseudo-aléatoires. La valeur du canal Alpha écrasera toutes les autres ; ainsi, même s'il vous arrive d'avoir une couleur forte dans les composantes RGB, un Alpha faible va larabaisser à une pâle imitation.

You can use a Color Matrix to extract a single channel, or to stretch the output to make it more vibrant. In this example, I've done the latter, as well as wiping out the Alpha channel entirely and replacing it with a fixed value of 1 (fully opaque). The cyan color of the original text doesn't show through at all in this case (any cyan in the result comes purely from the Turbulence filter), but I have used a black background to make the colors stand out even more. To extract a single channel from the output, zero everything in your Color Matrix, and then populate just one of the first four columns, depending on what you want to get out. For example, setting a value of 1.00 in every field in the third column would take the 0-255 values in your Blue channel and map them to RGBA in the output. A Blue value of 63 on the input would produce (63, 63, 63, 63) – a translucent gray color – as an output. You might want to take the Alpha channel out of the equation by setting a value of 1.00 in the bottom right corner (the Fixed Value column for the Alpha output). In this example, I've used the Green channel to set only the Alpha of the output, and stretched the values a bit by using 3.00 rather than 1.00. This gives an image that runs from opaque black to transparent black, so, by Compositing it (to clip it to shape) and then Merging it with the cyan Source Graphic, it's easy to create an “electric” or “plasma” effect.

Vous pouvez utiliser une Matrice des couleurs pour un extrait un seul canal, ou pour étire la sortie pour la rendre plus

You could also bring a Flood primitive into a chain like that to ensure that your result has the right color in the filter, regardless of the color of the object it's applied to. Don't forget that the Base Frequency controls can be un-linked. By keeping the values close to each other, you can introduce a slight stretching or bias into the patterns, whilst separating them by some distance can result in almost horizontal or vertical lines appearing. Here's the previous filter, but with the horizontal Base Frequency set quite high, and the vertical Base Frequency at zero – the result isn't what you might usually think of as “turbulent”, but can be a useful addition to your filter arsenal nonetheless.

By now you should be starting to appreciate the power and flexibility of filters. By combining a few primitives in various ways, you can quickly create complex results. Throw in a little pseudo-random chaos and you're well on your way to everything from clouds to marble, whilst Flood primitives can ensure that the important colors in your filter are independent of the objects they're applied to. One common theme between Flood and Turbulence is that they fill the filter region entirely, usually requiring a Composite operation to trim them to shape. Next month, we'll look at the last of these “fill” primitives – uncovering limitations in Inkscape along the way – then progress on to other ways to change their shape.

issue111/inkscape.1471848471.txt.gz · Dernière modification : 2016/08/22 08:47 de d52fr