diff --git a/README.md b/README.md index db2ca5289..b6bde47eb 100644 --- a/README.md +++ b/README.md @@ -1,175 +1,175 @@ # Documentation Site for Krita A Sphinx based documentation system with a custom Krita theme. The instructions and batch files were originally written from a Windows 10 machine, but it should be able to work with any operating system. Setting up Development Environment ---------------------------------- -You will need Python. I have version 3.6.3. Make sure to install PIP along with the installation. PIP is a manager that is used to install external packages. We will use PIP to install Sphinx. Sphinx is static site generation tool used for documentation purposes. +You will need Python. I have version 3.6.3. Make sure to install PIP along with the installation. PIP is a manager that is used to install external packages. We will use PIP to install Sphinx. Sphinx is a static site generation tool used for documentation purposes. After you install Python bring up a command prompt and type: `python --version` It should tell you the version and verify that Python is installed. Mine says 3.6.3 Next you will need to install Sphinx so you can use it in projects. Type this from the command line: `pip install -U sphinx` Note: On Kubuntu 17.10 you will need to install python3-pip, and then type `sudo pip3 install --prefix /usr/local sphinx` to get everything install to the proper location. After it is done you can make sure it is installed. Type this in the command line: `sphinx-build --version` You should get a message telling you what version you have installed. Mine is 1.7.2 Running Sphinx ------- Now in your command prompt change your location to where this readme.md file is at. This is your project root. All of the commands we will be using will be done in the command prompt. For a normal HTML build you can just type this in the command line: `make html` This will generate the HTML files from all the source files (located where we are now) and place everything in the _build directory. You can also export out the files in EPUB format: `make epub` This will generate the EPUB files in an epub folder in the _build directory. # Creating and Updating New Languages Sphinx can only generate one language at a time. Having multiple languages needs a bit of extra work. This section discussed adding more languages and configuring it. Updating POT files from English version --------------------------------------- To take your base English files (in RST files) and generate POT files for other languages, type this in the command prompt: `make gettext` The POT files will be generated in your _build directory under a new "gettext" folder. POT files are the base files that other translations will use. You will need to run this again if you make changes to your English (RST) files to have an up to date POT file. Updating PO files with new translations --------------------------------------- From the POT files we can generate/update PO files for the translators to use: `sphinx-intl update --pot-dir _build/gettext -l de -l ja` This will take the information from the POT files and output the PO files in a locale folder. The above example creates a german and japanese PO files at the same time. You can add as many languages as needed Send translation to editor -------------------------- You can use a free translation tool like https://localise.biz/free/poeditor to edit PO files. Watch out. This program might add a 'zxx' as the language to the outputted PO file. That will need to be corrected if that happens. Translators can send you back the PO files when they are done. We have a command that can turn them into MO files later, so translators don't have to worry about that. Images can be translated if a language wants to provide their own images. All the images are stored in the images folder on the project root. The images are separated out by language. For the finished PO file, the translator will need to provide an image file, and a translation for the image that references the correct location in the PO file. Many images won't need a translation, so images can be left untranslated or just the alternate text can be translated. Turning the PO files to MO Files -------------------------------- Websites read MO files, not PO files. We need to convert the translated PO files when we are ready. To do this we need to run the make command like normal, but specify a language option: `sphinx-intl build` This will take everything inside the locale directory and create MO files from them. Build out changes to language (en and de) ------------------------------- -To build out a specific language we need to specify which language to output and then build. This can be done with the following commands: +To build out a specific language we need to specify which language to output and then build. This can be done with the following commands: On Windows: ``` set currentLanguage = 'de' set SPHINXOPTS=-D language="%currentLanguage%" make.bat html ``` or ``` set SPHINXOPTS=-D language="de" .\make.bat html ``` On Linux: `make -e SPHINXOPTS="-D language='de'" html` In this example we changed the language to German and built out HTML files. Everything in the _build directory should be using the German translations. Using multiple languages at once -------------------------------- -To be able to have multiple langauges at once, we will start to use a "dist" folder. The basic ideas is that after Sphinx builds out the documentation for a language, it will copy the files out to a new location that is in its language code. +To be able to have multiple languages at once, we will start to use a "dist" folder. The basic idea is that after Sphinx builds out the documentation for a language, it will copy the files out to a new location that is in its language code. To copy the files to the dist folder use the following command: Windows: `robocopy ./_build/html ./dist/%currentLanguage%/ /E` Linux: ``` mkdir dist mkdir dist/de/ cp -R _build/html dist/de/ ``` -You should see all the documentation files in the dist folder inside its language folder. We only need the stuff inside the html folder as the other folder are for helping with translation. Change the language like in the above step and do the same process for all languages. +You should see all the documentation files in the dist folder inside its language folder. We only need the stuff inside the html folder as the other folders are for helping with translation. Change the language like in the above step and do the same process for all languages. Switching languages for the site -------------------------------- The theme has a built-in language switcher. It works by looking at the URL for the existing language, and then looking at the HTML select tag with the language drop down. It just swaps out the language code in the URL if it finds out they are different. You will need to update the theme file to include all the languages you support. This is in the Theme > layout.html file. If you do a search for `language-selector-container` you should find out how this list is populated. Themes cannot be translated, so whatever text is used will appear for all languages. You will need to output all the languages again to see the updated language selector # Theme notes The theme is a customized version of the rtd theme. You can change out the logo image from the Theme > static > images folder. The custom language switcher logic is also custom. That is found in the Theme > static > js > theme.js file at the bottom. Note: On Kubuntu, the `html_static_path` had to be set to `['theme/static']` # Re-building faster It can be tedious making tweaks and having to run a bunch of steps over and over. There is an included `rebuild-all.bat` script that you can run from your project root directory. It clears out the build and dist directories, then rebuilds the different languages. You will probably have to modify this to output whatever languages you want. It also generates EPUB versions for each language and puts it in each language. Once you have set up the languages you can just run this command: `rebuild-all.bat` After a few seconds all the languages should be updated in the dist folder for you to test. # Optional: Exporting to PDF Sphinx cannot export out to PDF, but it can output an intermediate format called latex. This latex format can be used by other programs to generate the PDF files for the documentation. To export out the documentation in latex format run this command from your project root: `make latex` A new latex folder will be created in your _build directory that has the content in latex format. We need to download another program now to convert those files to PDF. #### Windows: On Windows 10 I used MikTex (200MB): https://miktex.org/ When you install that it will add a command line function. Open a command prompt and type this: `pdflatex --version` Mine says MiKTeX-pdfTeX 2.9.6642 (1.40.19). If you don't see it you either didn't install it or you need to open a new command prompt window for Windows to see the newly installed tool. -Still in your command prompt, go into your _build directory, then the latex folder. Run this command to generate the PDF: `pdflatex --outuput-directory=./output kritaManual.tex' +Still in your command prompt, go into your _build directory, then the latex folder. Run this command to generate the PDF: `pdflatex --output-directory=./output kritaManual.tex' The "kritaManual.tex" is the file in your latex folder. #### Linux: -The linux latex installation requires 1 gb to be spend on latex... I kid you not. +The linux latex installation requires 1 gb to be spent on latex... I kid you not. Kubuntu 17.10: ``` sudo apt-get install texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra latexmk texlive-luatex texlive-xetex mkdir _build/output make latexpdf ``` For quiet mode: `make latexpdf LATEXMKOPTS="-silent"` The latex packages do not like unicode characters, nor svgs, nor gifs. The manual is utterly unprepared for it... Depending on what options you chose for installation, there might be a number of warnings about 'packages' needing to be installed. Those are just extra tools to help with the PDF conversion and are ok to install. After you hit confirm a number of times you should see the PDF in the output folder. diff --git a/contributors_manual/optimising_images.rst b/contributors_manual/optimising_images.rst index 469145dd0..99dec488a 100644 --- a/contributors_manual/optimising_images.rst +++ b/contributors_manual/optimising_images.rst @@ -1,268 +1,268 @@ .. meta:: :description: How to make and optimise images for use in the manual. .. metadata-placeholder :authors: - Wolthera van Hövell tot Westerflier :license: GNU free documentation license 1.3 or later. .. index:: Metadata, Optimising Images .. _images_for_manual: ===================== Images for the Manual ===================== This one is a little bit an extension to :ref:`saving_for_the_web`. In particular it deals with making images for the manual, and how to optimise images. .. contents:: Tools for making screenshots ---------------------------- Now, if you wish to make an image of the screen with all the dockers and tools, then :ref:`saving_for_the_web` won't be very helpful: It only saves out the canvas contents, after all! So, instead, we'll make a screenshot. Depending on your operating system, there's several screenshot utilities available. Windows ~~~~~~~ Windows has a build-in screenshot tool. It is by default on the PrtSc key. On laptops you will sometimes need to use the fn key. Linux ~~~~~ -Both Gnome and KDE have decent screenshot tools showing up by default when using the PrtSc key, as well do other popular desktop enviroments. If, for whatever reason, you have no +Both Gnome and KDE have decent screenshot tools showing up by default when using the PrtSc key, as well do other popular desktop environments. If, for whatever reason, you have no ImageMagick With imagemagick, you can use the following command:: import -depth 8 -dither -While we should minimize the amount of gifs in the manual for a variety of accesibility reasons, you sometimes still need to make gifs and short videos. Furthermore, gifs are quite nice to show off features with release notes. +While we should minimize the amount of gifs in the manual for a variety of accessibility reasons, you sometimes still need to make gifs and short videos. Furthermore, gifs are quite nice to show off features with release notes. For making short gifs, you can use the following programs: * `Peek `_ -- This one has an appimage and a very easy user-interface. Like many screenrecording programs it does show trouble on Wayland. OS X ~~~~ The Screenshot hotkey on OS X is Shift+Command+3, according to `the official apple documentation `_. The appropriate file format for the job. ---------------------------------------- Different file formats are better for certain types of images. In the end, we want to have images that look nice and have a low filesize, because that makes the manual easier to download or browse on the internet. GUI screenshots This should use png, and if possible, in gif. Images that have a lot of flat colors. This should use png. Grayscale images These should be gif or png. Images with a lot of gradients These should be JPG. Images with a lot of transparency. These should use PNG. The logic is the way how each of these saves colors. Jpeg is ideal for photos and images with a lot of gradients because it :ref:`compresses differently `. However, contrasts don't do wel in jpeg. PNG does a lot better with images with sharp contrasts, while in some cases we can even have less than 256 colors, so gif might be better. Greyscale images, even when they have a lot of gradients variation, should be PNG. The reason is that when we use full color images, we are, depending on the image, using 3 to 5 numbers to describe those values, with each of those values having a possibility to contain any of 256 values. JPEG and other 'lossy' file formats use clever psychological tricks to cut back on the amount of values an image needs to show its contents. However, when we make grayscale images, we only keep track of the lightness. The lightness is only one number, that can have 256 values, making it much easier to just use gif or PNG, instead of jpeg which could have nasty artifacts. (And, it is also a bit smaller) **When in doubt, use PNG.** Optimising Images in quality and size. -------------------------------------- Now, while most image editors try to give good defaults on image sizes, we can often make them even smaller by using certain tools. Windows ~~~~~~~ The most commonly recommended tool for this on Windows is `IrfranView `_, but the dear writer of this document has no idea how to use it exactly. The other options is to use PNGCrush as mentioned in the linux section. Linux ~~~~~ Optimising PNGS ^^^^^^^^^^^^^^^ There is a whole laundry list of `PNG optimisation tools `_ available on Linux. They come in two categories: Lossy(Using psychological tricks), and Lossless(trying to compress the data more conventionally). The following are however the most recommended: `PNGQuant `_ A PNG compressor using lossy techniques to reduce the amount of colors used in a smart way. To use PNGquant, go to the folder of choice, and type:: pngquant --quality=80-100 image.png Where *image* is replaced with the image file name. When you press enter, a new image will appear in the folder with the compressed results. PNGQuant works for most images, but some images, like the color selectors don't do well with it, so always double check that the resulting image looks good, otherwise try one of the following options: `PNGCrush `_ A lossless PNG compressor. Usage:: pngcrush image.png imageout.png This will try the most common methods. Add ``-brute`` to try out all methods. `Optipng `_ - Another lossless PNG compressor which can be run after using PNGQuant, it is apparantly originally a fork of png crush. + Another lossless PNG compressor which can be run after using PNGQuant, it is apparently originally a fork of png crush. Usage:: optipng image.png where image is the filename. OptiPNG will then proceed to test several compression algorithms and **overwrite** the image.png file with the optimised version. You can avoid overwriting with the ``--out imageout.png`` command. Optimising GIF ^^^^^^^^^^^^^^ * `FFMPEG `_ * `Gifski `_ * `LossyGif `_ Optimising JPEG ^^^^^^^^^^^^^^^ Now, JPEG is really tricky to optimize properly. This is because it is a :ref:`lossy file format `, and that means that it uses psychological tricks to store its data. However, tricks like these become very obvious when your image has a lot of contrast, like text. Furthermore, JPEGs don't do well when they are resaved over and over. Therefore, make sure that there's a lossless version of the image somewhere that you can edit, and that only the final result is in JPEG and gets compressed further. MacOS/ OS X ~~~~~~~~~~~ * `ImageOptim `_ -- A Graphical User Interface wrapper around commandline tools like PNGquant and gifski. Editing the metadata of a file ------------------------------ Sometimes, personal information gets embedded into an image file. Othertimes, we want to embed information into a file to document it better. There's no less than 3 to 4 different ways of handling metadata, and metadata has different ways of handling certain files. The most commonly used tool to edit metadata is :program:`ExifTool`, another is to use :program:`ImageMagick`. Windows and OS X ~~~~~~~~~~~~~~~~ To get exiftool, `just get it from the website `_. Linux ~~~~~ On Linux, you can also install exiftool. Debian/Ubuntu ``sudo apt-get install libimage-exiftool-perl`` Viewing Metadata ~~~~~~~~~~~~~~~~ Change the directory to the folder where the image is located and type:: exiftool image where image is the file you'd like to examine. If you just type exif tool in any given folder it will output all the information it can give about any file it comes across. If you take a good look at some images, you'll see they contain author or location metadata. This can be a bit of a problem sometimes when it comes to privacy, and also the primary reason all meta-data gets stripped. You can also use `ImageMagick's identify `_:: identify -verbose image Stripping Metadata ~~~~~~~~~~~~~~~~~~ Stripping metadata from the example ``image.png`` can be done as follows: `ExifTool `_ `exiftool -all= image.png` This empties all tags exiftool can get to. You can also be specific and only remove a single tag: `exiftool -author= image.png` OptiPNG `optipng -strip image.png` This will strip and compress the png file. `ImageMagick `_ `convert image.png --strip` Extracting metadata ~~~~~~~~~~~~~~~~~~~ Sometimes we want to extract metadata, like an icc profile, before stripping everything. This is done by converting the image to the profile type: `ImageMagick's Convert `_ First extract the metadata to a profile by converting:: convert image.png image_profile.icc Then strip the file and readd the profile information:: convert -profile image_profile.icc image.png Embedding description metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Description metadata is really useful for the purpose of helping people with screenreaders. Webbrowsers will often try to use the description metadata if there's no alt text to generate the alt-text. Another thing that you might want to embed is stuff like color space data. ExifTool ImageMagick Setting an exif value:: convert -set exif:ImageDescription "An image description" image.png image_modified.png Setting the PNG chunk for description:: convert -set Description "An image description" image.png image_modified.png Embedding license metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~ In a certain way, embedding license metadata is really nice because it allows you to permanently mark the image as such. However, if someone then uploads it to another website, it is very likely the metadata is stripped with imagemagick. Using Properties ^^^^^^^^^^^^^^^^ You can use dcterms:license for defining the document where the license is defined. ImageMagick For the GDPL:: convert -set dcterms:license "GDPL 1.3+ https://www.gnu.org/licenses/fdl-1.3.txt" image.png This defines a shorthand name and then license text. For Creative Commons BY-SA 4.0:: convert -set dcterms:license "CC-BY-SA-4.0 http://creativecommons.org/licenses/by-sa/4.0/" image.png The problem with using properties is that they are a non-standard way to define a license, meaning that machines cannot do much with them. Using XMP ^^^^^^^^^ The creative commons website suggest we `use XMP for this `_. You can ask the Creative Commons License choose to generate an appropriate XMP file for you when picking a license. We'll need to use the `XMP tags for exiftool `_. So that would look something like this:: exiftool -Marked=true -License="http://creativecommons.org/licenses/by-sa/4.0" -UsageTerms="This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License." -Copyright="CC-BY-SA-NC 4.0" image.png Another way of doing the marking is:: exiftool -Marked=true -License="http://creativecommons.org/licenses/by-sa/4.0" -attributionURL="docs.krita.org" attributionName="kritaManual" image.png With imagemagick you can use the profile option again. First extract the data(if there is any):: convert image.png image_meta.xmp Then modify the resulting file, and embed the image data:: convert -profile image_meta.xmp image.png The XMP definitions per license. You can generate an XMP file for the metadata on the creative commons website. diff --git a/general_concepts/colors/profiling_and_callibration.rst b/general_concepts/colors/profiling_and_callibration.rst index 8f9fc7ac3..d1fabb303 100644 --- a/general_concepts/colors/profiling_and_callibration.rst +++ b/general_concepts/colors/profiling_and_callibration.rst @@ -1,88 +1,88 @@ .. meta:: :description: Color Models in Krita .. metadata-placeholder :authors: - Wolthera van Hövell tot Westerflier - RNicole - Timothée Giet - Troy Sobotka :license: GNU free documentation license 1.3 or later. -.. index:: Color, Profiling, Callibration -.. _profiling_and_callibration: +.. index:: Color, Profiling, Calibration +.. _profiling_and_calibration: =========================== -Profiling and Callibration: +Profiling and Calibration: =========================== So to make it simple, a color profile is just a file defining a set of colors inside a pure XYZ color cube. This "color set" can be used to define different things: * the colors inside an image * the colors a device can output Choosing the right workspace profile to use depends on how much colors you need and on the bit depth you plan to use. Imagine a line with the whole color spectrum from pure black (0,0,0) to pure blue (0,0,1) in a pure XYZ color cube. If you divide it choosing steps at a regular interval, you get what is called a linear profile, with a gamma=1 curve represented as a straight line from 0 to 1. With 8bit/channel bit depth, we have only 256 values to store this whole line. If we use a linear profile as described above to define those color values, we will miss some important visible color change steps and have a big number of values looking the same (leading to posterization effect). This is why was created the sRGB profile to fit more different colors in this limited amount of values, in a perceptually regular grading, by applying a custom gamma curve (see picture here: http://en.wikipedia.org/wiki/SRGB) to emulate the standard response curve of old CRT screens. So sRGB profile is optimized to fit all colors that most common screen can reproduce in those 256 values per R/G/B channels. Some other profiles like Adobe RGB are optimized to fit more printable colors in this limited range, primarily extending cyan-green hues. Working with such profile can be useful to improve print results, but is dangerous if not used with a properly profiled and/or calibrated good display. Most common CMYK workspace profile can usually fit all their colors within 8bit/channel depth, but they are all so different and specific that it's usually better to work with a regular RGB workspace first and then convert the output to the appropriate CMYK profile. Starting with 16bit/channel, we already have 65536 values instead of 256, so we can use workspace profiles with higher gamut range like Wide-gamut RGB or Pro-photo RGB, or even unlimited gamut like scRGB. But sRGB being a generic profile (even more as it comes from old CRT specifications..) , there is big chances that your monitor have actually a different color response curve, and so color profile. So when you are using sRGB workspace and have a proper screen profile loaded (see next point), Krita knows that the colors the file contains are within the sRGB color space, and converts those sRGB values to corresponding color values from your monitor profile to display the canvas. Note that when you export your file and view it in another software, this software has to do two things: * read the embed profile to know the "good" color values from the file (which most software do nowadays; when they don't they usually default to sRGB, so in the case described here we're safe ) * and then convert it to the profile associated to the monitor (which very few software actually does, and just output to sRGB.. so this can explain some viewing differences most of the time). Krita uses profiles extensively, and comes bundled with many. The most important one is the one of your own screen. It doesn't come bundled, and you have to make it with a color profiling device. In case you don't have access to such a device, you can't make use of Krita's color management as intended. However, Krita does allow the luxury of picking any of the other bundled profiles as working spaces. Profiling devices ----------------- Profiling devices, called Colorimeters, are tiny little cameras of a kind that you connect to your computer via an usb, and then you run a profiling software(often delivered alongside of the device). {{Note|If you don't have software packaged with your colorimeter, or are unhappy with the results, we recommend [http://www.argyllcms.com/ Argyllcms]}} The little camera then measures what the brightest red, green, blue, white and black are like on your screen using a predefined white as base. It also measures how grey the color grey is. It then puts all this information into an ICC profile, which can be used by the computer to correct your colors. It's recommended not to change the "calibration"(contrast, brightness, you know the menu) of your screen after profiling. Doing so makes the profile useless, as the qualities of the screen change significantly while calibrating. To make your screen display more accurate colors, you can do one or two things: profile your screen or calibrate and profile it. Just profiling your screen means measuring the colors of your monitor with its native settings. and put those values in a color profile, which can be used by color-managed application to adapt source colors to the screen for optimal result. Calibrating and profiling means the same except that first you try to calibrate the screen colors to match a certain standard setting like sRGB or other more specific profiles. Calibrating is done first with hardware controls (lightness, contrast, gamma curves), and then with software that creates a vcgt (video card gamma table) to load in the GPU. So when or why should you do just one or both? Profiling only: with a good monitor you can get most of the sRGB colors and lot of extra colors not inside sRGB. So this can be good to have more visible colors. with a bad monitor you will get just a subset of actual sRGB, and miss lot of details, or even have hue shifts. Trying to calibrate it before profiling can help to get closer to full-sRGB colors. Calibration+profiling: bad monitors as explained just before. ;multi-monitor setup when using several monitors, and specially in mirror mode where both monitor have the same content, you can't have this content color-managed for both screen profiles. In such case, calibrating both screens to match sRGB profile (or another standard for high-end monitors if they both support it) can be a good solution. soft-proofing when you need to match an exact rendering context for soft-proofing, calibrating can help getting closer to the expected result. Though switching through several monitor calibration and profiles should be done extremely careful. diff --git a/general_concepts/file_formats/lossy_lossless.rst b/general_concepts/file_formats/lossy_lossless.rst index 1e9fa49d2..5e326774f 100644 --- a/general_concepts/file_formats/lossy_lossless.rst +++ b/general_concepts/file_formats/lossy_lossless.rst @@ -1,38 +1,38 @@ .. meta:: :description: The difference between lossy and lossless compression. .. metadata-placeholder :authors: - Wolthera van Hövell tot Westerflier :license: GNU free documentation license 1.3 or later. .. index:: lossy, lossless, compression .. _lossy_compression: .. _lossless_compression: ==================================== Lossy and Lossless Image Compression ==================================== When we compress a file, we do this because we want to temporarily make it smaller(like for sending over email), or we want to permanently make it smaller(like for showing images on the internet). -*Lossless* compression techniques are for when we want to *temporarily* reduce information. As the name implies, they compress without losing information. In text, the use of abbrevations is a good example of a lossless compression technique. Everyone knows 'etc.' expands to 'etcetera', meaning that you can half the 8 character long 'etcetera' to the four character long 'etc.'. +*Lossless* compression techniques are for when we want to *temporarily* reduce information. As the name implies, they compress without losing information. In text, the use of abbreviations is a good example of a lossless compression technique. Everyone knows 'etc.' expands to 'etcetera', meaning that you can half the 8 character long 'etcetera' to the four character long 'etc.'. Within image formats, examples of such compression is by for example 'indexed' color, where we make a list of available colors in an image, and then assign a single number to them. Then, when describing the pixels, we only write down said number, so that we don't need to write the color definition over and over. *Lossy* compression techniques are for when we want to *permanently* reduce the file size of an image. This is necessary for final products where having a small filesize is preferable such as a website. That the image will not be edited anymore after this allows for the use of the context of a pixel to be taken into account when compressing, meaning that we can rely on psychological and statistical tricks. One of the primary things JPEG for example does is chroma sub-sampling, that is, to split up the image into a greyscale and two color versions(one containing all red-green contrast and the other containing all blue-yellow contrast), and then it makes the latter two versions smaller. This works because humans are much more sensitive to differences in lightness than we are to differences in hue and saturation. Another thing it does is to use cosine waves to describe contrasts in an image. What this means is that JPEG and other lossy formats using this are *very good at describing gradients, but not very good at describing sharp contrasts*. Conversely, lossless image compression techniques are *really good at describing images with few colors thus sharp contrasts, but are not good to compress images with a lot of gradients*. Another big difference between lossy and lossless images is that lossy fileformats will degrade if you re-encode them, that is, if you load a jpeg into Krita edit a little, resave, edit a little, resave, each subsequent save will lose some data. This is a fundamental part of lossy image compression, and the primary reason we use working files. .. seealso:: - If you're interested in different compression techniques, `Wikipedia's page(s) on image compression `_ are very good, if not a little technical. \ No newline at end of file + If you're interested in different compression techniques, `Wikipedia's page(s) on image compression `_ are very good, if not a little technical. diff --git a/reference_manual/brushes/brush_engines/color_smudge_engine.rst b/reference_manual/brushes/brush_engines/color_smudge_engine.rst index 623793eb1..a560836a5 100644 --- a/reference_manual/brushes/brush_engines/color_smudge_engine.rst +++ b/reference_manual/brushes/brush_engines/color_smudge_engine.rst @@ -1,355 +1,355 @@ .. meta:: :description: The Color Smudge Brush Engine manual page. .. metadata-placeholder :authors: - Wolthera van Hövell tot Westerflier - Raghavendra Kamath - Scott Petrovic - ValerieVK :license: GNU free documentation license 1.3 or later. .. index:: Brush Engine, Color Smudge Brush Engine, Color Mixing, Smudge .. _color_smudge_brush_engine: ========================= Color Smudge Brush Engine ========================= .. image:: /images/icons/colorsmudge.svg The Color Smudge Brush is a brush engine that allows you to mix colors by smearing or dulling. A very powerful brush engine to the painter. Options ------- * :ref:`option_brush_tip` * :ref:`blending_modes` * :ref:`option_opacity_n_flow` * :ref:`option_size` * :ref:`option_spacing` * :ref:`option_mirror` * :ref:`option_softness` * :ref:`option_rotation` * :ref:`option_scatter` * :ref:`option_gradient` * :ref:`option_airbrush` * :ref:`option_texture` Options Unique to the Color Smudge Brush ---------------------------------------- .. _option_color_rate: Color Rate ~~~~~~~~~~ How much of the foreground color is added to the smudging mix. Works together with :ref:`option_smudge_length` and :ref:`option_smudge_radius` .. image:: /images/en/Krita_2_9_brushengine_colorrate_04.png .. _option_smudge_length: Smudge Length ~~~~~~~~~~~~~ Affects smudging and allows you to set it to Sensors. There's two major types: .. image:: /images/en/Krita_2.9_brush_engine_smudge_length_03.png Smearing Great for making brushes that have a very impasto oil feel to them. Dulling Named so because it dulls strong colors. Using an arithmetic blending type, Dulling is great for more smooth type of painting. .. image:: /images/en/Krita_2.9_brushengine_smudge_length_01.png Strength Affects how much the smudge length takes from the previous dab it's sampling. This means that smudge-length at 1.0 will never decrease, but smudge-lengths under that will decrease based on spacing and opacity/flow. .. image:: /images/en/Krita_2.9_brushengine_smudge_length_02.png .. _option_smudge_radius: Smudge Radius ~~~~~~~~~~~~~ The Smudge Radius allows you to sample a larger radius when using smudge-length in Dulling mode. The slider is percentage of the brush-size. You can have it modified with Sensors. .. image:: /images/en/Krita_2.9_brushengine_smudge_radius_01.png Overlay ~~~~~~~ Overlay is a toggle that determine whether or not the smudge brush will sample all layers(overlay on), or only the current one. Tutorial: Color Smudge Brushes ------------------------------ I recommend at least skimming over the first part to get an idea of what does what. Overview and settings ~~~~~~~~~~~~~~~~~~~~~ Overview: Smearing and Dulling ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The Color Smudge Brush offers 2 modes, accessible from the Smudge Rate section: * Smearing: This mode mixes colors by smudging ("smearing") the area underneath. * Dulling: In his mode, the brush "picks up" the color underneath it, mixes it with its own color, then paints with it. .. image:: /images/en/Krita-tutorial5-I.1.png Smudge Length ^^^^^^^^^^^^^ To better demonstrate the smudge function, I turned the color rate function off. .. image:: /images/en/Krita-tutorial5-I.2.png Common behaviors: * Unchecking the smudge rate function sets smudge rate to 1.00 (not 0.00) * Opacity: Below 0.50, there is practically no smudging left: keep opacity over 0.50. Differences: * Spacing with Smearing: the lower the spacing, the smoother the effect, so for smearing with a round brush you may prefer a value of 0.05 or less. Spacing affects the length of the smudge trail, but to a much lesser extent. The "strength" of the effect remains more or less the same however. * Spacing with Dulling: the lower the spacing, the stronger the effect: lowering the spacing too much can make the dulling effect too strong (it picks up a color and never lets go of it). The length of the effect is also affected. * Both Smearing and Dulling have a "smudge trail", but in the case of Dulling, the brush shape is preserved. Instead the trail determines how fast the color it picked up is dropped off. The other settings should be pretty obvious from the pictures, so I'll spare you some walls of text. Color Rate, Gradient and Blending modes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. image:: /images/en/Krita-tutorial5-I.3.png Again, most of the settings behaviors should be obvious from the pictures. Just remember to keep Opacity over 0.50. Brush tips ^^^^^^^^^^ The Color Smudge Brush has all the same brush tip options as the Pixel Brush! .. image:: /images/en/Krita-tutorial5-I.4.png Just remember that the smudge effects are weaker when a brush tip's opacity is lower, so for low-opacity brush tips, increase the opacity and smudge/color rates. Scatter and other shape dynamics ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The Color Smudge Brush shares the following dynamics with the Pixel Brush: Opacity, Size, Spacing, Rotation, and Scatter. However, because of the Smudge effects, the outcome will be different from the Pixel Brush. In particular, the Scatter option becomes much more significant. .. image:: /images/en/Krita-tutorial5-I.5-1.png A few things to note: * Scattering is proportional to the brush size. It's fine to use a scattering of 5.00 for a tiny round brush, but for bigger brushes, you may want to get it down to 0.50 or less. * You may notice the lines with the Smearing option. Those are caused by the fact that it picked up the hard lines of the rectangle. * For scattering, the brush picks up colors within a certain distance, not the color directly under the paintbrush: .. image:: /images/en/Krita-tutorial5-I.5-2.png Other color behaviors: Gradient, Blending modes, Overlay mode ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Gradient """""""" Gradient is equivalent to the Source -> Gradient and Color -> Mix for the Pixel brush: the color will vary between the colors of the gradient. .. image:: /images/en/Krita-tutorial5-I.6-1.png You can either: * Leave the default Foreground -> Background gradient setting, and just change the foreground and background colors * Select a more specific gradient * Or make custom gradients. Blending Modes """""""""""""" Blending Modes work just like with the Pixel Brush. The color used though is the color from Color rate. Color Blending modes with the smudge brush are even harder to predict than with the pixel brush, so I'll leave you to experiment on your own. Overlay Mode """""""""""" By default, the Color Smudge Brush only takes information from the layer it is on. However, if you want it to take color information from All the layers, you can turn on the Overlay mode. Be aware though, that it does so by "picking up" bits of the layer underneath, which may mess up your drawing if you later make changes to the layer underneath. Use cases: Smudging and blending ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This part describes use cases with color rate off. I won't explain the settings for dynamics in detail, as you can find the explanations in the Pixel Brush tutorial. Smudging effects ^^^^^^^^^^^^^^^^ For simple smudging: # Pick the Color Smudge Brush. You can use either Smearing or Dulling. # Turn off Color Rate # Smudge away .. image:: /images/en/Krita-tutorial5-II.2.png When using lower opacity brush tips, remember to "compensate" for the less visible effects by increasing both Smudge Rate and Opacity, if necessary to maximum. Some settings for Smearing """""""""""""""""""""""""" * For smoother smearing, decrease spacing. Remember that spacing is proportional to brush tip size. For a small round brush, 0.10 spacing is fine, but for mid-sized and large brushes, decrease spacing to 0.05 or less. Some settings for Dulling """"""""""""""""""""""""" * Lowering the spacing will also make the smudging effect stronger, so find a right balance. 0.10 for most mid-sized round brushes should be fine. * Unlike Smearing, Dulling preserves the brush shape and size, so it won't "fade off" in size like Smearing brushes do. You can mimic that effect though with a simple size fade dynamic. Textured blending ^^^^^^^^^^^^^^^^^ In this case, what I refer to as "Blending" here is simply using one of the following two dynamics: * Rotation set to Distance or Fuzzy * And/or Scatter: * For most mid-sized brushes you will probably want to lower the scatter rate to 0.50 or lower. Higher settings are okay for tiny brushes. * Note that Scatter picks colors within a certain distance, not the color directly under the brush (see [[Special:myLanguage/Krita/Tutorial_5|Brush tips]]) * Optional: Pile on size and other dynamics and vary brush tips In fact, the Color Smudge brush is not a blur brush, so smudging is not a very good method of "smooth" blending. To blend smoothly, you'll have better luck with: * Building up the transition by painting with intermediate values, described later * Or using the "blur with feathered selection" method that I'll briefly mention at the end of this tutorial. I've tried to achieve smooth blending with Color Smudge brush by adding rotation and scatter dynamics, but honestly they looked like crap. However, the Color Smudge brush is very good at "textured blending": .. image:: /images/en/Krita-tutorial5-II.3.png Basically you can paint first and add textured transitions after. Use cases: Coloring ~~~~~~~~~~~~~~~~~~~ For this last section, Color Rate is on. Layer options ^^^^^^^^^^^^^ Before we get started, notice that you have several possibilities for your set up: * Shading on the same layer * Shading on a separate layer, possibly making use of alpha-inheritance. The brush blends with the transparency of the layer it's on. This means: * If the area underneath is more of less uniform, the output is actually similar as if shading on the same layer * But if the area underneath is not uniform, then you'll get fewer color variations. * Shading on a separate layer, using Overlay mode. Use this only if you're fairly sure you don't need to adjust the layer below, or the colors may become a mess. .. image:: /images/en/Krita-tutorial5-III.1-1.png Issue with transparency """"""""""""""""""""""" The Color Smudge Brush blends with transparency. What this means is that when you start a new, transparent layer and "paint" on this layer, you will nearly always get less than full opacity. Basically: * It may look great when you're coloring on a blank canvas * But it won't look so great when you add something underneath .. image:: /images/en/Krita-tutorial5-III.1-2.png The solution is pretty simple though: * Make sure you have the area underneath colored in first: * With tinting, you already have the color underneath colored, so that's done * For painting, roughly color in the background layer first * Or color in the shape on a new layer and make use of alpha-inheritance * For the last solution, use colors that contrast highly with what you're using for best effect. For example, shade in the darkest shadow area first, or the lightest highlights, and use the color smudge brush for the contrasting color. .. image:: /images/en/Krita-tutorial5-III.1-3.png Soft-shading ~~~~~~~~~~~~ Suppose you want more or less smooth color transitions. You can either: * Color Rate as low as 0.10 for round brushes, higher with non fully opaque brush tips. * Or set the Smudge Rate as low as 0.10 instead. * Or a combination of the two. Please try yourself for the output you like best. * Optional: turn on Rotation for smoother blending * Optional: turn on Scatter for certain effects * Optional: fiddle with Size and Opacity dynamics as necessary. .. image:: /images/en/Krita-tutorial5-III.2-1.png This remains, in fact, a so-so way of making smooth transitions. It's best to build up intermediate values instead. Here: * I first passed over the blue area three times with a red color. I select 3 shades. * I color picked each of these values with Ctrl+click, then used them in succession .. image:: /images/en/Krita-tutorial5-III.2-2.png Painting: thick oil style ~~~~~~~~~~~~~~~~~~~~~~~~~ Many of the included color smudge brush presets produce a thick oil paint-like effect. This is mainly achieved with the Smearing mode on. Basically: * Smearing mode with high smudge and color rates ** Both at 0.50 are fine for normal round brushes or fully opaque predefined brushes ** Up to 1.00 each for brushes with less density or non fully-opaque predefined brushes * Add Size/Rotation/Scatter dynamics as needed. When you do this, increase smudge and color rates to compensate for increased color mixing. .. image:: /images/en/Krita-tutorial5-III.3-1.png One thing I really like to do is to set different foreground and background colors, then turn on Gradient -> Fuzzy. Alternatively, just paint with different colors in succession (bottom-right example). .. image:: /images/en/Krita-tutorial5-III.3-2.png Here's some final random stuff. With pixel brushes, you can get all sorts of frill designs by using elongated brushes and setting the dynamics to rotation. You won't get that with Color Smudge Brushes. Instead you'll get something that looks more like... yarn. Which is cool too. Here, I just used oval brushes and rotation -> distance. .. image:: /images/en/Krita-tutorial5-III.3-3.png Painting: Digital watercolor style ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When I say "digital watercolor", it refers to a style often seen online, i.e. a soft, smooth shading style rather than realistic watercolor. For this you mostly need the Dulling mode. A few things: * Contrary to the Smearing mode, you may want to lower opacity for normal round brushes to get a smoother effect, to 0.70 for example. * Vary the brush tip fade value as well. * When using Scatter or other dynamics, you can choose to set smudge and color values to high or low values, for different outcomes. .. image:: /images/en/Krita-tutorial5-III.4.png Blurring ~~~~~~~~ You can: -* Paint then smudge, for mostly textury transitions +* Paint then smudge, for mostly texture transitions * Or build up transitions by using intermediate color values If you want even smoother effects, well, just use Blur. Gaussian blur to be exact. .. image:: /images/en/Krita-tutorial5-III.5.png And there you go. That last little trick concludes this tutorial. diff --git a/reference_manual/brushes/brush_settings/brush_tips.rst b/reference_manual/brushes/brush_settings/brush_tips.rst index c7c4ead33..056f62c43 100644 --- a/reference_manual/brushes/brush_settings/brush_tips.rst +++ b/reference_manual/brushes/brush_settings/brush_tips.rst @@ -1,144 +1,144 @@ .. meta:: :description: How to use brush tips in Krita. .. metadata-placeholder :authors: - Wolthera van Hövell tot Westerflier - PMoonen - Scott Petrovic :license: GNU free documentation license 1.3 or later. .. index:: Brush tip, Brush Mask .. _option_brush_tip: ========== Brush Tips ========== .. image:: /images/en/Krita_Pixel_Brush_Settings_Popup.png .. _auto_brush_tip: Auto Brush ---------- The generic circle or square. These brush-tips are generate by Krita through certain parameters. Types ~~~~~ First, there's three mask-types, with each the circle and square shape: Default This is the ultimate generic type. The fade parameter produces the below results. Of the three auto brushes, this is the fastest. .. image:: /images/en/Krita_29_brushengine_brushtips_default.png Soft - This one's fade is controled by a curve! + This one's fade is controlled by a curve! .. image:: /images/en/Krita_2_9_brushengine_brushtips_soft.png Gaussian This one uses the gaussian algorithm to determine the fade. Out of the three auto brushes, this is the slowest. .. image:: /images/en/Krita_2_9_brushengine_brushtips_gaussian.png Parameters ~~~~~~~~~~ Diameter The pixel size of the brush. Ratio Whether the brush is elongated or not. .. image:: /images/en/Krita_2_9_brushengine_brushtips_ratio.png Fade this sets the softness of the brush. You can click the chain-symbol to lock and unlock these settings. Fade has a different effect per mask-type, so don't be alarmed if it looks strange, perhaps you have the wrong mask-type. .. image:: /images/en/Krita_2_9_brushengine_brushtips_default2b.png (With fade locked) .. image:: /images/en/Krita_2_9_brushengine_brushtips_default_3.png (With fade separately horizontal and vertical) Angle This changes the angle a which the brush is at. .. image:: /images/en/Krita_2_9_brushengine_brushtips_angle.png Spikes This gives the amount of tips related to the ratio. .. image:: /images/en/Krita_2_9_brushengine_brushtips_spikes.png Density This decreases how much area the brush-covers over it's size: It makes it noisy. In the example below, the brush is set with density 0%, 50% and 100% respectively. .. image:: /images/en/Krita_2_9_brushengine_brushtips_density.png Randomness This changes the randomness of the density. In the example below, the brush is set with randomness 0%, 50% and 100% respectively. .. image:: /images/en/Krita_2_9_brushengine_brushtips_randomness.png Spacing This affects how far brushes are spaced apart. In the below picture, the three examples on the left are with spacing 0, 1 and 5. Auto (spacing) Ticking this will set the brush-spacing to a different(quadratic) algorithm. The result is fine control over the spacing. In the below picture, the three examples on right are with auto spacing, 0, 1 and 5 respectively. .. image:: /images/en/Krita_2_9_brushengine_brushtips_spacing.png Smooth lines. This toggles the super-smooth anti-aliasing. In the below example, both strokes are drawn with a default brush with fade set to 0. On the left without smooth lines, and the right with. Very useful for inking brushes. This option is best used in combination with Auto Spacing. .. image:: /images/en/Krita_2_9_brushengine_brushtips_default_2.png Precision This changes how smooth the brush is rendered. The lower, the faster the brush, but the worse the rendering looks. You'd want an inking brush to have a precision of 5 at all times, but a big filling brush for painting doesn't require such precision, and can be easily sped up by setting precision to 1. Auto (precision) This allows you to set the precision linked to the size. The first value is the brush size at which precision is last 5, and the second is the size-difference at which the precision will decrease. For example: A brush with ''starting brush size'' 10 and ''delta'' 4, will have... precision 5 at size 10 precision 4 at size 14 precision 3 at size 18 precision 2 at size 22 precision 1 at sizes above 26. .. _predefined_brush_tip: Predefined Brushes ~~~~~~~~~~~~~~~~~~ .. image:: /images/en/Krita_Predefined_Brushes.png If you have used other applications like :program:`GIMP` or :program:`Photoshop`, you will have used this kind of brush. :program:`Krita` is (mostly) compatible with the brush tip definitions files of these applications: abr GIMP autobrush tip definitions :ref:`file_gbr` GIMP single bitmap brush tip. Can be black and white or colored. :ref:`file_gih` GIMP Image Hose brush tip: contains a series of brush tips that are painted randomly or in order after each other. Can be black and white or colored. :program:`Krita` does not yet support all the parameters yet. abr Photoshop brush tip collections. We support many of the features of these brush files, though some advanced features are not supported yet. Note that the definition of ABR brushes has been reverse engineered since Adobe does not make the specification public. We strongly recommend every :program:`Krita` user to share brush tips in GBR and GIH format and more complex brushes as :program:`Krita` presets. All predefined brush tips are shown in one selector. There are four more options that influence the initial bitmap brush tip you start painting with: Scale scales the brush tip. 1.0 is the native size of the brush tip. This can be fairly large! When painting with variable size (for instance governed by pressure), this is the base for the calculations. Rotation initial rotation of the brush tip. Spacing distance between the brush tip impressions. Use color as mask for colored brushes, don't paint the actual colors, but make a grayscale brush tip that will be colored by your selected foreground/background color. diff --git a/reference_manual/brushes/brush_settings/options.rst b/reference_manual/brushes/brush_settings/options.rst index e0e1ef235..adcc09a47 100644 --- a/reference_manual/brushes/brush_settings/options.rst +++ b/reference_manual/brushes/brush_settings/options.rst @@ -1,190 +1,190 @@ .. meta:: :description: Krita's Brush Engine options overview. .. metadata-placeholder :authors: - Wolthera van Hövell tot Westerflier - Raghavendra Kamath - Scott Petrovic - Hulmanen - Nmaghrufusman :license: GNU free documentation license 1.3 or later. .. _brush_options: ======= Options ======= .. index:: Airbrush .. _option_airbrush: Airbrush -------- .. image:: /images/en/Krita_2_9_brushengine_airbrush.png If you hold the brush still, but are still pressing down, this will keep adding colour onto the canvas. The lower the rate, the quicker the colour gets added. .. index:: Mirror .. _option_mirror: Mirror ------ .. image:: /images/en/Krita_Pixel_Brush_Settings_Mirror.png This allows you to mirror the Brush-tip with Sensors. Horizontal Mirrors the mask horizontally. Vertical Mirrors the mask vertically. .. image:: /images/en/Krita_2_9_brushengine_mirror.jpg Some examples of mirroring and using it in combination with :ref:`option_rotation`. .. _option_rotation: Rotation -------- This allows you to affect Angle of your brush-tip with Sensors. .. image:: /images/en/Krita_2_9_brushengine_rotation.png .. image:: /images/en/Krita_Pixel_Brush_Settings_Rotation.png In the above example, several applications of the parameter. #. Drawing Angle -- A common one, usually used in combination with rake-type brushes. Especially effect because it does not rely on tablet-specific sensors. Sometimes, Tilt-Direction or Rotation is used to achieve a similar-more tablet focused effect, where with Tilt the 0° is at 12 o'clock, Drawing angle uses 3 o'clock as 0°. #. Fuzzy -- Also very common, this gives a nice bit of randomness for texture. #. Distance -- With careful editing of the Sensor curve, you can create nice patterns. #. Fade -- This slowly fades the rotation from one into another. #. Pressure -- An interesting one that can create an alternative looking line. .. _option_scatter: Scatter ------- This parameter allows you to set the random placing of a brush-dab. You can affect them with Sensors. X The scattering on the angle you are drawing from. Y The scattering, perpendicular tot he drawing angle(has the most effect) .. image:: /images/en/Krita_2_9_brushengine_scatter.png .. _option_sharpness: Sharpness --------- .. image:: /images/en/Krita_Pixel_Brush_Settings_Sharpness.png Puts a threshold filter over the brush mask. .. _option_size: Size ---- .. image:: /images/en/Krita_Pixel_Brush_Settings_Size.png This parameter is not the diameter itself, but rather the curve for how it's affected. So, if you want to lock the diameter of the brush, lock the Brush-tip. Locking the size parameter will only lock this curve. Allowing this curve to be affected by the Sensors can be very useful to get the right kind of brush. For example, if you have trouble drawing fine lines, try to use a concave curve set to pressure. That way you'll have to press hard for thick lines. .. image:: /images/en/Krita_2_9_brushengine_size_01.png Also popular are setting the size to the sensor fuzzy or perspective, with the later in combination with a :ref:`assistant_perspective` .. image:: /images/en/Krita_2_9_brushengine_size_02.png .. _option_softness: Softness -------- This allows you to affect Fade with Sensors. .. image:: /images/en/Krita_2_9_brushengine_softness.png Has a slight brush-decreasing effect, especially noticeable with soft-brush, and is overall more noticeable on large brushes. .. _option_source: Source ------ Picks the source-colour for the brush-dab. Plain Color Current foreground color. Gradient Picks active gradient Uniform Random Gives a random colour to each brush dab. Total Random Random noise pattern is now painted. Pattern Uses active pattern, but alignment is different per stroke. Locked Pattern Locks the pattern to the brushdab .. _option_mix: Mix --- Allows you to affect the mix of the :ref:`option_source` color with Sensors. It will work with Plain Color and Gradient as source. If Plain Color is selected as source, it will mix between foreground and background colors selected in color picker. If Gradient is selected, it chooses a point on the gradient to use as painting color according to the sensors selected. .. image:: /images/en/Krita_2_9_brushengine_mix_01.png Uses ~~~ .. image:: /images/en/Krita_2_9_brushengine_mix_02.png Flow map The above example uses a :program:`Krita` painted flowmap in the 3d program :program:`Blender`. a brush was set to source Gradient and Mix:Drawing angle. The gradient in question contained the 360° for normal map colours. Flow maps are used in several Shaders, such as brushed metal, hair and certain river-shaders. .. _option_gradient: Gradient ~~~~~~~~ Exactly the same as using Source:Gradient with Mix, but only available for the Color Smudge Brush. .. index:: Spacing .. _option_spacing: Spacing ------- .. image:: /images/en/Krita_Pixel_Brush_Settings_Spacing.png This allows you to affect :ref:`option_brush_tip` with :ref:`sensors`. .. image:: /images/en/Krita_2_9_brushengine_spacing_02.png ;Isotropic. :Instead of the spacing being related to the ratio of the brush, it will be on diameter only. .. image:: /images/en/Krita_2_9_brushengine_spacing_01.png .. index:: Ratio .. _option_ratio: Ratio ----- -Allows you to change the ratio of the brush and bind it to parameters. This also works for predifined brushes. +Allows you to change the ratio of the brush and bind it to parameters. This also works for predefined brushes. .. image:: /images/en/Krita_3_0_1_Brush_engine_ratio.png diff --git a/reference_manual/layers_and_masks/clone_layers.rst b/reference_manual/layers_and_masks/clone_layers.rst index 47a107f1e..c3b818dac 100644 --- a/reference_manual/layers_and_masks/clone_layers.rst +++ b/reference_manual/layers_and_masks/clone_layers.rst @@ -1,35 +1,35 @@ .. meta:: :description: How to use clone layers. .. metadata-placeholder :authors: - Wolthera van Hövell tot Westerflier - Scott Petrovic - Bugsbane - Boudewijn Rempt - Alan - Raghavendra Kamath :license: GNU free documentation license 1.3 or later. .. index:: Layers, Linked Clone, Clone Layer .. _clone_layers: ============ Clone Layers ============ A clone layer is a layer that keeps an up-to-date copy of another layer. You cannot draw or paint on it directly, but it can be used to create effects by applying different types of layers and masks (e.g. filter layers or masks). Example uses of Clone Layers. ----------------------------- -For example, if you were painting a picture of some magic person and wanted to create a glow around them that was updated as you updated your charachter, you could: +For example, if you were painting a picture of some magic person and wanted to create a glow around them that was updated as you updated your character, you could: #. Have a Paint Layer where you draw your character #. Use the Clone Layer feature to create a clone of the layer that you drew your character on #. Apply a HSV filter mask to the clone layer to make the shapes on it white (or blue, or green etc.) #. Apply a blur filter mask to the clone layer so it looks like a "glow" As you keep painting and adding details, erasing on the first layer, Krita will automatically update the clone layer, making your "glow" apply to every change you make. diff --git a/reference_manual/layers_and_masks/file_layers.rst b/reference_manual/layers_and_masks/file_layers.rst index f844eb37b..ef4058647 100644 --- a/reference_manual/layers_and_masks/file_layers.rst +++ b/reference_manual/layers_and_masks/file_layers.rst @@ -1,38 +1,38 @@ .. meta:: :description: How to use file layers in Krita. .. metadata-placeholder :authors: - Wolthera van Hövell tot Westerflier - Scott Petrovic - Alan :license: GNU free documentation license 1.3 or later. .. index:: Layers, File Layers, External File .. _file_layers: =========== File Layers =========== File Layers are references to files outside of the document: If the referenced document updates, the file layer will update. Do not remove the original file on your computer once you add it to Krita. Deleting your original image will break the file layer. If Krita cannot find the original file, it'll ask you where to find it. File layers cannot display animations. File Layers have the following scaling options: No Scaling This'll import the file layer with the full pixel-size. Scale to Image Size Scales the file layer to fit exactly within the canvas boundaries of the image. Adapt to image resolution - If the imported layer and the image have a different resolution, it'll scale the filelayer by scaling it's resolution. In other words, import a 600dpi A4 image onto a 300dpi A4 image, and the filelayer will be scaled to fit precisely on the 300dpi image. Useful for comics, where the ink-layer is prefered to be at a higher resolution than the colors. + If the imported layer and the image have a different resolution, it'll scale the filelayer by scaling it's resolution. In other words, import a 600dpi A4 image onto a 300dpi A4 image, and the filelayer will be scaled to fit precisely on the 300dpi image. Useful for comics, where the ink-layer is preferred to be at a higher resolution than the colors. File Layers can currently not be painted on. If you want to transform a file layer, you need to apply a transformation mask to it and use that. .. versionadded:: 3.3 In the layerdocker, next to the file layer only, there's a little folder icon. Pressing that will open the file pointed at in Krita if it hadn't yet. Using the properties you can make the file layer point to a different file. .. versionadded:: 4.0 You can turn any set of layers into a file layer by rightclicking them and doing :menuselection:`convert --> convert to file layer`. It will then open a save prompt for the file location and when done will save the file and replace the layer with a file layer pointing at that file. diff --git a/reference_manual/linux_command_line.rst b/reference_manual/linux_command_line.rst index 3f253e626..d6884cf0f 100644 --- a/reference_manual/linux_command_line.rst +++ b/reference_manual/linux_command_line.rst @@ -1,128 +1,128 @@ .. meta:: :description: Overview of Krita's command line options. .. metadata-placeholder :authors: - Scott Petrovic - Wolthera van Hövell tot Westerflier :license: GNU free documentation license 1.3 or later. .. index:: Command Line .. _linux_cmd: ================== Linux Command Line ================== As a native Linux program, Krita allows you to do operations on images without opening the program when using the Terminal. This option was disabled on Windows and OSX, but with 3.3 it is enabled for them! This is primarily used in bash or shell scripts, for example, to mass convert kra files into pngs. Export ------ This allows you to quickly convert files via the terminal: ``krita importfilename --export --export-filename exportfilename`` .. program:: krita importfilename Replace this with the filename of the file you want to manipulate. .. option:: --export Export a file selects the export option. .. option:: --exportfilename Exportfilename says that the following word is the filename it should be exported to. Replace this with the name of the output file. Use a different extension to change the fileformat. Example: ``krita final.png --export --export-filename final.jpg`` This piece of code takes the file ``file.png`` and saves it as ``file.jpg``. PDF export ---------- Pdf export looks a bit different, using the ``--export-pdf`` option. ``krita final.png --export-pdf --export-filename final.pdf`` export-pdf exports the file ``file.png`` as a pdf file. .. warning:: This has been removed from 3.1 because the results were incorrect. Open with Custom Screen DPI --------------------------- Open Krita with specified Screen DPI. .. program:: krita .. option:: --dpi Open Krita with specified Screen DPI. For example: ``krita --dpi <72,72>`` Open template ------------- -Open krita and automatically open the given template(s). This allows you to, for example, create a shortcut to Krita that opens a given template, so you can get to work immidiately! +Open krita and automatically open the given template(s). This allows you to, for example, create a shortcut to Krita that opens a given template, so you can get to work immediately! ``krita --template templatename.desktop`` .. program:: krita .. option:: --template templatename.desktop Selects the template option All templates are saved with the .desktop extension. You can find templates in the .kde/share/apps/krita/template or in the install folder of Krita. ``krita --template BD-EuroTemplate.desktop`` This opens the European BD comic template with Krita. ``krita --template BD-EuroTemplate.desktop BD-EuroTemplate.desktop`` This opens the European BD template twice, in separate documents. Start up -------- .. versionadded:: 3.3 .. program:: krita .. option:: --nosplash starts krita without showing the splash screen. .. option:: --canvasonly starts krita in canvasonly mode. .. option:: --fullscreen starts krita in fullscreen mode. .. option:: --workspace Workspace starts krita with the given workspace. So for example... `` krita --workspace Animation`` Starts Krita in the Animation workspace. diff --git a/reference_manual/main_menu/window_menu.rst b/reference_manual/main_menu/window_menu.rst index 088e43018..80ff3d7c1 100644 --- a/reference_manual/main_menu/window_menu.rst +++ b/reference_manual/main_menu/window_menu.rst @@ -1,39 +1,39 @@ .. meta:: :description: The window menu in Krita. .. metadata-placeholder :authors: - Wolthera van Hövell tot Westerflier - Scott Petrovic :license: GNU free documentation license 1.3 or later. .. index:: Window, View .. _window_menu: =========== Window Menu =========== A menu completely dedicated to window management in Krita. New Window Creates a new window for Krita. Useful with multiple screens. New View Make a new view of the given document. You can have different zoom or rotation on these. Workspace - A convenient acces panel to the :ref:`resource_workspaces`. + A convenient access panel to the :ref:`resource_workspaces`. Close Close the current view. Close All Close all documents Tile Tiles all open documents into a little sub-window. Cascade Cascades the sub-windows. Next Selects the next view. Previous Selects the previous view. List of open documents. Use this to switch between documents. diff --git a/reference_manual/preferences/general_settings.rst b/reference_manual/preferences/general_settings.rst index 713f472ab..17873b18a 100644 --- a/reference_manual/preferences/general_settings.rst +++ b/reference_manual/preferences/general_settings.rst @@ -1,213 +1,213 @@ .. meta:: :description: General Preferences in Krita. .. metadata-placeholder :authors: - Wolthera van Hövell tot Westerflier - Scott Petrovic - Greig :license: GNU free documentation license 1.3 or later. .. index:: Preferences, Settings, Cursor, Autosave, Tabbed Documents, Subwindow Documents, Pop up palette, File Dialog, Maximum Brush Size, Kinetic Scrolling, Sessions .. _general_settings: ================ General Settings ================ You can access the General Category of the preferences by first going to :menuselection:`Settings --> Configure Krita`. .. image:: /images/en/Krita_Preferences_General.png Cursor Settings --------------- Customize the drawing cursor here: Cursor Shape ~~~~~~~~~~~~ Select a cursor shape to use while the brush tools are used. This cursor will always be visible on the canvas. It is usually set to a type exactly where your pen nib is at. The available cursor types are shown below. Tool Icon Shows the currently selected tool icon,even for the freehand brush. .. image:: /images/en/Settings_cursor_tool_icon.png Arrow Shows a generic cursor. .. image:: /images/en/Settings_cursor_arrow.png Crosshair Shows a precision reticule. .. image:: /images/en/Settings_cursor_crosshair.png Small circle Shows a small white dot with a black outline. .. image:: /images/en/Settings_cursor_small_circle.png No Cursor Show no cursor, useful for tablet-monitors. .. image:: /images/en/Settings_cursor_no_cursor.png Triangle Right-Handed. Gives a small white triangle with a black border. .. image:: /images/en/Settings_cursor_triangle_righthanded.png Triangle Left-Handed. Same as above but mirrored. .. image:: /images/en/Settings_cursor_triangle_lefthanded.png Black Pixel Gives a single black pixel. .. image:: /images/en/Settings_cursor_black_pixel.png White Pixel Gives a single white pixel. .. image:: /images/en/Settings_cursor_white_pixel.png Outline Shape ~~~~~~~~~~~~~ Select an outline shape to use while the brush tools are used. This cursor shape will optionally show in the middle of a painting stroke as well. The available outline shape types are shown below.(pictures will come soon) No Outline No outline. Circle Outline Gives a circular outline approximating the brush size. Preview Outline Gives an outline based on the actual shape of the brush. Tilt Outline Gives a circular outline with a tilt-indicator. While Painting... ~~~~~~~~~~~~~~~~~ Show Outline This option when selected will show the brush outline while a stroke is being made. If unchecked the brush outline will not appear during stroke making, it will show up only after the brush stroke is finished. This option works only when Brush Outline is selected as the Cursor Shape. .. versionchanged:: 4.1 Used to be called "Show Outline When Painting" Use effective outline size .. versionadded:: 4.1 This makes sure that the outline size will always be the maximum possible brush diameter, and not the current one as affected by sensors such as pressure. This makes the cursor a little less noisy to use. .. _window_settings: Window Settings Multiple Document Mode This can be either tabbed like :program:`GIMP` or :program:`Painttool Sai`, or subwindows, like :program:`Photoshop`. Background image Allows you to set a picture background for subwindow mode. Window Background Set the colour of the subwindow canvas area. Don't show contents when moving subwindows. This gives an outline when moving windows to work around ugly glitches with certain graphics-cards. Show on-canvas popup messages Whether or not you want to see the on-canvas pop-up messages that tell you whether you are in tabbed mode, rotating the canvas, or mirroring it. Enable Hi-DPI support Attempt to use the Hi-DPI support. It is an option because we are still experiencing bugs on windows. Allow only once instance of Krita An instance is a single entry in your system's task manager. Turning this option makes sure that Krita will check if there's an instance of Krita open already when you instruct it to open new documents, and then have your documents opened in that single instance. There's some obscure uses to allowing multiple instances, but if you can't think of any, just keep this option on. Tool options ------------ In docker (default) Gives you the tool options in a docker. In toolbar Gives you the tool options in the toolbar, next to the brush settings. You can open it with :kbd:`\\`. Switch ctrl/alt modifiers This switches the function of the ctrl and alt buttons when modifying selections. Useful for those used to Gimp instead of photoshop, or Lefties without a right-alt key on their keyboard. Enable Touchpainting This allows finger painting with capacitive screens. Some devices have both capacitive touch and a stylus, and then this can interfere. In that case, just toggle this. Kinetic Scrolling (Needs Restart) This enables kinetic scrolling for scrollable areas. .. figure:: /images/en/Krita_4_0_kinetic_scrolling.gif :align: center Kinetic scrolling on the brush chooser drop-down with activation mode set to `guilabel:`On Click Drag`, with this disabled all of these clicks would lead to a brush being selected regardless of drag motion. Activation How it is activated. Disabled Will never activated. On Touch Drag Will activate if it can recognise a touch event. May not always work. On Click Drag Will activate when it can recognise a click event, will always work. Sensitivity How quickly the feature activates, this effective determines the length of the drag. Show Scrollbar Whether to show scrollbars when doing this. .. _misc_settings: Miscellaneous ------------- When Krita Starts This is the option for handling user sessions. It has the following options: Open Default Window This opens the regular empty window with the last used workspace. Load Previous Session Load the last opened session. If you have :guilabel:`Save session when Krita closes` toggled, this becomes the last files you had open and the like. Show Session Manager Show the session manager directly so you can pick a session. .. versionadded:: 4.1 Save session when Krita closes - Save the current open windows, documents and the like into the cuurrent session when closing Krita so you can resume where you left off. + Save the current open windows, documents and the like into the current session when closing Krita so you can resume where you left off. .. versionadded:: 4.1 Autosave Every Here the user can specify how often Krita should autosave the file, you can tick the checkbox to turn it off. For Windows these files are saved in the %TEMP% directory. If you are on Linux it is stored in /home/'username'. Compress \*.kra files more. This increases the zip compression on the saved Krita files, which makes them lighter on disk, but this takes longer to load. Upon importing Images as Layers, convert to the image color space. This makes sure that layers are the same color space as the image, necessary for saving to PSD. Undo Stack Size This is the number of undo commands Krita remembers. You can set the value to 0 for unlimited undos. Favorite Presets This determines the amount of presets that can be used in the pop-up palette. Create Backup File When selected Krita will try to save a backup file in case of a crash. Hide splash screen on startup. This'll hide the splash screen automatically once Krita is fully loaded. Enable Native File Dialog This allows you to use the system file dialog. By default turned off because we cannot seem to get native file dialogues 100% bugfree. Maximum brush size This allows you to set the maximum brush size to a size of up to 10.000 pixels. Do be careful with using this, as a 10.000 size pixel can very quickly be a full gigabyte of data being manipulated, per dab. In other words, this might be slow. Recalculate animation cache in background. Krita will recalculate the cache when you're not doing anything. .. versionchanged:: 4.1 This is now in the :ref:`performance_settings` under :guilabel:`Animation Cache`. diff --git a/reference_manual/preferences/performance_settings.rst b/reference_manual/preferences/performance_settings.rst index d71bcfa0f..30db78680 100644 --- a/reference_manual/preferences/performance_settings.rst +++ b/reference_manual/preferences/performance_settings.rst @@ -1,120 +1,120 @@ .. meta:: :description: Performance settings in Krita. .. metadata-placeholder :authors: - Wolthera van Hövell tot Westerflier - Scott Petrovic :license: GNU free documentation license 1.3 or later. .. index:: Preferences, Settings, Performance, Multithreading, RAM, Memory Usage, Lag .. _performance_settings: ==================== Performance Settings ==================== :program:`Krita`, as a painting program, juggles a lot of data around, like the brushes you use, the colours you picked, but primarily, each pixel in your image. Due to this, how :program:`Krita` organises where it stores all the data can really speed up :program:`Krita` while painting, just like having an organised artist's workplace can really speed up the painting process in real life. These preferences allow you to configure :program:`Krita's` organisation, but all do require you to restart :program:`Krita`, so it can do this organisation properly. RAM --- RAM, or Random Access Memory, is the memory your computer is immediately using. The difference between RAM and the hard drive memory can be compared to the difference between having files on your desk and having files safely stored away in an archiving room: The files on your desk as much easier to access than the ones in your archive, and it takes time to pull new files from the archive. This is the same for you computer and RAM. Files need to be loaded into RAM before the computer can really use them, and storing and removing them from RAM takes time. These settings allow you to choose how much of your virtual desk you dedicate to :program:`Krita`. :program:`Krita` will then reserve them on start-up. This does mean that if you change any of the given options, you need to restart :program:`Krita` so it can make this reservation. Memory Limit This is the maximum space :program:`Krita` will reserve on your RAM on startup. It's both available in percentages and Bytes, so you can specify precisely. :program:`Krita` will not take up more space than this, making it safe for you to run an internet browser or music on the background. Internal Pool A feature for advanced computer users. This allows :program:`Krita` to organise the area it takes up on the virtual working desk before putting it's data on there. Like how a painter has a standard spot for their canvas, :program:`Krita` also benefits from giving certain data it uses it's place(a memory pool), so that it can find them easily, and it doesn't get lost amongst the other data(memory fragmentation). It will then also not have to spent time finding a spot for this data. Increasing this of course means there's more space for this type of data, but like how filling up your working desk with only one big canvas will make it difficult to find room for your paints and brushes, having a large internal pool will result in :program:`Krita` not knowing where to put the other non-specific data. On the opposite end, not giving your canvas a spot at all, will result in you spending more time looking for a place where you will put the new layer or that reference you just took out of the storage. This happens for :program:`Krita` as well, making it slower. This is recommended to be a size of one layer of your image, e.g. if you usually paint on the image of 3000x3000x8bit-ARGB, the pool should be something like 36 MiB. As :program:`Krita` does this on start-up, you will need to restart :program:`Krita` to have this change affect anything. Swap Undo After :program:`Krita` also needs to keep all the Undo states on the virtual desk(RAM). Swapping means that parts of the files on the virtual desk get sent to the virtual archive room. This allows :program:`Krita` to dedicate more RAM space to new actions, by sending old Undo states to the archive room once it hits this limit. This will make undoing a little slower, but this can be desirable for the performance of :program:`Krita` overall. This too needs :program:`Krita` to be restarted. Swapping -------- File Size Limit This determines the limit of the total space :program:`Krita` can take up in the virtual archive room. If :program:`Krita` hits the limit of both the memory limit above, and this Swap File limit, it can't do anything any more(and will freeze). Swap File Location This determines where the Swap File will be stored on you hard-drive. Location can make a difference, for example, Solid State Drives(SSD) are faster than Hard Disk Drives(HDD). Some people even like to use USB-sticks for the swap file location. Advanced -------- Multithreading ~~~~~~~~~~~~~~ Since 4.0, Krita supports multithreading for the animation cache and handling the drawing of brush tips when using the pixel brush. CPU Limit The amount of cores you want to allow Krita to use when multithreading. Frame Rendering Clones Limit When rendering animations to frames, Krita multithreads by keeping a few copies of the image, with a maximum determined by the amount of cores your processor has. If you have a heavy animation file and lots of cores, the copies can be quite heavy on your machine, so in that case try lowering this value. Other ~~~~~ Limit frames per second while painting. This makes the canvas update less often, which means Krita can spend more time calculating other things. Some people find fewer updates unnerving to watch however, hence this is configurable. Debuglogging of OpenGL framerate Will show the canvas framerate on the canvas when active. Debug logging for brush rendering speed. Will show numbers indicating how fast the last brush stroke was on canvas. Disable vector optimisations(For AMD CPUs) - Vector optimisations are a special way of asking the CPU to do maths, these have names such as SIMD and AVX. These optimisations can make Krita a lt faster when painting, except when you have a AMD CPU under windows. There seems to be something strange going on there, so just deactive them then. + Vector optimisations are a special way of asking the CPU to do maths, these have names such as SIMD and AVX. These optimisations can make Krita a lt faster when painting, except when you have a AMD CPU under windows. There seems to be something strange going on there, so just deactivate them then. Enable Progress Reporting This allows you to toggle the progress reporter, which is a little feedback progress bar that shows up in the status bar when you let Krita do heavy operations, such as heavy filters or big strokes. The red icon next to the bar will allow you to cancel your operation. This is on by default, but as progress reporting itself can take up some time, you can switch it off here. Performance logging This enables performance logging, which is then saved to the ``Log`` folder in your ``working directory``. Your working directory is where the auto save is saved at as well. So for unnamed files, this is the ``$home`` folder in Linux, and the ``%TEMP%`` folder in windows. Animation Cache --------------- .. versionadded:: 4.1 The animation cache is the space taken up by animation frames in the memory of the computer. A cache in this sense is a cache of precalculated images. Playing back a video at 25 FPS means that the computer has to precalculate 25 images per second of video. Now, video playing software is able to do this because it really focuses on this one single task. However, Krita as a painting program also allows you to edit the pictures. Because Krita needs to be able to do this, and a dedicated video player doesn't, Krita cannot do the same kind of optimizations as a dedicated video player can. Still, an animator does need to be able to see what kind of animation they are making. To do this properly, we need to decide how Krita will regenerate the cache after the animator makes a change. There's fortunately a lot of different options how we can do this. However, the best solution really depends on what kind of computer you have and what kind of animation you are making. Therefore in this tab you can customize the way how and when the cache is generated. Cache Storage Backend ~~~~~~~~~~~~~~~~~~~~~ In-memory Animation frame cache will be stored in RAM, completely without any limitations. This is also the way it was handled before 4.1. This is only recommended for computers with huge amount of RAM and animations that must show full-canvas full resolution 6k at 25 fps. If you do not have a huge amount(say, 64GiB) of ram, do *not* use this option (and scale down your projects). .. warning:: Please make sure your computer has enough RAM *above* the amount you requested in the general tab. Otherwise you might face system freezes. * For 1 second of FullHD @ 25 FPS you will need 200 extra MiB of Memory * For 1 second of 4K UltraHD@ 25 FPS, you will need 800 extra MiB of Memory. On-disk Animation frames are stored in the hard disk in the same folder as the swap file. The cache is stored in a compressed way. A little amount of extra ram is needed. Since data transfer speed of the hard drive is slow. You might want to limit the :guilabel:`Cached Frame Size` to be able to play your video at 25 fps. A limit of 2500 px is usually a good choice. Cache Generation Options ~~~~~~~~~~~~~~~~~~~~~~~~ Limit Cached Frame Size Render scaled down version of the frame if the image is bigger than the provided limit. Make sure you enable this option when using On-Disk storage backend, because On-Disk storage is a little slow. Without the limit, there's a good chance that it will not be able to render at full speed. Lower the size to play back faster at the cost of lower resolution. Use Region Of Interest We technically only need to use the section of the image that is in view. Region of interest represents that section. When the image is above the configurable limit, render only the currently visible part of it. Enable Background Cache Generation This allows you to set whether the animation is cached for playback in the background(that is, when you're not using the computer). Then, when animation is cached when pressing play, this caching will take less long. However, turning off this automatic caching can save power by having your computer work less. diff --git a/reference_manual/tools/transform.rst b/reference_manual/tools/transform.rst index 67a233936..e75790d28 100644 --- a/reference_manual/tools/transform.rst +++ b/reference_manual/tools/transform.rst @@ -1,161 +1,161 @@ .. meta:: :description: Krita's transform tool reference. .. metadata-placeholder :authors: - Wolthera van Hövell tot Westerflier - Scott Petrovic - Micheal Abrahams - Raghavendra Kamath :license: GNU free documentation license 1.3 or later. .. index:: Tools, Transform .. _transform_tool: ============== Transform Tool ============== |tooltransform| The Transform tool lets you quickly transform the current selection or layer. Basic transformation options include resize, rotate and skew. In addition, you have the option to apply advanced transforms such as Perspective, Warp, Cage and Liquid. These are all powerful options and will give you complete control over your selections/layers. When you first invoke the tool, handles will appear at the corners and sides, which you can use to resize your selection or layer. You can perform rotations by moving the mouse above or to the left of the handles and dragging it. You can also click anywhere inside the selection or layer and move it by dragging the mouse. You can fine-tune the transform tool parameters using tool options docker. The parameters are split between five tabs: Free Transform, Warp, Perspective, Cage and Liquefy. .. figure:: /images/en/Transform_Tool_Options.png Free Transform docker Free transform -------------- This allows you to do basic rotation, resizing, flipping, and even perspective skewing if you hold :kbd:`Ctrl`.Holding the :kbd:`Shift` key will maintain your aspect ratio throughout the transform. .. figure:: /images/en/Krita_transforms_free.png Free transform in action. If you look at the bottom, there's quick buttons for flipping horizontally, vertically and rotating 90 degrees left and right. Furthermore, the button to the left of the anchor point widget allows you to choose whether to always transform using the anchor point, or not. `Video of how to use the anchor point for resizing. `_ Perspective ----------- While free transform has some perspective options, the perspective transform allows for maximum control. You can drag the corner points, or even the designated vanishing point. You can also change the size, shear and position transform while remaining in perspective with the tool-options. .. figure:: /images/en/Krita_transforms_perspective.png Perspective transform Warp ---- Warp allows you to deform the image by dragging from a grid or choosing the dragging points yourself. .. figure:: /images/en/Transform_Tool_Options_Warp.png Warp Option .. figure:: /images/en/Krita_transforms_warp.png Free transform in action. There's warp options: Rigid, Affine and Similtude. These change the algorithm used to determine the strength of the deformation. The flexibility determines, how strong the effect of moving these point are. Anchor Points ~~~~~~~~~~~~~ You can divide these either by subdivision or drawing custom points. Subdivision This allows you to subdivide the selected area into a grid. Draw Draw the anchor points yourself. Locking the points will put you in transform mode. Unlocking the points back into edit mode. Cage ---- Create a cage around an image, and when it's closed, you can use it to deform the image. If you have at the least 3 points on the canvas, you can choose to switch between deforming and editing the existing points. .. figure:: /images/en/Krita_transforms_cage.png Transforming a straight banana to be curved with the cage tool Hotkeys ~~~~~~~ Both Cage and Warp use little nodes. These nodes can be selected and deselected together by pressing :kbd:`Ctrl` before clicking nodes. Then you can move them by pressing the cursor inside the bounding box. Rotating is done by pressing and dragging the cursor outside the bounding box and scaling the same, only one presses :kbd:`Ctrl` before doing the motion. Liquify ------- .. image:: /images/en/Transform_Tool_Options_Liquify.png Like our deform brush, the liquefy brush allows you to draw the deformations straight on the canvas. Move Drag the image along the brush stroke. Scale Grow/Shrink the image under the cursor. Rotate Twirl the image under the cursor Offset Shift the image under the cursor. Undo Erases the actions of other tools. .. figure:: /images/en/Krita_transforms_liquefy.png Liquefy used to turn an apple into a pear In the options for each brush there's: Mode This is either wash or build up. :guilabel:`Wash` will normalize the effect to be between none, and the amount parameter as maximum. :guilabel:`Build-up` will just add on until it's impossible.. Size The brush size. The button to the right allow you to let it scale with pressure. Amount The strength of the brush. The button to the right let's it scale with tablet-pressure. Flow Only applicable with build-up. Spacing The spacing of the liquefy dabs. Reverse Reverses the action, so grow becomes shrink, rotate results in clockwise becoming counter-clockwise. .. figure:: /images/en/Krita_transforms_deformvsliquefy.png liquefy on the left and deform brush on the right. Krita also has a :ref:`deform_brush_engine` which is much faster than liquefy, but has less quality. If you are attempting to make liquefy a little faster, note that it speeds up with the less information it needs to process, so working with liquefy within a selection or using liquefy on a separate layer with little on it will greatly enhance the speed. Recursive Transform ------------------- The little spider icon on the lower-left of the transform tool options is the ''Recursive Transform''. .. figure:: /images/en/Krita_transforms_recursive.png Recursive transform transforms all the layers in the group, so with this apple, both the line-art as the fill will be transformed. Recursive transform, when toggled, allows you to mass-transform all the layers in a group when only transforming the group. Continuous Transform -------------------- -If you apply a transformation, and try to start a new one directly afterwards, Krita will attempt to recall the previous transform, so you can continue it. This is the *continuous transform*. You can press :kbd:`Esc` to cancel this and start a new transform, or presset :guilabel:`reset` in the tool options while no transform is active. +If you apply a transformation, and try to start a new one directly afterwards, Krita will attempt to recall the previous transform, so you can continue it. This is the *continuous transform*. You can press :kbd:`Esc` to cancel this and start a new transform, or preset :guilabel:`reset` in the tool options while no transform is active. Transformation Masks -------------------- These allow you make non-destructive transforms, check :ref:`here ` for more info. [[Category:Toolbox]] diff --git a/tutorials/common_workflows.rst b/tutorials/common_workflows.rst index c1edc0104..1507fbb04 100644 --- a/tutorials/common_workflows.rst +++ b/tutorials/common_workflows.rst @@ -1,210 +1,210 @@ .. meta:: :description lang=en: Common workflows used in Krita .. metadata-placeholder :authors: - Wolthera van Hövell tot Westerflier - Vancemoss - Raghavendra Kamath :license: GNU free documentation license 1.3 or later. .. _common_wokflows: ================ Common Workflows ================ Krita's main goal is to help artists create digital painting from scratch. Krita is used by comic artists, matte painters, texture artists, and illustrators around the world. This section explains some common workflow that artists use in Krita. When you open a new document in Krita for the first time, you can start painting instantly. The brush tool is selected by default and you just have to paint on the canvas. However, let us look at what artists do in Krita. Below are some of the common workflows used in Krita: Speed Painting and Conceptualizing ---------------------------------- Some artists work only on digital medium, sketching and visualizing concepts in Krita from scratch. As the name suggests a technique of painting done within matter of hours to quickly visualize the basic scene , character, look and feel of the environment or to denote the general mood and overall concept is called a **speed painting**. Finishing and finer details are not the main goal of this type of painting, but the representation of form value and layout is main goal. Some artists set time limit to complete the painting while some paint casually. Speed painting then can be taken forward by adding finer details and polish to create a final piece. Generally artists first block in the composition by adding patches and blobs of flat colors, defining the silhouette etc . Krita has some efficient brushes for this situation, for example the brush under **Block Tag** like Block fuzzy, Block basic, layout_block etc. After the composition and a basic layout has been laid out the artists add as much details as possible in the given limited time, this requires a decent knowledge of forms, value perspective and proportions of the objects. Below is an example of speed paint done by `David Revoy `_ done in an hours time. .. image:: /images/en/Pepper-speedpaint-deevad.jpg :alt: speedpaint of pepper and carrot by deevad (David Revoy) :width: 800 -Artwork by David Revoy, licence : `CC-BY `_ +Artwork by David Revoy, license : `CC-BY `_ You can view the recorded speed painting demo for the above image `on Youtube `_. Colorizing Line Art ------------------- Often an artist for example a comic book colorist will need to take a pencil sketch or other line art of some sort and use Krita to paint underneath it. This can be either an image created digitally or something that was done outside the computer and has been scanned. Preparing the lineart ^^^^^^^^^^^^^^^^^^^^^ If your images has a white or other single-tone background, you can use either of the following methods to prepare the art for coloring.: Place the line-art at the top of the layer stack and set its layer blending mode to Multiply If you want to clean the lineart a bit you can press :kbd:`Ctrl+L` or go to :menuselection:`Filters --> Adjust --> levels` .. image:: /images/en/Levels-filter.png :alt: level filter dialog You can clean the unwanted greys by moving the white triangle in the input levels section to left and darken the black by moving the black triangle to right. If you draw in blue pencils and then ink your line art you may need to remove the blue lines first to do that go to :menuselection:`Filter --> Adjust --> Color adjustment` curves or press shortcut :kbd:`Ctrl+M`. .. image:: /images/en/common-workflows/Color-adjustment-cw.png :alt: remove blue lines from image step 1 Now select **Red** from the drop-down, Click on the top right node on the graph and slide it all the way down. Or you can click on the top right node and enter **0** in the output field. Repeat this step for **Green** too. .. image:: /images/en/common-workflows/Color-adjustment-02.png :alt: removing blue lines from scan step 2 Now the whole drawing will have a blue overlay, zoom in and check if the blue pencil lines are still visible slightly, If you still see them, then go to **Blue** Channel in the color adjustment and shift the top right node towards left a bit, Or enter a value around 190 ( one that removes the remaining rough lines) in the input box. .. image:: /images/en/common-workflows/Color-adjustment-03.png :alt: remove blue lines from scans step 3 Now apply the color adjustment filter, yes we still have lots of blue on the artwork be patient and move on to the next step. Go to :menuselection:`Filter --> Adjust --> Desaturate` or press :kbd:`Ctrl + Shift + U`. Now select max from the list. .. image:: /images/en/common-workflows/Color-adjustment-04.png :alt: remove blue lines from scans step 4 .. hint:: It is good to use non-photo-blue pencils to create the blue lines as those are easy to remove. If you are drawing digitally in blue lines use #A4DDED color as this is closer to non-photo-blue color. You can learn more about doing a sketch from blue sketch to digital painting `here in a tutorial by David Revoy `_. After you have a clean black and white line-art you may need to erase the white color and keep only black line-art, to achieve that go to :menuselection:`Filters --> Color --> Color to Alpha`. Use the dialog box to turn all the white areas of the image transparent. The Color Picker is set to White by default. If you have imported scanned art and need to select another color for the paper color then you would do it here. .. image:: /images/en/Color-to-alpha.png :alt: color to alpha dialog box This will convert the white color in your line-art to alpha i.e. it will make the white transparent leaving only the lineart. Your line-art can be in grey-scale color space, this is a unique feature in Krita which allows you to keep a layer in a color-space independent from the image. Laying in Flat Colors ^^^^^^^^^^^^^^^^^^^^^ There are many ways to color a line art in Krita, but generally these three are the common among the artists. 1. Paint blocks of color directly with block brushes. 2. Fill with Flood fill Tool. 3. Use one of the GMIC colorise comics filters. Blocking with brush """"""""""""""""""" The first is the more traditional method of taking a shape brush or using the geometric tools to lay in color. This would be similar to using an analog marker or brush on paper. There are various block brushes in Krita, you can select **Block** Tag from the dro-pdown in the brush presets docker and use the brushes listed there. Add a layer underneath your lineart layer and start painting with the brush, If you want to correct any area you can press :kbd:`E` and convert the same brush into an eraser. You can also use a layer each for different colors for more flexibility. Filling with Flood Fill tool """""""""""""""""""""""""""" The second method is to use the Flood fill tool to fill large parts of your line-art quickly. This method generally requires closed gaps in the line-art. To begin with this method place your line-art on a separate layer. Then activate the flood fill tool and set the grow selection to 2px, un-check limit to current layer if previously checked. .. image:: /images/en/common-workflows/Floodfill-krita.png :alt: flood fill in krita Choose a color from color elector and just click on the area you want to fill the color. As we have expanded the fill with grow selection the color will be filled slightly underneath the line-art thus giving us a clean fill. GMIC Colorise [Interactive] """"""""""""""""""""""""""" The third method is to use take advantage of the integrated G'Mic filters. These are powerful filters that can dramatically improve your workflow and cut your down on your production time. To begin coloring with the GMIC colorize interactive, go to :menuselection:`Filter --> GMIC`. Choose :menuselection:`Filter --> G'Mic --> Black & white --> Colorize[interactive]` from the list of filters. Then select Line-art for :menuselection:`Input type, Image + Colors (2 Layers)` for output type, set the view resolution according to your need. If you have any specific color palette to use for coloring add the path for it in additional color palette. The example of the filter window with the required inputs is shown below. .. image:: /images/en/common-workflows/GMIC-colorize-interactive-krita.png :alt: G'MIC window in Krita Press **Apply** to begin the coloring, this will open a color selector **palette** window and a window showing your lineart. Choose the color from the palette and click on the areas that needs to be filled with color like the example shown below. .. image:: /images/en/common-workflows/Krita-GMIC-colorize-interactive.png :alt: G'MIC colorise interactive window If you feel that the dots are a bit distracting you can press :kbd:`Tab` to reduce the size or hide the dots. to zoom out you can press :kbd:`Ctrl+down arrow` and :kbd:`Ctrl+up arrow` vice versa. Panning is done by |mousemiddle| + drag. Press :kbd:`Spacebar` to generate the colors. If you want to replace a color select the color by |mousemiddle| and pressing :kbd:`R` then you can select an alternate color from the palette. Once you have finished adding the desired flat colors you can press :kbd:`Enter` to apply the filter. Then don't forget to press **Ok** in the GMIC dialog box. The flats colors will be placed on a separate layer. You can check `this `_ tutorial by David Revoy to know more about this technique. GMIC Colorize [comics] """""""""""""""""""""" Krita provides one more option to prepare flat colors through GMIC colorize comics filter. This technique needs some preparations before you run the GMIC filter. This layer extrapolates the color spots that you input below the lineart You have to create two layers below the line art, one for the color spots indicating which color you need to be filled in the region and one for the final extrapolated output of the filter. Mark some colors spots in the layer beneath the lineart. The layer setup can be seen in the image below. .. image:: /images/en/common-workflows/Colorize-krita.png :alt: G'MIC colorise comics layer setup The colors spots are marked in red in the image Now go to :menuselection:`Filter --> G'Mic --> Black & white --> Colorize[comics]`. In the GMIC dialog box, select all for input and inplace(default) for output, select Lineart + color spots + extrapolated layers for both input and output layers on the right hand side. Smoothness is for filling gap tolerance and details the default is 0.5 you can adjust it according to your line art. .. image:: /images/en/common-workflows/Colorise-comics-setting.png :alt: Colorise Interactive dialog and settings Press **Apply** and **Ok** to apply and exit the GMIC dialog. You'll now have flat colors beneath you lineart. More details about this technique can be found in the tutorial `at Timothée Giet's blog `_. Painting -------- Starting from chaos ^^^^^^^^^^^^^^^^^^^ Here, you start by making a mess through random shapes and texture, then taking inspirations from the resulting chaos you can form various concepts. It is kind of like making things from clouds or finding recognizable shapes of things in abstract and random textures. Many concept artist work with this technique. You can use brushes like the shape brush, or the spray brush to paint a lot of different shapes, and from the resulting noise, you let you brain pick out shapes and compositions. .. image:: /images/en/common-workflows/Chaos2.jpg :alt: Starting a painting from chaotic sketch You then refine these shapes to look more like shapes you think they look, and paint them over with a normal paintbrush. This method is best done in a painting environment. Starting from a value based underground ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This method finds it's origins in old oil-painting practice: You first make an under-painting and then paint over it with colour, having the dark underground shine through. With Krita you can use blending modes for this purpose. Choosing the Color blending mode on a layer on top allows you to change the colours of the image without changing the relative luminosity. This is useful, because humans are much more sensitive to tonal differences than difference in saturation and hue. This'll allow you to work in greyscale before going into colour for the polishing phase. You can find more about this technique `here `_. Preparing Tiles and Textures ---------------------------- Many artists use Krita to create textures for 3d assets used for games animation etc. Krita has many texture template for you to choose and get started with creating textures. These template have common sizes, bit depth and color profiles that are used for texturing workflow. Krita also has a real-time seamless tile mode to help texture artist prepare tiles and texture easily and check if it is seamless on the fly. The tiled mode is called wrap around mode , to activate this mode you have press :kbd:`W`. No when you paint the canvas is tiled in real-time allowing you to create seamless pattern and texture, it is also easy to prepare interlocking patterns and motifs in this mode. Creating Pixel Art ------------------ Krita can also be used to create high definition pixel painting. The pixel art look can be achieved by using Index color filter layer and overlaying dithering patterns. The general layer stack arrangement is as shown below. .. image:: /images/en/common-workflows/Layer-docker-pixelart.png :alt: Layer stack setup for pixel art The index color filter maps specific user selected colors to the grey scale value of the artwork. You can see the example below, the strip below the black and white gradient has index color applied to it so that the black and white gradient gets the color selected to different values. .. image:: /images/en/common-workflows/Gradient-pixelart.png :alt: color mapping in index color to greyscale You can choose the required colors and ramps in the index color filter dialog as shown below. .. image:: /images/en/common-workflows/Index-color-filter.png :alt: index color filter dialog Dithering can be used to enhance the look of the art and to ease the banding occurred by the index color filter. Krita has a variety of dithering patterns by default, these can be found in pattern docker. You can use these patterns as fill layer , then set the blend mode to **overlay** and adjust the opacity according to your liking. generally an opacity range of 10% - 25% is ideal. Paint the artwork in grey-scale and add a index color filter layer at the top then add the dithering pattern fill layer below the index color filter but above the artwork layer, as shown in the layer stack arrangement above. You can paint or adjust the artwork at any stage as we have added the index color filter as a filter layer. You can add different groups for different colors and add different dithering patterns for each group. Below is an example painted with this layer arrangement. .. image:: /images/en/common-workflows/Kiki-pixel-art.png :alt: Pixel art done in Krita diff --git a/tutorials/krita-brush-tips/sculpt-paint-brush.rst b/tutorials/krita-brush-tips/sculpt-paint-brush.rst index 58b9ba9d9..8ce2f0ce2 100644 --- a/tutorials/krita-brush-tips/sculpt-paint-brush.rst +++ b/tutorials/krita-brush-tips/sculpt-paint-brush.rst @@ -1,67 +1,67 @@ .. meta:: :description lang=en: Tutorial for making sculpt brush like sinix's paint like a sculptor video .. metadata-placeholder :authors: - Wolthera van Hövell tot Westerflier :license: GNU free documentation license 1.3 or later. .. _sculpt_paint_brush: ============================= Brush-tips:Sculpt-paint-brush ============================= Question -------- **How do I make a brush like the one in Sinix's paint-like-a-sculptor video?** It's actually quite easy, but most easy to do since Krita 3.0 due a few bugfixes. First, select *Basic_Wet* from the default presets, and go into the brush editor with :kbd:`f5`. .. image:: /images/en/brush-tips/Painter-sculpt-brush-01.png :alt: brush setting dialog to get started -Then, the trick is to go into **Opacity**, untoggle **Pressure** from the sensors, toggle **Fade** and then reverse the curve as shown above. Make sure that the curve ends a little above the bottom-right, so that you are aways painting something. Otherwise, the smudge won't work. +Then, the trick is to go into **Opacity**, untoggle **Pressure** from the sensors, toggle **Fade** and then reverse the curve as shown above. Make sure that the curve ends a little above the bottom-right, so that you are always painting something. Otherwise, the smudge won't work. This'll make the color rate decrease and turn it into a smudge brush as the stroke continues: .. image:: /images/en/brush-tips/Painter-sculpt-brush-02.png :alt: remove pressure from opacity parameter and add fade. The **Fade** sensor will base the stroke length on brush size. The **Distance** sensor will base it on actual pixels, and the **Time** on actual seconds. -Then, select :menuselection:`Brushtip --> Predfined` and select the default *A_Angular_Church_HR* brushtip. +Then, select :menuselection:`Brushtip --> Predefined` and select the default *A_Angular_Church_HR* brushtip. .. image:: /images/en/brush-tips/Painter-sculpt-brush-03.png :alt: select the Angular church brush tip This makes for a nice textured square brush. Of course, this'll make the stroke distance longer to get to smudging, so we go back to the *Opacity*. .. image:: /images/en/brush-tips/Painter-sculpt-brush-04.png :alt: opacity parameter in the rbush setting Just adjust the fade-length by |mouseright| on the slider bar. You can then input a number. In the screenshot, I have 500, but the sweet spot seems to be somewhere between 150 and 200. Now, you'll notice that on the start of a stroke, it might be a little faded, so go into **Color Rate** and turn off the **Enable Pen Settings** there. .. image:: /images/en/brush-tips/Painter-sculpt-brush-05.png :alt: switch off sensors for color rate Then, finally, we'll make the brush rotate. .. image:: /images/en/brush-tips/Painter-sculpt-brush-06.png :alt: brush rotation is enabled Tick the **Rotation** parameter, and select it. There, untick **Pressure** and tick **Drawing Angle**. Then, for better angling, tick **Lock** and set the **Angle Offset** to 90 degrees by |mouseright| the slider bar and typing in 90. Now, give your brush a new name, doodle on the brush-square, **Save to presets** and paint! .. image:: /images/en/brush-tips/Painter-sculpt-brush-07.png :alt: result from the brush we made. diff --git a/untranslatable_pages/cmake_settings_for_developers.rst b/untranslatable_pages/cmake_settings_for_developers.rst index b1d74a9ab..1c9550e68 100644 --- a/untranslatable_pages/cmake_settings_for_developers.rst +++ b/untranslatable_pages/cmake_settings_for_developers.rst @@ -1,102 +1,102 @@ .. meta:: :description: CMake settings for developers. .. metadata-placeholder :authors: - Boudewijn Rempt :license: GNU free documentation license 1.3 or later. .. _cmake_settings_for_developers: ============================= CMake Settings for Developers ============================= The `CMake `_ build system generators used by Krita is one of the most used build system generatorss in the C++ world. A build system is a system that describes how a an application should be built from source code. CMake generates a build system from the information given in the CMakeLists.txt and `*.cmake` files. It is a complete but rather unusual language. If you start working on Krita, you will need knowledge of two things: how to run the cmake generator, and which variables are important there, and how to edit the CMakeLists.txt files. This page tells you how to run the cmake generator. The cmake generator is run like this: .. code:: cmake -DSOME_CMAKE_VARIABLE=SOME_VALUE ../path/to/source That is, every option is prefixed with -D, followed by a usually uppercase variable name, the equal sign and the value. The following variables are important for Krita. You cannot build Krita inside the source directory, so you need to give the path to the source directory, where the top-level CMakeLists.txt file is found. .. contents:: BUILD_TESTING ------------- If set to ON, the unittests will be built. *All* developers should have this enabled! You run the unittests with ```make test```, or you can run them on their own from their location in the build tree. CMAKE_INSTALL_PREFIX -------------------- This determines where Krita will be installed to. By default this is ```/usr/local``` on Linux, which is not what you want. CMAKE_BUILD_TYPE ---------------- This has three options: Debug, RelWithDebInfo and Release. Developers should *always* use Debug, because otherwise ASSERTS will not fire, and developers should pay attention to asserts. Packagers should use RelWithDebInfo. CMAKE_PREFIX_PATH ----------------- This can be set to make the build system look for dependencies in other places than the default one. HIDE_SAFE_ASSERTS ----------------- If set to ON, Krita will not show popups whenever the code encounters a problem that developers need to know about, but users not. If set to OFF, Krita will popup a little message window telling you about the error, of OFF, it will print the information to the terminal. For developers, either is fine, at least, if you start Krita and pay attention to the terminal output. For packagers, it should be ON. KRITA_DEVS ---------- -This is to be used with the Debug CMAKE_BUILD_TYPE, to re-enable optimizations that make it possible to actualy work with Krita. By default, Debug disables all compiler optimizations, and Krita needs those. +This is to be used with the Debug CMAKE_BUILD_TYPE, to re-enable optimizations that make it possible to actually work with Krita. By default, Debug disables all compiler optimizations, and Krita needs those. PYQT_SIP_DIR_OVERRIDE --------------------- If you have built your own PyQt and SIP, use this to make sure Krita can find them. USE_LOCK_FREE_HASH_TABLE ------------------------ This option enables the experimental lock free hash table. This is ON by default at the moment. FOUNDATION_BUILD ---------------- This option is for packaging Krita on systems that do not have the default color themes shipped by KDE Plasma. KRITA_ENABLE_BROKEN_TESTS ------------------------- A number of unittests are known to be broken. They should be fixed, but in the meantime, having dozens of failing unittests hides regressions. Set this to ON to run the broken tests. These tests are always built. LIMIT_LONG_TESTS ---------------- When set to ON, the default, some unittests will be cut short. Set to OFF to test for stress conditions. ENABLE_PYTHON_2 --------------- Use Python 2 instead of Python 3. Only to be used when integrating Krita in a python2-based VFX pipeline. BUILD_KRITA_QT_DESIGNER_PLUGINS ------------------------------- OFF by default, enable this to build plugins for Qt Designer/Qt Creator so you can add Krita specific widgets to .ui files. diff --git a/user_manual/layers_and_masks.rst b/user_manual/layers_and_masks.rst index da028d9db..eea57f3f2 100644 --- a/user_manual/layers_and_masks.rst +++ b/user_manual/layers_and_masks.rst @@ -1,182 +1,182 @@ .. meta:: :description: An introduction guide to how layers and masks work inside Krita. .. metadata-placeholder :authors: - Wolthera van Hövell tot Westerflier - Raghavendra Kamath - Scott Petrovic - AnetK - Bugsbane - Alan - Lundin :license: GNU free documentation license 1.3 or later. .. index:: Layers, Masks .. _layers_and_masks: ================================ Introduction to Layers and Masks ================================ Krita supports layers which help to better control parts and elements of your painting. Think of an artwork or collage made with various stacks of papers with some paper cut such that they show the paper beneath them while some hide what's beneath them. If you want to replace an element in the artwork, you replace that piece of paper instead of drawing the entire thing. In Krita instead of papers we use **Layers**. Layers are part of the document which may or may not be transparent, they may be smaller or bigger than the document itself, they can arrange one above other, named and grouped. Layers can give better control over your artwork for example you can re-color an entire artwork just by working on the separate color layer and thereby not destroying the line art which will reside above this color layer. You can edit individual layers, you can even add special effects to them, like Layer styles, blending modes, transparency, filters and transforms. Krita takes all these layers in its layer stack, including the special effects and combines or composites together a final image. This is just one of the many digital image manipulation tricks that :program:`Krita` has up its sleeve! Usually, when you put one paint layer on top of another, the upper paint layer will be fully visible, while the layer behind it will either be obscured, occluded or only partially visible. Managing layers --------------- Some artists draw with limited number of layers but some prefer to have different elements of the artwork on separate layer. Krita has some good layer management features which make the layer management task easy. You can :ref:`group layers ` and organise the elements of your artwork. The layer order can be changed or layers can be moved in and out of a group in the layer stack by simply holding them and dragging and dropping. Layers can also be copied across documents while in the :ref:`subwindow mode `, by dragging and dropping from one document to another. These features save time and also help artists in maintaining the file with a layer stack which will be easy to understand for others who work on the same file. In addition to these layers and groups can both be labeled and filtered by colors, thus helping the artists to visually differentiate them. To assign a color label to your layer or layer group you have to right click on the layer and choose one of the given colors from the context menu. To remove an already existing color label you can click on the 'x' marked box in the context menu. .. image:: /images/en/Layer-color-filters.png :width: 400 Once you assign color labels to your layers, you can then filter layers having similar color label by clicking on one or more colors in the list from the drop-down situated at the top-right corner of the layer docker .. image:: /images/en/Layer-color-filters-menu.png :width: 500 Types of Layers --------------- .. image:: /images/en/500px-Krita-types-of-layers.png The image above shows the various types of layers in :ref:`layer_docker`, Each layer type has a different purpose for example all the vector elements can be only placed on a vector layer and similarly normal raster elements are mostly on the paint layer, :ref:`cat_layers_and_masks` page contains more information about these types layers. Now Let us see how these layers are composited in Krita. How are layers composited in Krita ? ------------------------------------ In Krita, the visible layers form a composite image which is shown on the canvas. The order in which Krita composites the layers is from bottom to top, much like the stack of papers we discussed above. As we continue adding layers, the image we see changes, according to the properties of the newly added layers on top. Group Layers composite separately from the other layers in the stack, except when pass through mode is activated. The layers inside a group form a composite image first and then this composite is taken into consideration while the layer stack is composited to form a whole image. If the pass through mode is activated by pressing the icon similar to bricked wall, the layers within the group are considered as if they are outside of that particular group in the layer stack, however, the visibility of the layers in a group depends on the visibility of the group. .. image:: /images/en/Passthrough-mode_.png .. image:: /images/en/Layer-composite.png The groups in a PSD file saved from Photoshop have pass-through mode on by default unless they are specifically set with other blending modes. .. index:: Alpha Inheritance, Clipping Masks Inherit Alpha or Clipping layers -------------------------------- There is a clipping feature in Krita called inherit alpha. It is denoted by an alpha icon in the layer stack. .. image:: /images/en/Inherit-alpha-02.png It can be somewhat hard to figure out how the inherit alpha feature works in Krita for the first time. Once you click on the inherit alpha icon on the layer stack, the pixels of the layer you are painting on are confined to the combined pixel area of all the layers below it. That means if you have the default white background layer as first layer, clicking on the inherit alpha icon and painting on any layer above will seem to have no effect as the entire canvas is filled with white. Hence, it is advised to put the base layer that you want the pixels to clip in a group layer. As mentioned above, group layers are composited separately, hence the layer which is the lowest layer in a group becomes the bounding layer and the content of the layers above this layer clips to it if inherit alpha is enabled. .. image:: /images/en/Inherit-alpha-krita.jpg .. image:: /images/en/Krita-tutorial2-I.1-2.png You can also enable alpha inheritance to a group layer. Masks and Filters ----------------- Krita supports non-destructive editing of the content of the layer. Non-destructive editing means editing or changing a layer or image without actually changing the original source image permanently, the changes are just added as filters or masks over the original image while keeping it intact, this helps a lot when your workflow requires constant back and forth. You can go back to original image with a click of a button, Just hide the filter or mask you have your initial image. You can add various filters to a layer with Filter mask, or add Filter -layer which will affect the whole image. Layers can also be transformed non-destructively with the transformation masks, and even have portions temporarily hidden with a Transparenct Mask. Non-destructive effects like these are very useful when you change your mind later, or need to make a set of variations of an given image. +layer which will affect the whole image. Layers can also be transformed non-destructively with the transformation masks, and even have portions temporarily hidden with a Transparent Mask. Non-destructive effects like these are very useful when you change your mind later, or need to make a set of variations of an given image. .. note:: You can merge all visible layers by selecting everything first :menuselection:`Layer --> Select --> Visible Layers`. Then Combine them all by merging :menuselection:`Layer --> Merge with Layer Below`. These filters and masks are accessible through the right click menu (as shown in the image below) and the Plus icon on the layer docker. .. image:: /images/en/Layer-right-click.png You can also add a filter as a mask from filter dialog itself, by clicking on the :guilabel:`Create Filter Mask` button. .. image:: /images/en/Filtermask-button.png All the filters and masks can also be applied over a group too, thus making it easy to non-destructively edit multiple layers at once. In the :ref:`category Layers and masks ` you can read more about the individual types of layers and masks. :ref:`Layer Docker ` has more information about the shortcuts and other layer management workflows. diff --git a/user_manual/python_scripting/introduction_to_python_scripting.rst b/user_manual/python_scripting/introduction_to_python_scripting.rst index eaf2bd1df..8daa61312 100644 --- a/user_manual/python_scripting/introduction_to_python_scripting.rst +++ b/user_manual/python_scripting/introduction_to_python_scripting.rst @@ -1,188 +1,188 @@ .. meta:: :description: Introduction to using Krita's python plugin API. .. metadata-placeholder :authors: - Wolthera van Hövell tot Westerflier - Alvin Wong - Scott Petrovic - Micheal Abrahams :license: GNU free documentation license 1.3 or later. .. index:: Python, Python Scripting, Scripting, Plugin, Debug .. _introduction_to_python_scripting: ================================ Introduction to Python Scripting ================================ .. versionadded:: 4.0 When we offered python scripting as one of Kickstarter Stretchgoals we could implement next to vectors and text, it won the backer vote by a landslide. Some people even only picked python and nothing else. So what exactly is python scripting? What is Python Scripting? ------------------------- Python is a scripting language, that can be used to automate tasks. What python scripting in Krita means is that we added an API to krita, which is a bit of programming that allows python to access to parts of Krita. With this we can make dockers, perform menial tasks on a lot of different files and even write our own exporters. People who work with computer graphics, like VFX and video game artists use python a lot to make things like sprite sheets, automate parts of export and more. It is outside the scope of this manual to teach you python itself. However, as python is an extremely popular programming language and great for beginners, there's tons of learning material around that can be quickly found with a simple 'learn python' internet search. This manual will instead focus on how to use python to automate and extend Krita. For that we'll first start with the basics: How to run Python commands in the scripter. How to Enable the Scripter Plugin ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The scripter plugin is not necessary to use python, but it is very useful for testing and playing around with python. It is a python console, written in python, which can be used to write small scripts and execute them on the fly. To open the scripter, navigate to :menuselection:`Tools --> Scripts --> Scripter`. If you don't see it listed, go to :menuselection:`Settings --> Configure Krita --> Python Plugin Manager` and toggle "Scripter" in the list to enable it. If you don't see the scripter plugin, make sure you are using an up-to-date version of Krita. The scripter will pop up with a text editor window on top and an output window below. Input the following in the text area: .. code:: python print("hello world") Press the big play button or press Ctrl+R to run the script. Then, below, in the output area the following should show up:: ==== Warning: Script not saved! ==== hello world Now we have a console that can run functions like print() from the Python environment - but how do we use it to manage Krita? Running basic Krita commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To allow Python to communicate with Krita, we will use the Krita module. At the top of every script, we will write: ``from krita import *`` This allows us to talk to Krita through ``Krita.instance()``. Let's try to double our coding abilities with Python. .. code:: python from krita import * Krita.instance().action('python_scripter').trigger() You should see a second scripter window open. Pretty neat! Here is a slightly more advanced example. .. code:: python from krita import * d = Krita.instance().createDocument(512, 512, "Python test document", "RGBA", "U8", "", 120.0) Krita.instance().activeWindow().addView(d) This will open up a new document. Clearly Python gives you quite a lot of control to automate Krita. Over time we expect the community to write all kinds of scripts that you can use simply by pasting them in the scripter. -But what if you want to write new commands for yourself? The best place to start is very simple: search for examples written by other people! You can save a lot of time if someone else has written code that you can base your work on. It's also worth looking through the python plugins, which are located in /share/krita/pykrita. Ther's also a step by step guide for :ref:`krita_python_plugin_howto` here in the manual. +But what if you want to write new commands for yourself? The best place to start is very simple: search for examples written by other people! You can save a lot of time if someone else has written code that you can base your work on. It's also worth looking through the python plugins, which are located in /share/krita/pykrita. There's also a step by step guide for :ref:`krita_python_plugin_howto` here in the manual. But it's likely that you need more information. For that, we will need see what's hidden behind the asterisk when you ``import * from Krita``. To learn what Krita functions that are available and how to use them, you will want to go for Krita API reference documentation. Krita's API ~~~~~~~~~~~ - `LibKis API Overview `_ - `Krita class documentation `_ Those pages may look like a lot of jargon at first. This is because Krita's API documentation comes from the underlying C++ language that Krita is written in. The magic happens because of a Python tool called SIP, which makes it possible for python speak in C++ and talk to Krita. The end result is that when we ``import krita`` and call functions, we're actually using the C++ methods listed in that documentation. Let's see how this stuff works in more detail. Let's take a look at the second link, the `Krita class reference `_. There we can see all the functions available to the Krita instance. If you type dir(Krita.instance()) in Python, it should match this page very closely - you can view the documentation of the functions createDocument(), activeWindow(), and action() which we used above. One of the more confusing things is seeing all the C++ classes that Krita uses, including the Qt classes that start with Q. But here is the beauty fo SIP: it tries to make the translation from these classes into Python as simple and straightforward as possible. For example, you can see that the function filters() returns a QStringList. However, SIP converts those QStringLists into regular python list of strings! .. code:: python from krita import * print(Krita.instance().filters()) Outputs as :: ['asc-cdl', 'autocontrast', 'blur', 'burn', 'colorbalance', 'colortoalpha', 'colortransfer', 'desaturate', 'dodge', 'edge detection', 'emboss', 'emboss all directions', 'emboss horizontal and vertical', 'emboss horizontal only', 'emboss laplascian', 'emboss vertical only', 'gaussian blur', 'gaussiannoisereducer', 'gradientmap', 'halftone', 'height to normal', 'hsvadjustment', 'indexcolors', 'invert', 'lens blur', 'levels', 'maximize', 'mean removal', 'minimize', 'motion blur', 'noise', 'normalize', 'oilpaint', 'perchannel', 'phongbumpmap', 'pixelize', 'posterize', 'raindrops', 'randompick', 'roundcorners', 'sharpen', 'smalltiles', 'threshold', 'unsharp', 'wave', 'waveletnoisereducer'] However, sometimes the conversion doesn't go quite as smoothly. .. code:: python from krita import * print(Krita.instance().documents()) gives something like this:: [, , ] It is a list of something, sure, but how to use it? If we go back to the Krita apidocs page and look at the function, documents() we'll see there's actually a clickable link on the 'Document' class. `If you follow that link `_, you'll see that the document has a function called name() which returns the name of the document, and functions width() and height() which return the dimensions. So if we wanted to generate an info report about the documents in Krita, we could write a script like this: .. code:: python from krita import * for doc in Krita.instance().documents(): print(doc.name()) print(" "+str(doc.width())+"x"+str(doc.height())) we get an output like:: ==== Warning: Script not saved! ==== Unnamed 2480x3508 sketch21 3508x2480 Blue morning 1600x900 Hopefully this will give you an idea of how to navigate the API docs now. Krita's API has many more classes, you can get to them by going to the top-left class list, or just clicking their names to get to their API docs. The functions print() or dir() are your friends here as well. This line will print out a list of all the actions in Krita - you could swap in one of these commands instead of 'python_scripter' in the example above. .. code:: python [print([a.objectName(), a.text()]) for a in Krita.instance().actions()] The Python module ``inspect`` was designed for this sort of task. Here's a useful function to print info about a class to the console. .. code:: python import inspect def getInfo(target): [print(item) for item in inspect.getmembers(target) if not item[0].startswith('_')] getInfo(Krita.instance()) Finally, in addition to the LibKis documentation, the Qt documentation, since Krita uses PyQt to expose nearly all of the Qt API to Python. You can build entire windows with buttons and forms this way, using the very same tools that Krita is using! You can read the `Qt documentation `_ and the `PyQt documentation `_ for more info about this, and also definitely study the included plugins as well to see how they work. Technical Details ----------------- .. Which version of python do we use, how to trouble shoot, etc. Python Scripting on Windows ~~~~~~~~~~~~~~~~~~~~~~~~~~~ To get Python scripting working on Windows 7/8/8.1, you will need to install the `Universal C Runtime from Microsoft's website `_. (Windows 10 already comes with it.) Python 2 and 3 ~~~~~~~~~~~~~~ By default Krita is compiled for python 3. However, it is possible to compile it with python 2. To do so, you will need to add the following to the cmake configuration line:: -DENABLE_PYTHON_2=ON diff --git a/user_manual/templates.rst b/user_manual/templates.rst index 4d63e5036..ef2711c40 100644 --- a/user_manual/templates.rst +++ b/user_manual/templates.rst @@ -1,68 +1,68 @@ .. meta:: :description: How to use document templates in Krita. .. metadata-placeholder :authors: - Scott Petrovic - Wolthera van Hövell tot Westerflier - AndreyGolovkin :license: GNU free documentation license 1.3 or later. .. index:: ! Template .. _templates: ========= Templates ========= .. image:: /images/en/Krita_New_File_Template_A.png Templates are just .kra files which are saved in a special location so it can be pulled up by Krita quickly. This is like the :guilabel:`Open Existing Document and Untitled Document` but then with a nicer place in the UI. You can make your own template file from any .kra file, by using :guilabel:`create template from image` in the file menu. This will add your current document as a new template, including all its properties along with the layers and layer contents. We have the following defaults: Comic Templates ~~~~~~~~~~~~~~~ These templates are specifically designed for you to just get started with drawing comics. The comic template relies on a system of vectors and clones of those vector layers which automatically reflect any changes made to the vector layers. In between these two, you can draw your picture, and not fear them drawing over the panel. Use Inherit Alpha to clip the drawing by the panel. European Bande Desinée Template. This one is reminiscent of the system used by for example TinTin or Spirou et Fantasio. These panels focus on wide images, and horizontal cuts. US-style comics Template. This one is reminiscent of old DC and Marvel comics, such as Batman or Captain America. Nine images for quick story progression. Manga Template. This one is based on Japanese comics, and focuses on a thin vertical gutter and a thick horizontal gutter, ensuring that the reader finished the previous row before heading to the next. Waffle Iron Grid - 12 little panels at you disposal. + 12 little panels at your disposal. Design Templates ~~~~~~~~~~~~~~~~ These are templates for design and have various defaults with proper ppi at your disposal: * Cinema 16:10 * Cinema 2.93:1 * Presentation A3-landscape * Presentation A4 portrait. * Screen 4:3 * Web Design DSLR templates ~~~~~~~~~~~~~~ These have some default size for photos * Canon 55D * Canon 5DMK3 * Nikon D3000 * Nikon D5000 * Nikon D7000 Texture Templates. ~~~~~~~~~~~~~~~~~~ These are for making 3D textures, and are between 1024, to 4092.