Open codehakan opened 2 years ago
@codehakan do you mean you don't want the images to be too similar?
@codehakan do you mean you don't want the images to be too similar?
@bolshoytoster Yes. For example, the only difference between the 200th produced NFT and the 201st produced NFT is only the background color. I don't want a single difference. I want it to be 2 or 3 differences. The difference between it and the previously produced picture should not be the only one. That is, in the 300th NFT, the eye color is blue, and in the 301st NFT, the eye color is green. I said the numbers 200 and 300 as an example.
@codehakan in src/main.js
~line 277:
https://github.com/HashLips/hashlips_art_engine/blob/d8ee279043d2d4a8de3bdfac0d89d0e966fb04a2/src/main.js#L277-L280
You could replace that function with:
const isDnaUnique = (_DnaList = new Set(), _dna = "") => {
const MAX_OVERLAP = 8;
const _filteredDNA = filterDNAOptions(_dna);
return Array.from(_DnaList).find(
x => x.split(DNA_DELIMITER).filter(
y => _filteredDNA.split(DNA_DELIMITER).includes(y)
).length > MAX_OVERLAP
) == undefined;
};
Then change MAX_OVERLAP
to be the max number of layers you want to be the same.
I haven't tested this and it's quite inefficient, but it might work.
@bolshoytoster thanks. But im taking error.
(node:24012) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
TypeError: _DnaList.find is not a function
at isDnaUnique (C:\Users\hakan\Desktop\hashlips_art_engine-main\src\main.js:286:14)
at startCreating (C:\Users\hakan\Desktop\hashlips_art_engine-main\src\main.js:377:11)
at C:\Users\hakan\Desktop\hashlips_art_engine-main\index.js:6:3
at Object.
@codehakan if you add console.log(_DnaList)
at the start of the function and run it again what does it say?
@bolshoytoster
Output: Set(0) {}
@codehakan I think you could change the line:
return _DnaList.find(
to
return _DnaList.values.find(
@bolshoytoster
@codehakan sorry, It's meant to be
return _DnaList.values().find(
@bolshoytoster ☹️
@codehakan I've actually tested it this time:
return Array.from(_DnaList).find(
@bolshoytoster yup, its working. 👍 But not generating NFT. Console log always saying "DNA exists!". 🤔
I tried change MAX_OVERLAP with 1,2,3,4,5,6,7. But nothing happened.
@codehakan how many layers do you have?
@bolshoytoster i have 12 layers.
@codehakan set MAX_OVERLAP
to 11 and decrease it until you grt whst you want.
@bolshoytoster thank you, works like a charm!
Hello,
I have 12 layers. Production is provided even with only 1 change in the default settings. But I want to change that. For example, I don't want everything to be the same in 12 layers and only the background to be different. In other words, I want production to occur when there are at least 3 changes. Can anyone help on how I can do this?