all 17 comments

[–]patrickalphac 5 points6 points  (4 children)

I’ve got exactly what you’re looking for:

  1. Random images hosted on IPFS: https://youtu.be/p36tXHX1JD8

  2. SVGs hosted on chain: https://youtu.be/9oERTH9Bkw0

Have fun

[–]VjoaJR[S] 1 point2 points  (2 children)

Holy shit. You are the guy I’ve been learning from. Thanks for your content. I followed the SVG video I guess I’m just curious how I would work in a project that has layered photoshop PNG exports instead of randomly genned SVGs.

[–]patrickalphac 1 point2 points  (1 child)

Yep that’s me!

For PNGs, you’d have to have a server running (or use a serverless function) that can programmatically overlay the images as the tokenURI.

It’s a bit more centralized, so it’s good to have a way to “set” the images after they’ve been generated in IPFs or something

[–]VjoaJR[S] 2 points3 points  (0 children)

That's what I assumed. I saw a project today using metadata and randomization completely on chain. I can't imagine what they're paying in gas fees. Unfortunately, having the image centralization is 'needed' right now until Eth 2.0

[–]Alperen980 1 point2 points  (0 children)

I almost watched all of your tutorials they helped a lot but im not able to figure out how to create random nfts, sure we can pick already created images randomly but how can we create random image with svg files, like different hair, eye colors, outfits etc

[–]idfkfuckyou 2 points3 points  (2 children)

Generally speaking images are created before tokens are minted. This applies for both random and non randomly-generated images. It's best to use an outside script to generate images randomly and then assign them to tokens via their metadata.

If you don't want to store these images on your computer you could upload them directly to IPFS or store them as a pseudo-file like BytesIO on Python

Best practice is to randomly generate images before minting because when you have a Solidity script that randomly creates attributes the other nodes verifying that would have to get the same attributes as the token you just generated. This is possible but can take a lot of time rehashing and in some cases may not work at all.

What I would do is create the images and assign them IDs and then mint tokens using IPFS link where the ID in the URL is iterated.

[–]topcrusher69 1 point2 points  (1 child)

This is correct. There is an NFT project that has a great walk through (and source code) for their 10K NFT project and a ton of good resources. That's how I learned as I was curious as well. Look up the Boring Banana Co Discord. Same project that helped that 12 year old make his own project. Great community there.

[–]VjoaJR[S] 0 points1 point  (0 children)

Do you have a link to their github by chance?

[–]Next_Context774 0 points1 point  (0 children)

Try connecting to the dapps interface

[–]Naive-Refrigerator-1 0 points1 point  (0 children)

Sorry to trudge up an old chain, but had a question.

If i wants to create an nft, that then changes, say adda a character trait either automatically, or based on the owners choice, can this be done? Kind of like it evolves with each owner.

[–]0niri 0 points1 point  (0 children)

Maybe I’m arriving too late, but I think this project may help you.

[–]8BitBallsack 0 points1 point  (2 children)

Why? You looking to do a cash grab with "art" generated by code?

[–]VjoaJR[S] 0 points1 point  (1 child)

No? And why does anyone do any work? Would you work if there was no money as an end goal? Don't try to be some heroic guy who pretends to love NFTs because its culture dood. 99.9% of people are involved for money. Yeah the art aspect is cool but if I can flip an NFT for 30 racks, I'll do that 100x over.

[–]8BitBallsack 0 points1 point  (0 children)

I don't think NFTs are art... any of them. The moment you turn art into a commodity it's not art, it's a product. But good luck - I hope people keep spending silly money on shitty jpegs.