Create 10000 generative NFTs / Artworks with code part 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey how's it going guys my name is daniel aka hashtabs and welcome back to the channel and today i'm going to show you how to mint and create 10 000 artworks uh with basically minimal effort now if you do not know about this channel a lot of the followers already know i've been creating this art generative program since the beginning of time and today is where we're going to optimize it now i've noticed there's a lot of people 900 stars and 700 stars on these two repos like i said before and i wanted to simplify it for us the main issue with these two repos are that i make videos and other people go and they ask me to update the code and so i did the problem with that is nice readme files came with it and all these cool things but the videos got misaligned with what i was creating now we are going to rectify that so if you are struggling with the art generative program this is a great video to follow along if you also want to see how we're going to do it differently and so much more easier then stick with this video so i've created a new repository and this repository is called hash lips art engine and from now on this is what i'm going to refer this branch to this art generative code is now going to be from now on referred to the hashtags art engine so we are going to take this journey this year of improving this program and i'm going to do it properly so it won't be misaligned in any videos if you ever struggle for instance in today's video we will be working with this release so you notice that there's a tag button over here if you go to getup.com forward slash hashtags forward slash hashlips art engine you can see that there's a tag over there and you can also see this original release in today's video we are going to be focusing on the original release so all you need to do is click on this button over there or you can click on the tag i don't want you to just clone the code from here because the problem with that is it might be misaligned with future videos so just click on this tag over there and then simply go to the version 1.0.0 and go and download the source code over there now i've already done that and you can do this now and then follow along perfect the next thing that you need to do is download nodejs so go to nodejs.org forward slash en for slash downloads and then going down download this t or this lts right the recommended one i'm running mac so i will download it for this one so you can click and it's a simple installation process after doing that a lot of people have asked me what ide am i using so i am using visual studio code you can go and download this video studio code for free visual studio code is a great ide for just you know development in general so it's a good tool to have once you've got visual studio installed and you also have node.js just verify it so you can go and open obviously your visual studio code now that you have it or any ide would work perfectly fine next what you want to do is verify that this works so you can either open any terminal on your machine which is usually this command prompt thing that pops up go and open it and type in node dash dash version right i've got version 14.17 any version above 13 should work so just make sure this comes up if it doesn't then you need to make sure that you reinstall node the next thing that you want to do is type in npm in any terminal and you want to say yarn like so you can say i which is an abbreviation for install like so so you can all you can say npm install yarn once you do that yarn will install on your machine and then you also will have the yarn tool all right that's just something that people asked me about how to do next what we're going to do is click on visual studio and we're going to say open and the next thing that we want to do is go to the desktop find where this file is and i wonder if i can extract it there um let me extract it on my local machine first and then go and open it again so go and extract this engine first from your zip that you just downloaded and then go and open it perfect so now that all the layers are here there's a very simple process that we can follow to make sure that this runs smoothly the first thing is right here at the top of your visual studio there will be a button called terminal and you can just click on new terminal you can't see it here at the top of my screen but just type in new terminal over there so that it opens on your root file all right next thing what you want to do is you want to install all the dependencies what are dependencies well in the package.json we have got canvas which is our first dependency and only dependency that we really need so you can go in the terminal and run yarn add all this is the first command that you can run and you can optionally run npm i and then that should work fine as well okay remember i is an abbreviation for install i'm showing you both tools because sometimes yarn works better than npm and i like yarn so i'm going to say yarn add all and i'm going to say enter this will download all the dependencies aka the canvas dependency that we need and then we will be all set while this is busy downloading let me quickly explain to you the briefly how the folder structure works and the only thing that we need to change i've made the program so simple now that anyone will be able to do this under folder structure you'll see that there's a layers folder you can open the layers folder and see that there's another set of different folders called background button lit eye color and they go on now in these folders there's just your regular images of the different layers of what you want to create now let's just take for example we've got a black background we've got eye colors which is a green pink purple we've got eyeballs which are red white and iris and then we've got the shine and also top lids now these are my folders which will create an eyeball now you can have your own different folders in layers and keep in mind that the layers should come in a little bit of a sequence but they don't have to be organized in this folder yet we do that in the config file so in order to set up the order of these layers what you'll need to do the only thing that you'll need to change is open this src folder go to the config.js and you'll see that there's an object called layers order in this layers order this needs to correspond to each one of these layers inside of your layers folder in here the order is very important you want to put the layer that comes first for instance the background then the eyeball then the eye color iris shine bottom lid and then the top lid in your case it might be different so please work out your order first before you go and add this in and also remember that the spelling of these names needs to be exactly the same as these folder structures all right next another side note that i want to mention later on you'll see that there's metadata created so in these folders such as the eye color you need to make sure that the actual way that you spell these out dot png these are going to be the name attributes for each um for each file right so your attribute will be eye color and it will automatically select one but it would for instance say your eye color is pink it will take away the dot png so don't worry about that but just make sure that you spell these how you want them to be portrayed in the metadata perfect so now let's go ahead and actually run this after you've set up your orders correctly make sure you have them over there the last attribute you can look at that's really important i'll go over each one but it's the edition size now let's say i want to make 10 images so i change the edition size to 10 that's all i have to do i have to remember to save this file there's a little dot at the top that tells me it's not saved yet on a mac you can press command s to save i think it's control s on a windows machine but anyway after that come down here in your terminal again and then you can run node space index dot js and once you run that you will see a build folder will be created for us in this folder structure over there at the top it should happen just in a second now and then once that happens the process of our creation has started and there we go there we've created 10 nfts and there's the build folder with the metadata this is the big object there's also a smaller object so if i hit command s i have pretty fire on my machine so it should it should actually beautify these things but it's not doing it right now but anyway this is the metadata and then you also get your images um that's been generated down here in this folder so every time that you run this command it will remove the bold folder and clean it out and create a new set so when you want to create an nft set you need to make sure you have everything set in place and run it once there is other attributes that i can discuss with you in this config.js such as the unique dna tolerance the unique dna tolerance is there to eventually fail the program if there's too many dnas that keeps on finding matches right so eventually that means that you have two little folders um specified so let me create an example i'm going to remove almost all of the layers over there and save the file and then i'm going to change this tolerance to maybe 200. when i run the program down here you'll see that it says dna exists dna exists and it goes on and on and on and if it reaches 200 it will tell you that you need more layers and um or elements to generate 10 artworks okay so all you need to do then is go and apply what i am telling you to do is go and add more layers and elements and you should be fine so next step that we want to do is just look at this background object now let's say i didn't have a background over there and i also didn't have a top lid and a bottom lid you can comment things out by putting two forward slashes in front of them or if you're on a mac you can press command forward slash on each line anyway i'm going to save this just run it so you can see what happens if i run this you'll see that my eyes have these colors in the back generated now in the config on this layers object i can set this to false and if i set this to false and i press command s then it means if i run it here at the bottom node index.js it means it won't have a background so that means that this configuration will auto generate a random color for you which you can use so if you want to set the brightness just remember to put this back to true you can set this to maybe 60 and we can generate a brighter color so every time here in the terminal just as a side note if you click on the terminal and you press the up arrow you will find the previous command that we ran this might be helpful for re-running this a few times anyway if we look at our images now you can see that it has a very sharp and bright background pretty cool anyway i'm going to leave it like this and just show you guys how easy it is to implement your own collection now i'm gonna grab a collection that i literally haven't planned at all and show you how you can set up your own collection so that you feel comfortable doing it and making sure that you build your own stuff properly the correct way all right now the last thing i want to just also mention is the format you can change the format to be a thousand by a thousand you can make it portrait so you can also make it a thousand by two thousand depending on your artwork sizes all my artworks are square and that's why i work with these sizes and the base uri is the base uri of your server remember if you watch the nft course that's what you make this value and the description is also going to be your description for your nft i'm going to show you how easy it is to use your own collection and artworks inside this program all you need to do is have your folders ready and have some elements element attributes on them such as the nerdy coder clone collection i'm just going to use this as an example i'm going to take these folders and drag them into the layers over there so what i'm going to do is just everything from background to the bottom here i'm going to delete i'm going to move it to the trash so this layer is empty next i'm going to take a handful of my other layers and i'm going to drop it inside the layers folder over there so let's close this build now we can see that i actually have a few um elements that's in there i can close this file and i now need to explicitly explain what these are right in these in this layer order so next what i'm going to do is i'm going to focus on what needs to come first i am i don't have a background so i am just going to start off with the body so i will start off with body and just remember i'm now typing everything lowercase but you need to type it exactly how you would like it to show up in your traits so if you look in the metadata if i scroll here to the end you can start seeing that i've got a trait which is eye color and it's red so these take the file name so just be cautious when you are setting up the configuration file and make sure that you want it to be the same as how you want it to be in the metadata all right let's carry on so i've got my body the next thing that i'm going to add is the clothing okay and then the next one is going to be the clothing logo after that i have my eyebrows i think eyebrows comes first and then we've got the eyes we got i way and what else do we have let's put the mouth next let's put the nose and lastly i'm gonna put the head where all right and that's how easy it is if i go now down here and i run node index.js you'll see that my collection has just create been created so you guys i'm not lying this is the easiest version of this code that exists um there you go it is pretty basic though it doesn't have um different rarities but it does have the different properties so it will actually show up in in openc once you upload these but how cool are these characters now anyway that was my explanation of how to use the code i hope this was helpful for you guys and i hope that you learned a lot and please remember to go to this repo and if you want to decide to follow along then just make sure that you got the original release over there that is the latest release so i'm going to go and update the rest of these repos to point everyone to go to this new one because it is the latest one and i want people to go and use the correct version of the code and we'll be expanding on it as we go along lastly i just want to say thank you as always to the people who've sent me these nfts now someone has sent me a very weird picture that i cannot show on openc and even on youtube so i'm just going to show you the ones i can i just removed that one for the video apparently you can hide nfts but i want to say thank you for everyone's hard work and contribution and giving me these nfts as a little gift to show me that you guys completed these courses we have this new crypto cabs we've got um these nice story looking they're called all right they called the bulak like buds and they're pretty cool then we got the business punks why so serious these look very nice and then someone sent me all the pharaohs in the world so i have to scroll but these are famous egyptian deities deities um thank you for them there there's a lot of them though um they may have crypto achievements nfts pretty cool these remind me of like game items that you can get like minecrafty pixelated things and i i really like them for some reason then we have the cyber chip these are these little eyeballs sitting in space and they have these different themes going on with them i also notice i got a den denzhou egg and then also the raccoon land nfts these are pretty awesome i like this one with the glasses very very very very awesome and then we got the octopunks this one's brains are falling out and then you guys have seen all the walruses but i have to scroll down because someone also sent me the gemma's jams um and some of for some reason sometimes the nfts they drop in weird orders okay so i noticed some of you guys send me nfts thank you so much for these um but sometimes i miss them because it it doesn't order correctly so thank you for the candy shack um all these cool nfts they really look nice this fractal project i want to mention something though in my previous video i skipped over this wee mint washington i clicked on this and i saw it the other day and someone sent me a twitter tweet saying that thank you they appreciated my channel and they sent me this nft they thanked me because there was a hundred and seventy of these minted on their channel already here it is the women washington so i actually went to have a look at this collection and i must say congratulations man i the last time i looked at this this was at 400 items and this collection is doing great this person has created this collection and they selling it for one dollar each obviously it's on the ethereum network so you will pay those gas fees but i think this is doing pretty well and if you look at the rest of these artworks i was pleasantly impressed with how cool they came out anyway to end this video off thank you for the 15 or 16 i think there's like 20 by now people who own a nerd a nerdy coda clone i always say that wrong but the nerdy coder clones thank you so much for the people owning them you can go and get them on this site if you don't own one yet lastly guys thank you so much for a yet another session and i hope you guys are gonna enjoy this new mentor please let me know how it goes i hope that there's not as many issues that you guys have found in the previous one where you got stuck on node.js and all these different things i hope this is going to go smooth and that you're going to enjoy it creating more artworks have a nice day
Info
Channel: HashLips NFT
Views: 12,283
Rating: 4.9863482 out of 5
Keywords:
Id: vFY_E3IP6OU
Channel Id: undefined
Length: 23min 9sec (1389 seconds)
Published: Mon Sep 13 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.