Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions to improve usability of generator #10

Open
pharapeti opened this issue Aug 31, 2021 · 8 comments
Open

Suggestions to improve usability of generator #10

pharapeti opened this issue Aug 31, 2021 · 8 comments

Comments

@pharapeti
Copy link

Hey, love the project. I've got a few suggestions, let me know what you think.

  1. Create a sample config.json which contains default values, all set to null. This allows a user of the package to set config values before executing the program. After running the generator, any null or unset config values are populated when the --save-dev flag is set.

  2. Update the setNames method to use the filename as name for each file, instead of requiring the user to input a name for each file. For example:

async function setNames(trait) {
  const files = fs.readdirSync(basePath + '/' + trait);
  files.forEach((file, i) => {
    names[file] = file.split('.')[0];
  });
}
  1. It is fairly tedious to have to pre-calculate the number of images containing each trait, and entering an invalid number can result in the program crashing. To remedy, the weighting algorithm can adopt a percentage weight system for determining the weightings of each trait.

For example:
What percentages of ' + names[file] + ' ' + trait + ' should there be?'. To which the user would input 5 as in 5%.

Followed by What is the total number of images that should be generated?. To which the user would input 1000 (sum).

Using these values, you would be able to determine the number of images containing each trait as a percentage of the sum provided by the user.

Cheers!

@NotLuksus
Copy link
Owner

Sound like great ideas! I'm currently working on percentage based inputs since that is where most people have issues. I will check on the other ideas ones I'm completed with them, if you want you can fork it and create a pull request ones you are done!

@werksone
Copy link

werksone commented Sep 5, 2021

Would absolutely love to be able to use the file name as the setName

@AkoZ
Copy link

AkoZ commented Sep 6, 2021

yeahhh good good !
thank you for this generator, even for now not used.
some Jupyter to be found for ez use, and take dir with traits

  • your last explanations about the 50 bckground and 25x2 as in fact 2 layers of 25 traits is not all clear ;)

  • also there is : https://github.com/benyaminahmed/nft-image-generator which may be identical in jupyter mode.
    Well ! best regards ! and may it appears ;)

AkoZoOm

@FrostyWasTaken
Copy link

Sound like great ideas! I'm currently working on percentage based inputs since that is where most people have issues. I will check on the other ideas ones I'm completed with them, if you want you can fork it and create a pull request ones you are done!

Bro I would really find this useful have you gotten around to completing it?

@dcardines-design
Copy link

Guys whenever I run it it throws an error at the end of the process:

Error: Couldn't load image
(node:196704) UnhandledPromiseRejectionWarning: Error: Couldn't load image at img.onerror

Anyone has any idea how it can be fixed? Much appreciated

@dcardines-design
Copy link

Sorry solved it, it was just the count of traits, the totals of each trait group didn't match

@smehrjerdian
Copy link

  1. develop program to read inputs from a csv template where each trait folder matches a sheet name in the csv and all trait names are in column A and values in column B

  2. support a mix of gif + png layers and gif outputs to generate animate collections

@tucq88
Copy link

tucq88 commented Dec 6, 2022

Some traits are must have, some are should have which have lesser than must ones. Now collection is generated based on the lesser. The (3) will resolve such problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants