First Ledger NFT
CreateChecking whether you are signed in

Generating a collection from layers

The collection generator makes a whole collection from layers: folders of transparent images, one for each part of the picture. You say how rare each trait is and what may not appear together, and it makes every token different. It runs in your browser and needs no account to try. This guide walks through it with our sample pack.

What it does

A collection made from layers is built like a stack of transparent sheets: a background at the bottom, a body over it, then eyes, a hat and so on. Each layer holds a few versions, called traits, and every token takes one trait from each layer, or nothing from a layer that can be empty.

The generator chooses the traits of every token at once, so each token is different from every other, the rarities come out the way you set them, and every rule you write is kept. The same settings and seed make the same collection on any device.

It all happens in your browser. Nothing is uploaded until you keep the work as a draft of a drop, and then only to that drop.

Each token’s exact image, shown when you open it, is made by the same code that renders it on our servers, so it is the image that is minted, byte for byte.

Generating costs nothing. Rendering and pinning a drop’s tokens are part of its launch fee.

Try it with the sample pack

Open the collection generator. On an empty workspace it offers our sample pack: press Try the sample. There is nothing to sign up for.

The sample is pixel critters in 6 layers, each image 32 pixels square, with 22 traits in all. Each folder’s name starts with its place in the stack, like 01_Background, and each file’s name ends with its weight, like Sky#30.png: the way many other generators keep both.

Once it is read, the import says what it did: the layers and traits it made, the canvas size it chose, the settings it read from the file names, and the fully transparent files it made into a chance of nothing. Each fix it made can be undone from the report, and the whole import with Undo.

The views’ tabs are the steps, in order: a tick marks a step done, and the line under the tabs names the next one and links its section of this guide. Next steps, in the Help menu, hides that line and the tips, or brings them back. The sections below take the steps in order.

The workspace keeps its explanations out of the way. Each view’s, and the tips for it, are behind the ⓘ beside its heading, and each setting’s behind the ⓘ beside its name. Settings most collections never touch — base types, hidden layers, uniqueness, opacity and position, blends, the order the tokens are written in, sound, static and number attributes — are under More options, which opens by itself while any of them is set. This guide has all of it too.

Step one: add layers

Your own art goes in one folder, with a folder inside it for each layer and an image in each of those for each trait. Choose that folder, drop it on the page, or choose a ZIP of it. A trait can also be a folder of up to 4 images, each drawn at its own depth: the back of a hood under the head and its front over the hair.

Layers are PNG files with transparency. A JPEG has none, so it is refused, and the report names each file it refused and why.

Settings other generators keep in file names are read once and become ordinary settings you can change: a weight after a hash sign, an order before an underscore, a depth before a comma. Renaming a file afterwards changes nothing.

Everything the import fixes is shown and can be undone: images of another size are centred on the canvas, or placed top left or scaled if you choose; a fully transparent file becomes its layer’s chance of nothing; identical files in one layer become one trait; and a file with a colour profile is drawn in standard colour.

Importing again adds to what is there: a folder named like an existing layer adds traits to it, and any other folder becomes a new layer on top.

Step two: check the order

The Layers view lists the layers top of the stack first, so the first in the list is drawn last, over everything else. Drag a layer to move it, or select its name and press Alt with the up or down arrow.

The preview beside the list shows a token as you work. Shuffle draws another that keeps every rule, and choosing a trait under the preview shows it at once. Keep while shuffling holds one layer’s trait still while the rest change.

The preview is drawn by your browser, and can differ from the minted image by a shade at soft edges; the image a token is minted with is made by the launchpad from the same settings.

The sample arrives in order. Try moving Eyewear below Eyes to see the glasses vanish behind the eyes, then undo it.

Selecting a layer shows its traits and settings: its name, which is the attribute type every token writes; whether it can be empty; whether it is written to the metadata at all; and its opacity and position.

Step three: set rarity

The Rarity view is one table for the whole collection: every trait’s weight or count, its share of the tokens, and how many tokens that comes to at the collection’s size.

A weight is a chance: a trait with twice the weight of another turns up about twice as often. An exact count is a number of tokens, which the generator meets exactly. Each layer uses one or the other, and a curve can reshape a layer’s weights by the order of its traits.

In the sample, Crown has a weight of 5 out of 100 in Headwear, so about 5% of the tokens wear one. Switch Headwear to exact counts to decide exactly how many crowns there are.

The collection’s size is at the top of the view, with the most unique tokens the layers and rules allow beside it, and whether these settings can make the collection at all. Signed out, you type the size; in a drop, it is the drop’s supply, set on the Details step.

Download the rarity table (CSV) saves the whole table as a file for a spreadsheet.

Step four: add rules, if anything clashes

Rules say what may appear together, in plain sentences: one trait can never appear with another, always appears with another, or appears only with at least one of a few. A rule can also be about a whole layer, or about a layer being empty.

The sample has one clash worth a rule: the sunglasses cover the eyes, so laser eyes behind them are two beams coming out of a pair of shades. On the Rules view, choose Laser, then can never appear with, then Sunglasses, and add the rule.

Each rule is checked as you write it. The view says at once if a rule contradicts itself, leaves a trait with nothing it may appear with, or makes the size impossible, and by how much.

Below the list, a grid of one layer against another shows every pair and the rules about it. Pressing an empty cell makes that pair never appear together.

Rules are optional: a collection with nothing that clashes needs none.

One-of-a-kind tokens

A one-of-a-kind token is a finished piece with its own name and attributes, placed among the generated tokens: an image, a video, a track or a model, added on the 1/1s view. It counts towards the size, and it can go anywhere or at a number you choose.

A generated token you like can become one too: open it and choose Make it a 1/1.

Step five: generate and review

On Generate and review, press Generate. The whole collection is made in the background, every token different and every count met. Shuffle makes another from a new seed.

If the settings cannot make the collection, nothing is made, and the view says why and what to change: a size larger than the layers and rules allow, or a count the rules leave no room for. It never gives you something other than what you asked for.

Every token is in a grid you can filter by trait, sort by number or by rarity, and jump through by number. Open one to see the exact image that will be minted.

Then curate instead of starting again. Reroll gives a token new traits; Edit traits changes one trait at a time, offering only those that keep every rule and the token unique; Lock keeps it exactly as it is through the next shuffle; and Remove takes it out. Select several tokens to reroll, lock or remove them together.

Above the grid, the issues list names anything to fix, such as a token that breaks a rule written after it was generated, with a link to each token.

Depth: types, blends, variants and numbers

A layer’s traits can be the collection’s base types, such as Ape and Robot: turn on Its traits are the collection’s base types on that layer. Every token is then exactly one type, and each other layer says which types draw it, so a type can have layers, and rarity, of its own.

A layer, or one image of a trait, can blend with what is under it — multiply for shading, screen for a glow — at an opacity of its own. The preview draws the blend as the minted image does.

Make a colour variant makes a trait that draws another trait’s images in other colours, with its own name and rarity and no new art: exact colours swapped, as a palette swap does, and every other colour’s hue turned.

On Rarity, Minimum difference (layers) keeps near-twins out: any two tokens differ in at least that many layers. The generator proves when it cannot be met and says which layer needs more variety.

On Metadata and output, Number attributes give each token a whole number within a range, such as a Power within a range you set, which stays with the token while its traits do.

A drop’s workspace can be copied into a new draft to try something without touching it (Duplicate), and Make a teaser clip records a short video of random tokens for your announcement, in this browser.

Names, metadata and the image

On Metadata and output, a template names every token, and another can describe it. Insert what changes from token to token, such as the number, with the buttons below each field.

Each layer writes one attribute: the layer’s name as its type and the trait as its value. A layer can be left out of the metadata, and an empty one can write that it is empty or nothing at all. Attributes you add yourself are written on every token.

Beside the settings is the metadata document a token would be pinned with, exactly as it will be written, for whichever token you choose.

Every token is a lossless PNG. For pixel art, turn on Pixel art: the sample’s 32-pixel critters can be written 1,024 pixels square, every pixel kept sharp.

Motion and sound

A layer can move. Import a GIF, an animated PNG or a lossless animated WebP as a trait’s image and it keeps every frame and its timing; the preview and the review’s grid play it. A lossy WebP is refused, because its pixels are not exactly the art.

Each moving image shows its frames and how long one loop takes, on its trait. Every frame can be retimed to one length at once, in steps of 10 ms and at least 20 ms: the frames stay the same and the image becomes a new file with the new timing.

A token that draws a moving layer is written as an animation instead of a PNG, as Metadata’s When an NFT moves says: a GIF, which plays everywhere, xrp.cafe included, in at most 256 colours a frame; or a lossless WebP, every colour and soft edge exact, which xrp.cafe shows as a still. GIF is the default. It plays for ever, or a number of times you choose. A token whose layers are all still stays a PNG. These settings appear in Metadata once a layer moves; until then every token is a PNG and there is nothing to choose.

A token that moves is bounded by its frames times its pixels, sized by what one render costs on our servers: at most 16 frames at 2,000 pixels square, 67 at 1,000 and 256 at 512. Metadata’s When an NFT moves says the most at your own output, and the review names a token past it.

Open a moving token in Generate and review for its exact file: the GIF or WebP itself, with its frames, one loop’s length and the hash that names it, made by the code that renders it on our servers.

A token can carry a track beside its picture, for wallets and marketplaces that play one: an MP3, M4A, OGG, WAV or FLAC file, of up to 20 MB. Give a trait a track under Sound on the trait; a token with that trait plays it, and where two of its traits carry one, the higher layer’s plays.

Or give the rarest tokens tracks of their own, on Rarity under Sound by rarity: a tier reaches the rarest share of the collection by rank, and each token whose traits carry no sound takes the first tier that reaches it. A tier with several tracks gives each token one of them, and the token keeps it while its traits stay the same.

Tracks are sent to a drop with the layers and pinned with each token’s metadata, named as its audio. Play any of them in the workspace, and on the Artwork step once the tokens are rendered.

Step six: use it for a drop

Signed out, Keep as draft in the toolbar keeps your work as a draft of a drop, and the panel it opens appears by itself under the views once a collection is generated: give it a name and press Keep it as a draft. Its supply is the collection’s size. You are asked to sign in if you have not, and the wallet you sign in with becomes the drop’s payout account. Your work moves to the draft as it is, and nothing is paid: the launch fee is the step before launch.

A drop’s own generator is the first card on the wizard’s first step, Artwork: Open the generator.

In the draft, Use this collection writes the collection to the drop as its items: each token’s name, description and attributes, and the recipe its image is rendered from. The drop’s supply becomes the collection’s size, its art and traits are done, and the launch wizard carries on at Details.

Nothing is drawn or stored until the launch fee is paid and preparing starts on the Launch step: by itself once the drop is finished, paid for and approved, or sooner with Prepare now. You can close the page while it runs. After that, every NFT that changes is drawn again and counts against an allowance — three whole redraws of the collection, and a little more for changed NFTs — and that step shows what is left.

The sample can go this far, so you can see every step, but no further: a drop drawn from it is not launched.

Where your work is kept

Signed out, everything is kept in this browser: the settings, the collection and every image, with undo and redo for all of it. Nothing is uploaded. A private window keeps nothing after the tab closes, and the workspace says so.

Signed in, a drop’s workspace is saved to the drop as you work, and each image is uploaded to it once, so it opens where you left it on any device. If the drop was changed somewhere else meanwhile, you choose which to keep before anything is saved.

A draft whose launch fee is never paid is not kept for ever: 90 days after its last change it is deleted whole, images, items and settings. The workspace shows the date, warns two weeks before, and any change to the drop moves it. Paying the launch fee keeps it for good.

Limits

A collection can have:

  • up to 10,000 tokens, one-of-a-kind tokens included;
  • up to 40 layers and 1,000 traits, and up to 500 rules;
  • up to 32 attributes on each token, counting every layer written, an empty layer that writes so, and every attribute added to all tokens;
  • layer names of up to 64 characters and trait names of up to 128. A longer one is refused, never cut short, so what you see is what is minted;
  • images of up to 20 MB each and 4,096 pixels on a side, and tokens of up to 4,096 pixels on a side;
  • and, saved to a drop, 1 GB of files in one draft, and 5 GB across all your drafts whose launch fee is not paid, uploaded art included. Paying a drop’s fee takes its files out of that. You can keep up to 10 unpaid drafts at once.

Keyboard shortcuts

Every key the workspace answers to, outside a text field. In the workspace, press ? to see this list there. On a Mac, Command works wherever Ctrl does.

Anywhere in the workspace

?
Show this list
Ctrl+Z
Undo the last change
Ctrl+Shift+ZorCtrl+Y
Redo it

On a layer’s name, in Layers

Alt+↑orAlt+↓
Move the layer up or down the stack

In Generate and review

←or→
Open the NFT before or after
Shift+←orShift+→
Select the NFTs from the open one to the one before or after
R
Reroll the open NFT, or every one selected
L
Lock or unlock it
E
Edit its traits
DeleteorBackspace
Remove it

In the grid of NFTs

↑or↓
Move a row up or down
HomeorEnd
The first or the last NFT
Space
Add the NFT to the selection, or take it out
CtrlorShift
Hold while clicking, to select several NFTs

In the rule matrix

←or→or↑or↓
Move between cells
HomeorEnd
The first or the last cell of the row
EnterorSpace
Make the pair never appear together, or remove that rule

In a name, number or template

Enter
Keep what you typed
Esc
Put back what was there

About the sample pack

We drew the sample with code, for learning the generator, and released it under CC0 1.0: you can copy, change and use the images for anything, even commercially, without asking.

Download the sample as a ZIPRead its licence noteRead the licence itself

One rule is ours and not the licence’s: the launchpad does not launch a drop drawn from the sample as it is. It stops at the Launch step with this problem, and the way on is to put your own art in its place and use the collection again:

This drop's NFTs use the collection generator's sample art, which is there to learn with and cannot be launched. Replace the sample layers with your own in the generator, and use the collection again.

Generating a collection from layers · First Ledger NFT