# QUALITY SETTINGS

## BASIC KNOWLEDGE

One of the most important things to take into account when you export your map is the quality of the final file. \\

### **Things you want to control**

* The **size** of the file (in MB)
* The **resolution** of the image (in Pixels)
* The **compression** quality (visual artifacts)

Each of these aspects will impact the other ones, so you need to understand how they work together.&#x20;

If you're limited to a max size for file uploads on your VTT, you might want have control on that first.\\

### **What affects the file size?**

* The export format (PNG, JPEG, WEBP...)
* The compression quality
* The resolution of the map (or PPI, for Pixel Per Inch)
* The size of the map

### What affects the visual quality of the map?

* The export format (PNG, JPEG, WEBP...)
* The compression quality
* The resolution of the map (or PPI, for Pixel Per Inch)

## **FORMATS**

Dungeondraft offers to export in four different formats: PNG, JPEG, WEBP and Universal VTT.

* **PNG** is a high quality format, **it's the best option for quality prints**. It's not really designed for online use, but support transparency. If you need to print your map, PNG is the best out of the four options.
* **JPEG** is a compressed format, you can set its quality with a slider. It doesn't support transparency. It's a very generic format that can be read by any software. **It's a good choice for online use.**
* **WEBP** is also a compressed format, but it supports transparency. See it as a mix of PNG and JPEG. It's more optimized than **JPEG** and will produce smaller file sizes for the same compression quality, but some softwares can't read it. **It's usually a very good choice for online use.**
* **Universal VTT (or UVTT, or .dd2vtt)** is a special format that embeds a PNG image as well as walls, portals and lights data to import into most Virtual Tabletops (Roll20, FoundryVTT, Fantasy Grounds Unity...). It's useful when you don't want to redraw all your walls and place your portals and lights manually in your VTT. Due to embedding a PNG, the file size will be large, but some VTTs automatically convert it in WEBP to make it smaller.

{% hint style="success" %}
**Summary**

* **PNG =** Best quality, supports transparency, big file size, good for printing
* **JPEG =** Small file, lower quality, no transparency, good for online use
* **WEBP =** Smart and small, supports both transparency and quality, good for online use but not always supported
* **UVTT** = Only for Virtual Tabletops, embeds some data, big file size
  {% endhint %}

<figure><img src="https://717747526-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FonbNaZHYfX7cze8ubfnQ%2Fuploads%2FaIyxmutXiyVPDk5rkhCX%2Fimage.png?alt=media&#x26;token=f95c4905-da5c-4a4c-952c-621a23eed5ef" alt=""><figcaption><p>The four different export formats</p></figcaption></figure>

## COMPRESSION

As said above, JPEG and WEBP are two **compressed** formats, so you can manually set the compression **quality** with a slider that appears when you choose one of these formats in the dropdown menu.&#x20;

For both, the **best quality** (100%) makes a **larger file size**. The best compromise is to set the quality somewhere from 75% to 90%, so the file size will be **significantly smaller** but there won't be too many **artifacts**.&#x20;

<figure><img src="https://717747526-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FonbNaZHYfX7cze8ubfnQ%2Fuploads%2FlT1r9ZHUUO6sYeBkgbqA%2Fimage.png?alt=media&#x26;token=9713d467-dc32-4f77-b3f6-920a24d3f234" alt=""><figcaption><p>The quality slider for JPEG and WEBP</p></figcaption></figure>

<p align="center"></p>

<p align="center"></p>

<p align="center"><em><strong>Rough file size comparison for a 5000x5000 px map</strong></em></p>

| Compression Quality |  JPEG  |  WEBP  |
| :-----------------: | :----: | :----: |
| 100% (best quality) |  11 MB | 7,6 MB |
|         90%         | 4,4 MB | 2,8 MB |
|         70%         | 2,4 MB | 1,6 MB |
|         50%         | 1,7 MB | 1,2 MB |
|         30%         | 1,3 MB | 0,9 MB |
|         10%         | 0,7 MB | 0,6 MB |
|  0% (worst quality) | 0,3 MB | 0,3 MB |

<p align="center"><strong>Visual comparison between various compression qualities</strong></p>

<figure><img src="https://717747526-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FonbNaZHYfX7cze8ubfnQ%2Fuploads%2FuKn2IpZol98ndCZhjzm9%2Fcompressoin%20copy%202.png?alt=media&#x26;token=d6455d07-6f55-47b7-a44c-ca556aa097bb" alt=""><figcaption><p>Visual artifacts<br>(custom assets: White Fox Works)</p></figcaption></figure>

## MAP SIZE AND RESOLUTION

As you can imagine, a **larger map** will produce a **bigger exported file**, so that might be something you need to consider when you're creating your map.&#x20;

However, you can adjust the **PPI** (Pixels Per Inch) of the exported file. To make it simple, it's the amount of pixels you will have along the side of one grid square.&#x20;

* The default PPI is 256, meaning you won't lose any detail with that setting.&#x20;
* Going above will stretch the map but will just make the image file blurrier when you look at it at 100% zoom (you can't go over 300 PPI). It won't add details or sharpness.
* Reducing the PPI will shrink the map, you will have a smaller resolution and a smaller file size, but you will lose more and more details the smaller you go.&#x20;

Enter the PPI you want to use into the **Grid PPI** box and press enter. You'll see the size output update under it.

<figure><img src="https://717747526-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FonbNaZHYfX7cze8ubfnQ%2Fuploads%2FVYxz6G4KR937UtjhW5c0%2Fimage.png?alt=media&#x26;token=aa954814-2118-4989-aa43-131f152bfeab" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
**Pro Tip:** *if you're playing online, most VTTs won't allow files over 16384 x 16384 px. That number might also depend on the GPU used to display the map online (yours and your players').*
{% endhint %}

You can also choose a defined PPI in the Grid Presets dropdown menu.

<figure><img src="https://717747526-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FonbNaZHYfX7cze8ubfnQ%2Fuploads%2FhDQZUmw4wrgf1bRzI1vm%2Fimage.png?alt=media&#x26;token=4337a385-67a1-4a67-baaa-5375b00e2009" alt=""><figcaption></figcaption></figure>

<p align="center"><strong>Examples of various PPI</strong></p>

<figure><img src="https://717747526-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FonbNaZHYfX7cze8ubfnQ%2Fuploads%2F6E1yK2PLOjb0I0AQTagN%2FQuality%20Comparison%201.png?alt=media&#x26;token=bbb20e3d-415b-4b40-a259-09de055d991d" alt=""><figcaption><p>Image size and file size differences</p></figcaption></figure>

<figure><img src="https://717747526-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FonbNaZHYfX7cze8ubfnQ%2Fuploads%2F6a0UpfA3NWsixsqxhoA3%2FQuality%20Comparison%202.png?alt=media&#x26;token=44062565-fba4-40f5-a0f9-e3616e757fa7" alt=""><figcaption><p>Quality drop with lower PPI (default assets)</p></figcaption></figure>

<figure><img src="https://717747526-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FonbNaZHYfX7cze8ubfnQ%2Fuploads%2FdZ10BHPp9fdrmbg7hkWe%2FQuality%20Comparison%203.png?alt=media&#x26;token=dd86ecc4-2d44-4a42-8ef4-f3129793cada" alt=""><figcaption><p>Quality drop with lower PPI<br>(custom assets: White Fox Works)</p></figcaption></figure>

{% hint style="success" %}
**Pro Tip:** *You can crop a part of your map that you don't want with the* <kbd><mark style="color:blue;">**Crop**<mark style="color:blue;"></kbd> *Button.*\
*You can also reset it to the full map by clicking on* <kbd><mark style="color:blue;">**Reset Crop**<mark style="color:blue;"></kbd>*.*

<p align="center"><img src="https://717747526-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FonbNaZHYfX7cze8ubfnQ%2Fuploads%2FhkistbewOhT5gTvlBOb4%2Fimage.png?alt=media&#x26;token=4368c79c-05f7-40ae-8e49-d20120c33775" alt=""></p>
{% endhint %}
