Intuitive multi-platform NFT art generator
- Make sure you have python3 (https://www.python.org/downloads/)
- Clone the repository
git clone https://github.com/2dathroat/nft-generator.git
- Install the dependencies
pip3 install -r requirements.txt
- Generate JSON input using https://2dathroat.github.io/rarity-calculator/
- Make sure your directories are lined up accordingly, see below example. The script assumes path construct of
character/trait/variant.png
andcharacter/character.png
- Run
./nft.py --config <json_config>
Resulting tokens (compiled to gif):
- Example directory tree is as follow:
-
Example config file can be found under
example/config.json
I have 2 characters:blueEmoji
andyellowEmoji
. Each one has the same number of traits and variants, they differ by the underlying.png
files. -
Running
./nft.py --base_path example --config config.json
5 tokens generated for character: blueEmoji
5 tokens generated for character: yellowEmoji
2 variants generated for trait: eyes
variant: smile occurrences: 5 rarity: 50.00%
variant: sad occurrences: 5 rarity: 50.00%
2 variants generated for trait: mouth
variant: black occurrences: 4 rarity: 40.00%
variant: white occurrences: 6 rarity: 60.00%
- Tokens are generated to
character/output
directory. See output of tokens in the new tree structure