HashLips / hashlips_art_engine

HashLips Art Engine is a tool used to create multiple different instances of artworks based on provided layers.
MIT License
7.18k stars 4.3k forks source link

Use DNA to construct NFT #821

Closed ijaz13100 closed 2 years ago

ijaz13100 commented 2 years ago

Hi, thanks for this and the videos, works great! I was looking for a way to use the DNA generated in the .json files of an initial collection (collection_1) to create another nft collection (collection_2) which uses the same layers in each and has the same rarity. So nft3 in both collections will have the same layers used and the same rarity. I want to be able to switch out the layer files (but keep the structure and names the same) and recreate each nft according to the dna of the initial collection. Is there a way to do this?

Something similar was asked here: issue #490 https://github.com/HashLips/hashlips_art_engine/issues/490

@psavva commented: customize the generation to load all the DNA hashes, assuming you have them, and generate every combination until you get your hashes in your file. Depending on the layers you have, could take second or hours possibly to generate everything. This would require a big change in the generator method. No so easy.

can you expand? Would be most appreciated.

bolshoytoster commented 2 years ago

@ijaz13100

customize the generation to load all the DNA hashes, assuming you have them, and generate every combination until you get your hashes in your file

That would be a terrible idea. That's literally what crypto mining is, and it takes quite a lot of time/energy.

The metadata files save the names of the layers used, although hashlips doesn't currently support this, if you keep the layer names the same it is possible.

psavva commented 2 years ago

That would be a terrible idea. That's literally what crypto mining is, and it takes quite a lot of time/energy.

Hmmm, If you have 5 layers, with 10 images each, I don't see how this will be a lot of time/energy....

If he does not have the metadata, and does not have the final images, and still (for some reason), wants to construct the original run only based on the "dna hashes", I see this being perfectly feasible in some seconds...

Please explain how this is a "terrible idea"

ijaz13100 commented 2 years ago

@bolshoytoster @psavva

Thanks @bolshoytoster. I think it would be fun to create a changing NFT that takes on community input/voting in each "generation" e.g. if an nft holder has an nft with "tophat" attribute then they get a vote on what the next "tophat" layer look like and so on... I figured I could update the base uri, with the new files, assuming I could recreate each nft (with attributes/rarity the same) in collection_1 and collection_2...

I have all the json files for the project (unoriginals.link) and I figured since I have the DNA it would be a way to recreate them, but could there be an easier way to do something like this? I'm really new to the NFT space and programming, but I think this would be an interesting take on generative art.

ijaz13100 commented 2 years ago

Thanks @psavva I just saw your reply. I have all the metadata and final images for collection_1. I want the metadata (rarity and attributes) to be the same for collection_2. Metadata (baseuri) tied to collection_2 will be the new baseuri on the smart contract, so essentially the NFT will change but maintain the same attributes/rarity.

Background: 48 images Base: 1 images Doryphoros: 11 images Hat: 22 images Ouroboros: 8 images Overlay: 7 images

bolshoytoster commented 2 years ago

@ijaz13100 if you keep the images + metadata from previous generations, my repo has support for continuing a set. You can just set growEditionSizeTo to the target size.

ijaz13100 commented 2 years ago

Thanks @bolshoytoster but I'm trying to create a new set, with the same dna...its kind of a different take, looking to create generative generational art...so different generations will have the same dna (attribute/rarity same for each nft both previous and new generation) but different phenotype (look)

bolshoytoster commented 2 years ago

@ijaz13100 sorry, I've tried to implement this, but it's not really possibe with the current metadata files. You're probably better off making a seperate project if you can find a programmer(s) that will help you.