HashLips / generative-art-node

Create generative art by using the canvas api and node js
MIT License
2.15k stars 914 forks source link

how do i add percentage rarity to layers. #53

Open giannihart opened 3 years ago

giannihart commented 3 years ago

for example how do i say for layer X, i want the original layers to appear 80%, rare 15%, and super rare 5% of the time when i run the program.

warrenbreedlove commented 3 years ago

I too am looking for this exact answer. What are the rarities even for right now? I cant tell if they have a percentage for them or not. Or if you add those suffixes does it even change how often they get used? Not sure. Would love some help

cvdvs commented 3 years ago

following this as well for an answer

sMiLEy-sLOth commented 3 years ago

following

0xunderl0rd commented 3 years ago

following as well, thanks!

Zofax commented 3 years ago

following

DaiNion commented 3 years ago

following!

SanjayWilliams commented 3 years ago

Im looking for the same answer bro

whazzy commented 3 years ago

kinda figured that you have to duplicate images in your directory to handle rarity. If you want following rarity A : 50% B: 25% C: 10% D:10% E:5%

You have to put duplicates of images as following A:10 B:5 C:2 D:2 E:1

The rarity suffix is just for metadata.

nickstewart19 commented 2 years ago

Anyone find any other answer? Rosseaus solution is not great for a 10k project, no offence

stereo4 commented 2 years ago

Hello everyone. Amazing software but so annoying limitation indeed. Did anyone figure out how we could set it to build only an x percentage or number of items to specific png files instead of layer folders?

Thanks in advance!

pasinduvinsuka commented 2 years ago

for example how do i say for layer X, i want the original layers to appear 80%, rare 15%, and super rare 5% of the time when i run the program.

image

stereo4 commented 2 years ago

Solution found using : generative-art-opensource

e.g. // provide any specific percentages that are required for a given layer and rarity level // all provided options are used based on their percentage values to decide which layer to select from addRarityPercentForLayer('super_rare', 'ball', { 'super_rare': 33, 'rare': 33, 'original': 33 });