How to Generate NFT Collections Directly in Illustrator [Download Free Script]

A step-by-step guide to generating an entire NFT collection of any size directly in Adobe Illustrator. How to structure your layers? How to assign rarities? No coding knowledge is required.

In this post, I will walk you through the process of generating an entire NFT collection of any size directly in Adobe Illustrator *.

Some time ago I created a post describing the process of using Illustrator together with Adobe Photoshop * to create large NFT series.  Since then I created a script that simplified the process even further and now NFT collections with their metadata can be easily generated without leaving the software.

The Main Idea

In this post, I will show you my process of creating large NFT collections relatively fast. Everything will be done in Adobe Illustrator. I will start by drawing the first NFT artwork, and distribute it to layers. The next step is all about designing different versions of each element. Some versions will require completely new graphics while others may be just small customizations of the previously created art pieces. When all the options for the different elements are created and structured in the .ai document, it is just a matter of running a script [which is available for free download here]. No coding knowledge is required.

Follow these 9 simple steps to quickly create your NFT collection.

Step 1: Come Up with an Idea

Just like in any other project everything begins with an idea. Chances are that you already come up with something. If not, you can always browse other collections to get some inspiration.

I will be using the “Who is that?” NFT collection I recently created for demonstration purposes. 

Step 2: Structure Your Document

Create Your First Piece

Once you have an idea, it is time to plan the way each artwork will be structured. Create your first collection piece. Now separate it to the elements and place each elements on a separate layer.

It is important that every element that will later become a trait will be placed on a separate layer.

So, if the character in our collection has a shirt, jacket, hair, eyes, glasses, and hat, each of those elements should be placed on a separate layer. 

Name the Layers

Each layer you create should have a descriptive name that will be used as a category name.

In our  “Who is that” example there are 15 main layers: Top Frame, Glasses, Hair and Hat, Nose, Mustache, Mouth, Beard, Eyebrows, Eyes, Eye, Shadow, Jacket, Shirt, Base, Background Abstract, and Background Base.

Step 3: Prepare the Traits

Creating traits simply means creating versions of the different elements. It is up to you whether you want to create each element from scratch or just make color changes to each of the versions.

Eye traits in our example collection look like this:

And this is how the traits for the base layer look like, (just some simple color changes):

Place each traits on its own sub layer. Name each sub layer to match the trait name.

Step 4: Define Static Layers

You might want certain graphics to appear on all the generated images.

To make the script (that you will later run to generate the collection) know that these graphics should not be switched as traits, you need to add * before each static layer names.

Step 5: Decide on Collection Size

Maximum possible collection size is equal to a multiplication of number of different traits.

Traits of Layer 1 * Traits of Layer 2 * Traits of Layer3 * .......* Traits of Layer N = Max Collection Size

If you want certain traits to be rare and appear only in a small portion of your collection, then the maximum calculated size becomes even smaller.

It is good practice to generate collections that are much smaller than the actual maximum possible calculated size. 

Few examples from the popular collections:

Bored Ape Yacht Club

The collection is built with 7 layers with a different number of traits each.

Total Number of Items

Max possible collection size for it is:

8*19*37*44*23*33*7= 1,314,733,728

So the actual collection size is only ~0.00076% of the possible collection size.

World of Women

The collection is built with 11 layers with a different number of traits each.

Total Number of Items

Max possible collection size for it is:

11*14*28*26*27*18*9*7*24*16*14= 18,453,900,681,216

So the actual collection size is much less than even 1% of the possible collection size.

You can analyze other popular collections the same way using rarity tools website.

The bottom line of this analysis is that the more traits and layers your collection will have the more visually interesting it will become. 

So, if you want to create a 10K NFT collection, the minimal trait-layer distribution would be 4 layers with 10 traits each. But to actually be interesting and surprising, the collection must have much more layers and traits in it.

Step 6: Assign Rarities

To make certain images more valuable than others you might want to make them more unique. That can be achieved by assigning rarity scores to the different traits of the collection.

You might want an army hat to appear only in 1% percent of your collection. For the collection of 10K that would only be in 100 images. So those 100 images would be rarer than others. Since the generated image is a combination of traits, the self-rarity of each image is actually a multiplication of the trait rarities appearing in that image.

How to Assign Rarities?

We can assign rarities to the collection we are generating in Adobe Illustrator. We can do that by adding a suffix of % and afterward a number at the end of each trait sub-layer name. Make sure that you assign the suffix to the actual layer name (not the group or path item name).

What Numbers to Assign after the %?

The whole point of assigning rarity suffixes to the layers is to provide information about the appearance percentage of each trait in the collection. So, if we want the army hat to appear only in 1% percent, we will add %1 to its trait layer name. 

If the other traits should be distributed evenly, we can leave their name without the % suffix. The code will assign equal percentages to them on its own.

How Rarities Would be Calculated?

The code will calculate the amount of generated images including each trait based on the calculated rarity percentage. The assumption is that the sum of the rarities of each trait for every layer is 100%. But, if you enter suffixes that sum up to a larger number, the code will calculate rarities based on the input.

It is important to note that the script is built in a way that it allows at least 1 image to be generated using each trait. So, if you assign rarity scores to a collection of small size, it might not be taken into account. For example, if you generate a collection of only 30 pieces and that same collection has 50 traits for the yes. So, even if you assign rarity score of 90 to one of the eye sets, since each eye set can appear at least once, this rarity rule will not be taken into account.

Step 7: Download the Script

It is time to generate your collection. To do that you don’t need any scripting knowledge. All you need is to download and run the script below. The script is provided for free. Please show us your support by sharing or liking this post and our channel.

Step 8: Run the Script

Unzip the folder you just downloaded. And save the folder with the scripts in the desired location on your computer. 

Running a script in Adobe Illustrator is a matter of 3 mouse clicks.  Go to File — > Script –> Other Scripts.  Then navigate to the folder you just saved and select the “NFT_Series-from_ILLUSTRATOR.js” file.

how to run any script in adobe illustrator

You will now see the below window asking you to enter a collection size. 

Here you will also have the check box for “Include Rarities”. If you do not need any rare images in your collection, then you can just turn off rarities and by that slightly increase the generation speed.

When you click Next, you will see another window asking you to enter a collection name and a description. The information you enter in those fields will be used to generate metadata for each of the individual art pieces.

Click Next once you finished entering the name and the description. You will now be asked to navigate to a folder where you would like to save your collection.

You can now click Generate and the Auto Generation Process will begin. You can open the folder you selected for saving your collection and see the new images and new, JSON metadata files appear there.

Alert Messages You Might Get Before the Generation Starts:

If you enter a collection size that is larger than the maximum possible collection size, you will get an error message that looks like this:

Clicking Try Again will open up a new window with an option to enter the collection size again.

You might also get a white alert message, stating that your collection size is not optimal based on the rarities provided. This window will also show you what is the optimal size based on the assigned rarities. You can close it and ignore the suggestion. Or close script windows, update rarities, or just enter a new collection size.

Meta Data:

Together with each generated image, a .json file containing metadata will be generated. It will include the collection name, collection description, image path, image index during generation, and also all the layer and trait names, and individual trait rarity.

					{"name":"collection wonderful","description":"Description for the wonderful collection","imagePath":"~/collection Item.png","generatedNum":1,"attributes":[{"layerName":"eyes","traitName":"blue eyes ","traitRarity":"0.250"},{"layerName":"hair","traitName":"hair rockstar","traitRarity":"0.128"},{"layerName":"bases","traitName":"yellow","traitRarity":"0.129"},{"layerName":"BG","traitName":"clouds","traitRarity":"1.000"}]}

This information can be later used when you upload the images to NFT marketplaces.

Generated Images:

The script generates images in .png format. The size of the generated images will be according to the size of the rendered elements. If you want all the generated images to be of the same size, it is best to create a static background layer (it may be just a white square), that will cover the area of all the traits.

Step 9: Wait for the Collection to be Generated

If you are creating a collection of a large size, this process may take some time. Be aware that you will not be able to use Adobe Illustrator during the generation process. 

When the generation process is completed, you will get a Congratulations Alert Message. 

Now What?

Now your collection is ready. You can now deliver it to a client or upload it to the NFT marketplace.

Notify of
Inline Feedbacks
View all comments
What the * means above

Please note, that the links that have * next to them are affiliate links and those help support website. If you decide to purchase something through those links, we will get a small commission that will help us to continue and provide new free content on this website.

For you, going through those links is the same as clicking on a direct link. You will never pay more for products as a result of clicking on our links. If anything, that can actually help you get a better price since we can sometimes negotiate better deals for our readers.

The content on our website is not affected by the affiliate products and always reflects our honest opinion. All the reviews you will find on are unbiased reviews. If a product we recommend does not have a supporting affiliate program, we will still link to it, just with a standard link without the *.

Share via