NFT layer generation

The image combinations for the AllianceDAO NFTs were layered using the open-source Hashlips Art Engine.

Each AllianceDAO NFT consists of 5 image layers:

  1. Background: 20 options (10 planets, 2 backgrounds per planet, North and South).
  2. Object: 40 options.
  3. Inhabitant: 20 options (2 from each planet).
  4. Light: 1 overlay for each planet.
  5. Weather: A few different options for each planet.

Each of these layers are fed into the generator, and the program randomly selects one option per layer, generating a composite image. Each combination of layers has a unique DNA sequence. After generation, the program stores the image along with a list of its attributes and DNA string in a JSON file, referred to as the image's metadata. As the program generates random combinations, it checks the DNA of the previously created images. If a new image has the same attributes or DNA sequence as an already generated image, it is discarded, and the program continues until it finds a combination that is unique.

For the AllianceDAO NFT mint, the program generated 10,000 unique NFT images.

The following is an example of an NFT image and its metadata.

5244.png

{
    "name": "AllianceDAO NFT #5244",
    "description": "An interplanetary odyssey of survival, mystery, and alliances.",
    "image": "ipfs://bafybeidhlcezl3rpkpm6x2nysdgufnekylmiiroiiabhndg7ckcje42eoi/5244.png",
    "dna": "be49dc295a8f00c5aeae03f3c767b051b73d33a8",
    "terraAddress": "terra1/////////////////////",
    "id": 5244,
    "date": 1701939398625,
    "attributes": [{"trait_type":"Planet","value":"Kita North"},{"trait_type":"Object","value":"Battle Shovel"},{"trait_type":"Rarity","value":2},{"trait_type":"Inhabitant","value":"Minasan F"},{"trait_type":"Light","value":"Ice reflection"},{"trait_type":"Weather","value":"Light snow"}]
  },

Rarity

Although the generator chooses layer options randomly, you can set certain options to have a higher probability of being chosen. This process is what determines the rarity of certain layer options. Most layers in the AllianceDAO NFT have an equal chance of being chosen. For example, each of the planet layer options has the same rarity probability, meaning that each background has a 1 in 20 chance of being chosen. Inhabitant options were also assigned with the same rarity, ensuring an equal distribution of characters throughout the 10k NFTs minted.

The object layer is the layer where rarity factors in. Each of the 40 objects was assigned a different rarity weight, ranging from 1 to 40. Imagine the program as a game-show wheel, where an object with a rarity weight of 1 appears once, 2 appears twice, 3 appears three times, and so on, all the way to 40. In total, the wheel would have 820 sections (the sum of integers 1 through 40). The program spins the wheel to choose an option for an NFT's object layer. The probability of choosing the rarest object is 1 in 820. The probability of choosing the most common object is 40 in 820. However, in the case of the Alliance NFT, rarity weights and rarity scores are inverses of each other, meaning that a score of 1 is the most common, and a score of 40 is the least common. This scoring convention matches the industry standard of rarity scoring, wherein a higher score means a rarer NFT.