HashLips / generative-art-node

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

Rarity system #118

Open yy0002 opened 2 years ago

yy0002 commented 2 years ago

I don't understand how the rarity system is working. I have one of my file renamed to Santa_sr, which means that it is supposed to be super rare. When I look at the results, there is a ton of Santa_sr, proving that this system isn't working well. Help

teddimagg commented 2 years ago

Check the new repo : https://github.com/HashLips/hashlips_art_engine

jprillo commented 2 years ago

Check the new repo : https://github.com/HashLips/hashlips_art_engine

Thank You.

symrana commented 2 years ago

hey @jprillo and @teddimagg i clicked on the link downloaded it and opened it in vsc but i didnt understand anythink^^ can you help me out?

aloshyakasoto commented 2 years ago

Rarity on element level isn't implemented. The rarity tags on the filename doesn't work at all. The code isn't using this tag to choose/omit an element while drawing a layer. The only way to induce rarity is at layer level. If you add a higher number than the total number of elements in a layer (in layersOrder config inside src/config.js), that probability of that layer to get included reduces. If there are 2 elements in a layer and the number in layersOrder for that particular layer is 4, there's 50% chance for that layer to get included.