# Creating Generative Art

## What is Generative Art?

Generative art, as defined by [Datash ](https://en.datash.io/)in their [article](https://medium.com/@datash/an-introduction-to-generative-art-nfts-35e650a0f281), is artwork that has "gone through a generation process by a system" [that is set into motion with some degree of autonomy contributing to or resulting in a completed work of art](http://www.philipgalanter.com/downloads/ga2003_paper.pdf).

In layman terms, it means art that has been created by an artist, but combined by a machine or system. NFTs have become popular mediums for generative art as generative art can now be created and owned via smart contracts.

## How Generative NFTs are Created

Generative NFT artworks are created by layering PNG images on top of one another. This is commonly done with a solid-colored background, followed by multiple layers with a transparent background that represents each trait of the NFT&#x20;

![A sample generative art with 4 traits: Background Color, Face Color, Eyes, and Mouth](https://3740484278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXXwlBaZtlgg3vhmOAsO8%2Fuploads%2Fff3GhRGeRNxlfQDS1E9K%2FGenerative%20Art%20Sample.jpg?alt=media\&token=22ec42fd-5811-40b5-b293-ff8fd84a168c)

Moving from left to right, if you layer each image on top of each other, you will generate the 5th image. Notice that:

1. Each image has the same size
2. All other traits except the background have a transparent background
3. The images must be layered in the correct order
4. The position of each layer is drawn so that they combine into a sensible image
5. You can change any trait to another of the same category as seen in the image below:

![The Face Color and Mouth traits have been changed, creating a new generative image](https://3740484278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXXwlBaZtlgg3vhmOAsO8%2Fuploads%2FHuHnYs5bSNiLhtoP3Pgd%2FGen%20Art%20Sample%202.jpg?alt=media\&token=266d9d17-c70f-47b4-b11a-58fd327421d5)

To calculate how many variations of a trait you will need, use the following formula:

![](https://3740484278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXXwlBaZtlgg3vhmOAsO8%2Fuploads%2FcVk3zLpKPmCNRJ0eDj1w%2FVariation%20Formula.png?alt=media\&token=82f3e64e-35ce-4136-ad5b-27038eeeb918)

Using the above example with 4 traits, If you wanted to generate **10,000&#x20;*****unique*****&#x20;NFTs** (No two NFT would look alike), you would need 10 variations of each trait. the calculations are as follows:

![](https://3740484278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXXwlBaZtlgg3vhmOAsO8%2Fuploads%2FUeQMHy5V3oFpSX8BgQJE%2FVariations%20Calculations.png?alt=media\&token=189b8661-e3ff-4fb1-822a-e757184d9c23)

Our example project, the Ejomis, contain 4 traits: Background Color, Face Color, Eyes, Mouth

![](https://3740484278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXXwlBaZtlgg3vhmOAsO8%2Fuploads%2FTUSX0G9xfyXlgktQb1eY%2FThe%20Ejomis%20Traits.png?alt=media\&token=f6bc8e18-34eb-49a5-9f0e-55841b6ec02a)

Each Trait contains 5 *V*ariations:

![](https://3740484278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXXwlBaZtlgg3vhmOAsO8%2Fuploads%2FWhwz2KrLxwh9BxaCiEkm%2FThe%20Ejomis%20Variations.png?alt=media\&token=f05a9479-f126-462d-a496-2c080cdebf2e)

You can calculate the number of *unique* generative NFTs you can produce using the following formula

![](https://3740484278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXXwlBaZtlgg3vhmOAsO8%2Fuploads%2FxvsC9nTi8J8XCkWeR94b%2FUnique%20NFT%20numbers.png?alt=media\&token=9e92a7ab-7728-4f4f-aa2b-ff03119d0da9)

Based on this formula, we know we can produce **625&#x20;*****unique*****&#x20;Ejomis**:

![](https://3740484278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXXwlBaZtlgg3vhmOAsO8%2Fuploads%2FpqfgKnHLAWpoHd4Dz6Px%2FMax%20NFTs.png?alt=media\&token=89e7c2fe-8f00-46fe-8ea2-d42e8af089e7)
