NFT Layer Randomizer p5.js v7

Now with asset names, rarity weights, NFT Trait Mode, and metadata export.

Controls Idle

×
Base width:
Pick exactly one asset per enabled layer (uses weights).
Seed 0 = fully random every run
Seconds (0 = off)
No images loaded. Add assets to at least one enabled layer to render.

Canvas Tip: press S to save

100%
Preview scale only affects what you see; exports are full resolution.

Metadata & Rarity

Generate something to see traits and rarity.

How rarity works here

  1. Each layer acts like a trait type (e.g., Background, Character, Accessory).
  2. Every asset in the layer has a Name and a Weight (defaults to 1). Higher weight → more common.
  3. In NFT Trait Mode, exactly one asset is drawn per enabled layer, selected using the weights.
  4. Per-trait probability = weight / (sum of weights in that layer).
  5. Edition probability (simplified) = product of the selected per-trait probabilities.
  6. Rarity score shown as -log10(probability) (higher = rarer). You can also compute 1/probability if you prefer “1 in X”.

Exports: JSON includes a standard attributes array (trait_type/value) suitable for ERC-721/1155 metadata, plus a rarity block with details. CSV aggregates your generation history.