Manual Image Conversion === If **Krita Runner** is enabled in the [User Preferences], you can convert between most image formats directly from Unity. This is very useful to quickly make [Krita] files for editing, or to convert formats unsupported by Unity (that Krita can open) to a format like PNG or EXR for importation. Even when Krita Runner is not enabled, you can always extract a PNG from KRA/ORA files, which is very fast. Quick Conversion --- Simply right-click assets and go to **Convert Image** > **To _(format)_ image here** to quickly generate images next to them on the same folder. You can pick one of these formats: **Krita** (.kra), **EXR**, **OpenRaster** (.ora) or **PNG**. > 🔒 In the [free demo], you can only convert KRA/ORA files to PNG because Krita Runner is unavailable. You can [upgrade] to unlock all features. ![Example of quickly converting an AVIF file to PNG in Unity's Project window](img/ManualConverter-quick.src.webp) Advanced Image Converter Tool --- > 🔒 This feature is not available in the [free demo]. You can [upgrade] to unlock all features. You can also use a tool to make advanced batch conversions with full flexibility. Go to the **Assets** menu > **Convert Image** > **Advanced Image Converter...** to show the utility. The fields in the window are explained below. When done, click **Convert** to make Krita convert the images (make sure Krita is not open). You can also click **Simulate** first to see which files would be converted. ![Example of batch converting images by glob patters in Unity using the advanced image converter tool](img/ManualConverter-window-formats.src.webp) ### Generate At This field is very similar to [the Generate At field in the importer]. Parameters (e.g. ``) are used to specify the path pattern generically for each file matched by the **Sources** field. The default pattern generates the file on the same folder as the source image, changing just the extension suffix. Simply hover the mouse on **Generate At** for a tooltip explanation of each parameter. For example, if you want to change just `` (the top folder under Assets which contains the image) to "Textures", you could use this: `/Textures//.` ### Format This is the desired format for the target files that will be made. The extension you select here (or in the **Extension** field if you pick **Custom...**) will replace `` in the pattern of the previous field. You can use any image format that Krita supports for exporting. The first ones shown are also supported in Unity. Tags can help you decide based on the `[Purpose]` and `Disadvantages!` of the format: - `Opaque!` - *No transparency*. It means the format is inappropriate when you need to store a full opacity (alpha) channel. - `SDR!` - *Standard Dynamic Range*. It means the format doesn't support HDR, so the color channels are limited to 0.0 ~ 1.0 range. - `Lossy!` - *Compression with data loss*. It means the format doesn't support a lossless conversion, so the image quality will likely decrease in some amount. - `8bpc!` - *Max 8 bits per channel*. It means the format can't be used when you need deeper colors (e.g., PNG supports up to 16bpc). - `256-colors!` - *Max 256 colors*. It means the format uses only 8 bits per pixel, so images are very limited in quality. - `2-colors!` - *Black and white only*. It means pixels can only be black or white. - `Royalties!` - *May have royalties*. It means this format can be encumbered by patents which could make certain usages be subject to payment of royalties. - `Proprietary!` - *Not an open format*. It means the format is encumbered, making it risky (difficult to avoid compatibility issues) when using it with any other software not controlled by the original maker. In contrast, an open format is published with an open specification and no such restrictions from any patents, licenses or trade secrets, so that it's easier for anyone to make compatible software without requiring reverse-engineering or running into legal issues. - `Contextless!!` - *No metadata at all*. It means the file contents are "raw", not containing even the minimum metadata needed to interpret the image (i.e., dimensions and endianness). You should only use this format internally (where these are already assumed to be as expected), or you need to at least store these somewhere like in the file name (e.g.: `my-image-file.256x256.LE.r16`). ### Sources Each line in this field is a path to a source image to be converted. Paths are relative to the project's root folder. ![The advanced batch image converter tool window, showing buttons to add source image paths](img/ManualConverter-window-buttons.src.webp) Add one or more image paths to the list manually, or pick by browsing or from the selection, by clicking the buttons. You can pick any image file that Krita can open. You can also use glob wildcards `?`, `*` and `**`. Picking a folder will add a glob pattern ending in `/**`, to recursively include all files and sub-paths under it. A glob without a specific extension will only match supported files (that Krita can open) whose extensions are different from the target format selected in the previous field. --- ## [Home](./Home.md) [User Preferences]: ./KRasterSettings.md [the Generate At field in the importer]: ./KRasterImporter.md#markdown-header-generate-file [Krita]: https://krita.org/ [free demo]: https://assetstore.unity.com/packages/slug/338348 [upgrade]: https://assetstore.unity.com/packages/slug/227895