---
# System prepended metadata

title: Wet Paint NFT Image Generation

---

# Wet Paint NFT Image Generation
[@hellowetpaint](https://twitter.com/hellowetpaint)

## Glossary
### Image
An image is a square PNG file made from a combination of layers that meets a designated criteria and is deemed mintable. Images are created by the Wet Paint generation script and are hosted on decentralized networks as well as the Wet Paint servers. Criteria for a valid image can be set based on what layers are allowed to exist together. Adding such criteria can arbitrarily affect the rarity of images so this ability should be used with caution.
### Layer
A layer is a square PNG file that is unique, can be semi-opaque, and gets combined with other layers to create a mintable image. Each layer acts as a container for a single trait with a single texture, and has a height and appearance that determines where and how often it appears in an image. Layer files are named based on their height, trait, texture, and appearance in the format `height_trait_texture_appearance`.
### Height
The layer height determines how the layer overlaps with other layers. The layers in an image with a larger height number are closer to the foreground than the layers with smaller height numbers. The lowest height, 0, is for a layer that sits behind every other layer in the image.
### Trait
A trait is a visual aspect of a generative artwork that may or may not be present in a given image. Each trait is unique in form and manifests in a layer with a distinct texture.
### Texture
A texture is the pattern, color, or gradient applied to a trait.
### Appearance
The layer appearance is the number of times out of 1000 that the layer can appear in an image.

## Example: The Paintbrush Collection
Below is an example of the assets used for NFTs created with Wet Paint. We'll call this example project the "Paintbrush" collection. In this collection there are 5 traits positioned in 5 columns: background, paint, stripe, paintbrush, and hole. The number of items in the columns represent the number of textures possible for the given trait.

At the top of each trait column is the trait rarity that determines the probability of the trait being in a given image. Each texture has an equal probability of being used for a trait in an image.

The leftmost column shows possible images that can be created from the layers. Each image is unique and is given a unique name based on the hash of the names of the layers present in the image.

![](https://i.imgur.com/G0u8qRj.png)

![](https://i.imgur.com/TCcRg5I.png)



### Rarity
**Trait rarity** represents the probability of a trait appearing in an image. A trait with a rarity of 100% appears in every image. If a trait has a 25% rarity, there is a 1 in 4 chance that a given image will have the trait.

**Image rarity** is based on the presence or absence of traits in the image layers. In the Paintbrush collection, `image_A` may be considered rare (11.25%) because it has the most possible traits and `image_B` may be considered rare (3.75%) because it has the fewest possible traits.

In the Wet Paint system, rarity is represented as a percentage, however there is no concrete measure used to determine what is considered "rare". Some projects may decide that only NFTs with a rarity below 1% may be deemed "rare".

### Constraints and Side Effects
We may decide to introduce a constraint. For example, in the Paintbrush collection `4_hole_4` may not appear in the same image as `0_background_2`. Given the textures used, an image with these layers (the crossed out `image_E`) would appear to be the same as an image with this background layer and the absence of hole trait. While such an image would not technically change rarity, to anyone viewing all the NFT images it would affect perceived rarity. However, introducing constraints affects technical rarity as well. For this reason we recommend not using constraints and instead choosing textures and traits that will not produce rarity side effects.

[@hellowetpaint](https://twitter.com/hellowetpaint)
