HashLips / generative-art-opensource

Create generative art by using the canvas api and node js, feel free to contribute to this repo with new ideas.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Merging two collections with separate layers (eg. Female/Male)

NetworkEntity opened this issue · comments

I've built two projects each which successfully creates 5k images, i've gave each a unique DNAprefix and started the second collection with ID 5001 - 10k which gives me 10k images with correct metadata and rarity specifications.

However i'm looking at how to combine both input directories into one project so that a generation of 10k images would give me a randomisation of both sets in the same export (as opposed to 1-5k being male, 5-10k being female etc).

Each project has its own X/Y layout in the original .png layers, so i need to programme to run two separate sets of layers at random each taking layers from their own input directory.

Any thoughts, feedback, directions or suggestions appreciated.

Treat the sex as the race variable and configure all your weights in each attribute tree. You will need to use v3 o v4 code to accomplish this.

Yeah i tried using v.3 but it's nowhere as clean for rarity generation as main. I have a two 5k collections that are great, male and female, but i need to combine them into the same export and make the generation of each race random. m/m/f/m/f/f/f/m/m/f/m/f/m/m etc

const getRace = (_editionCount) => {
let race = "No Race";
if (Math.random() > 0.3) {
race = "HumanMale"
} else {
race = "HumanFemale"
}
return race;
};

PS: If you have code to stop overlapping layers eg: IF Mask THEN No CIG. I'd appreciate some help in return! The code i've supplied will be placed in Index.js :)

const getRace = (_editionCount) => {

let race = "No Race";

if (Math.random() > 0.3) {

race = "HumanMale"

} else {

race = "HumanFemale"

}

return race;

};

PS: If you have code to stop overlapping layers eg: IF Mask THEN No CIG. I'd appreciate some help in return! The code i've supplied will be placed in Index.js :)

Does this work on Hashlips Art Engine? This is exactly what I need but the layer function runs differently on that code.

const getRace = (_editionCount) => {
let race = "No Race";
if (Math.random() > 0.3) {
race = "HumanMale"
} else {
race = "HumanFemale"
}
return race;
};
PS: If you have code to stop overlapping layers eg: IF Mask THEN No CIG. I'd appreciate some help in return! The code i've supplied will be placed in Index.js :)

Does this work on Hashlips Art Engine? This is exactly what I need but the layer function runs differently on that code.

v3

What was the easiest way to change the collection id to 5000, etc.

Thanks.