NFT Generation for Dummies
Now that we've created our artwork using free and opensource software (see THIS post), the question is - How do we generate thousands of derivatives of the artwork using opensource software and code?
You will recall that we created a base image and added layered elements to our base image. To generate thousands of generative images we will need
- a code editor,
- a JavaScript runtime environment
- and the actual code itself.
Don't get nervous, all of that was Greek to me too and pretty much still is. The beauty though is I don't need to understand exactly how it works, I simply need to install it and use it as per the Hashlips instruction video.
- We will use Visual Studio Code as our code editor. Go ahead and download it HERE. Install the latest version for your operating system (My operating system is Linux, but there are Visual Studio Code version for Windows and iOS too).
- We will use Node.js as our JavaScript runtime environment. Important Note: You need to install version 14.18.2, not necessarily the latest version. Being new to Linux, figuring out how to install and run Node.js was challenging. I played around with the Command Terminal and also tried installing it from the Snapcraft store. I managed to get it installed somehow, but unfortunately it was an older version. Once installed though I managed to get version 14.18.2 installed too. The issue I have now though is every time I start up Visual Code, it runs the older Node.js version (and I don't know how to delete it) It isn't a major issue though, I simply work around it by switching to version 14.18.2 every time I start Visual Studio Code. The video tutorial linked to above does explain how to check which version you are running. So if you can, make sure that you install the correct version from the start, and if you are a techno-pleb like me and didn't (and also can't delete the old version), make sure to switch to the correct version in Visual Studio Code and save the changes before you start running the code. You can find the download links for Node.js from their website HERE, and on the Snapcraft Store HERE.
- Now for the code. I am grateful to Hashlips for making the necessary code available for free on GitHub. Download the code HERE.
Now you simply need to follow along on the YouTube Tutorial on how to run the code on Visual Studio Code.
In the tutorial it is explained how to:
- change the code to generate thousands of generative images (NFTs)
- include metadata for your NFTs (the json files)
- include a royalty fee to the original artist in secondary sales of your NFTs
All that is done by very simple changes to the code.
A few tips from my own experience when generating a collection on Visual Studio Code (VSC):
- Always ensure that you are using the correct version of Node.js
- Always save any changes made to the the code in VSC before running any commands in VSC (I've made this rookie mistake a number of times, running the generate command only to realise I haven't saved the changes first, then having to do it all over again)
- Keep in mind that every time you run the generate command, the images generated in the build folder will be deleted and replaced with the new images that you have generated
Now go generate your own collection and stay tuned for the next post where we'll discuss pinning (and a handy pinning service I have discovered that is not covered in the tutorial videos)