- Git
- Node Version Manager (nvm) for Mac/Linux
- nvm-windows for Windows
git clone https://github.com/0xteksage/revamped-art-engine.git
cd revamped-art-engine- Download and install nvm-windows.
- Open Command Prompt and run:
nvm install 20 nvm use 20 node -v # Should show v20.x.x
- Install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash - Restart your terminal, then run:
nvm install 20 nvm use 20 node -v # Should show v20.x.x
npm installPlace all your art layers in the layers/ directory. Each layer should be in its own subfolder with numbered files (e.g., Background/1.png, Character/1.png, etc.).
Example structure:
layers/
├── Background/
│ ├── 1.png
│ ├── 2.png
│ └── 3.png
├── Character/
│ ├── 1.png
│ ├── 2.png
│ └── 3.png
└── Accessory/
├── 1.png
├── 2.png
└── 3.png
Before generating art, you must flatten your layer structure:
npm run flattenerWhat does the flattener do? The flattener reorganizes and optimizes your layer files for the art generation process. It:
- Processes all images in the
layers/directory - Normalizes file naming conventions
- Prepares the layer hierarchy for efficient generation
- Creates the proper metadata structure for each layer
Before running the art engine, configure the settings for your target blockchain:
- EVM Chains (Ethereum, Polygon, etc.): Edit
src/config.js - Sei Chain: Edit
src/seiConfig.js - Solana Chain: Edit
src/solConfig.js
Update the configuration file with your desired settings such as:
- Collection size
- Image dimensions
- Layer weights and rarities
- Output directory
- Metadata format
To generate art for EVM-compatible chains (like Ethereum, Polygon, etc.), use:
npm run generate- AR Format:
npm run seiBuild:ar
- NS Format:
npm run seiBuild:ns
- AR Format:
npm run solBuild:ar
- NS Format:
npm run solBuild:ns
The art engine provides several utility functions to help manage your NFT collection:
Generate a rarity table for your collection:
npm run rarityApply pixelation effects to your generated art:
npm run pixelateReset your generated collection (removes all generated images and metadata):
npm run resetGenerate a preview image showing multiple NFTs from your collection:
npm run previewGenerate an animated GIF preview of your collection:
npm run preview:gifUpdate existing metadata files:
npm run meta:updateGenerate metadata files for your collection:
npm run meta:generateReset all metadata files:
npm run meta:resetRun the complete thirdweb preparation process:
npm run thirdwebPrepare your collection for thirdweb deployment:
npm run thirdweb:prepareUpload your collection to thirdweb:
npm run thirdweb:uploadCreate batch upload for thirdweb:
npm run thirdweb:createbatch- If you encounter errors with the
canvaspackage, make sure you are using Node.js v20 LTS. - On Windows, you may need to install additional build tools:
npm install --global windows-build-tools
- Always run
npm run flattenerbefore generating art if you've updated your layers. - Reminder: If you want to update your layers, remove all existing layers from the
layers/directory before adding new or updated ones and runningnpm run flatteneragain. - Make sure to configure the appropriate config file in the
src/directory before running the art engine. - For more help, see the canvas installation guide
Special thanks to Waren Gonzaga for providing the NFT Dummy Assets used for testing and development purposes.