HashLips / generative-art-node

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

The rarity does not work for me #25

Open xddyyy opened 3 years ago

xddyyy commented 3 years ago

Is the rarity actually working? Im not good at coding especially Js but if I look through the code I cant see where the superrare is used?

sdotwinter commented 3 years ago

I am wondering the same. Is it just for metadata?

omniNerd commented 3 years ago

I am wondering the same. Is it just for metadata?

Right, the metadata shows up with the correct titles but it doesn't seem to actually make anything more rare. I'm trying to figure out how to code rarity into the program and I'll let you know when I figure it out.

vagueink commented 3 years ago

@petercottonmouth it would be awesome if you can figure this out. Thanks!

grantreighard commented 3 years ago

The method I'm using is to add blank images to create the rarity within a directory. For instance, if I want a layer to be 1/100, I have 99 blanks along with the one image that contains something. This is just an artificial method for creating rarity (it works though), but the attribute will have a value (such as "blank35" when picking the 35th blank) in the metadata regardless of if the layer is blank or not.

pguardiario commented 3 years ago

I am wondering the same. Is it just for metadata?

Right, the metadata shows up with the correct titles but it doesn't seem to actually make anything more rare. I'm trying to figure out how to code rarity into the program and I'll let you know when I figure it out.

You just put _sr (super rare) or _r (rare) in the image filenames

grantreighard commented 3 years ago

You just put _sr (super rare) or _r (rare) in the image filenames

This alone does not make anything more rare. If you have a layer directory with only one file, even if you label it _sr, every single output image will contain it.

pguardiario commented 3 years ago

You just put _sr (super rare) or _r (rare) in the image filenames

This alone does not make anything more rare. If you have a layer directory with only one file, even if you label it _sr, every single output image will contain it.

Yes, it only affects the metadata property. To change the math you need to do something in the drawLayer function