bbgm Females
sscZEROlive opened this issue · 9 comments
Hello, i don't know if you know who i am, but my name on reddit is u/sscZERO and Goose #3235 on discord. I have been talking to dumbmatter about the possible future of adding in females to bbgm. And i asked who i could talk to about the faces, and he directed me here. Please lmk what you can do, and if you have a discord, please do dm me on there, as i am not very active on github.
Hey @sscZEROlive, this is pretty intriguing to me, and I'm going to do some thinking on this over the next few days. I understand it would require a good amount of effort to implement both here and in bball-gm, but could be cool to have the faces produced.
Would love any further brainstorming from you or others on the topic.
Just general thoughts:
- Need typical female hair. In recent facesjs updates some folks added long hair, which is a great start
- What other types of hair exist? Shoulder-length, pixie cuts, pony tails, pig tails, cornrows
- More bangs options
- No facial hair
- Are female jaws different? Maybe slimmer?
I have no comment on the design issues, cause I suck on that stuff. I just want to say... if somebody gives me a PR to make decent female faces, I will add an option in all my games to have women's leagues.
Thinking about this again. I'm thinking there will need to be a few changes to the codebase which I'll start brainstorming below, and start in a branch off of a fork I made.
- Need to have gender passed in to the generate() function
- Perhaps if no gender provided, default to male
- I might need help from someone smarter than me to break down proper verbiage... gender vs sex, male vs female vs other, not sure yet.
- If female, generate with the following conditions:
- Always blank out facial hair & "shave" attributes
- Maybe exclude body shape body2 & body3? A little bit bulkier, but that may not be mutually exclusive
- Exclude some of the sharper jaw lines? Like head3
- Should we narrow down to some of the smaller eyebrows?
- Only allow some hair types
- cornrows
- emo?
- longHair
- afro
- shortBangs
- could short2 be viewed as someone having the hair pulled back into a pony tail? Might need to adjust it slightly
- Add some hair types, but don't need to have a ton initially:
- Basic pigtails
- Shoulder-length hair, slightly longer than 'longHair'
- @dumbmatter with some of these constraints, I might want your thoughts on how to best implement. A few further thoughts:
- The getID() function is elegant and 'dumb' right now (in a good way!), such that every element is just as likely to be chosen as another
- This is an issue for ladies, as there are a few hairstyles and other than may be male-only attributes
- We can add logic to getID, where we swap body/hair/etc ids if female vs male. This would work, but would complicate getID as we would need to pass in additional info to the function, rather than just type
- OR, we add logic to the inline generate functions, like seen here. Could also work, but would push some of these ternary operators into high complexity
- Last idea, and this is a somewhat major divergence in current generate() architecture, is to keep some sort of index/lookup of different svg options, and allow to narrow down to a smaller set based on attributes like gender (or maybe age too?)
- This could be a dictionary of attribute types (eyes/body/hair/etc), which you can then filter by gender, and then maybe even keep probability as well. But that could be added later on too
- Downside here is that this index/dictionary would need to be kept up to date anytime a new svg is added
- Would also slow down performance a tad
- We'll need to get some people's opinions on the outcome. For instance, if a user sees the picture below, will they automatically think "oh yeah this is a women's league"?
I just discovered the svgs-index.ts file, that simplifies some of this :)
I think the way I'd do it is to allow SVG filenames to have a label indicating if they are male, female, or all. Like:
hair-1.female.svg
hair-2.male.svg
hair-3.all.svg
That information should be parsed from the filenames and somehow put in svgs-index.ts, or something.
Then, when generating a face, it should accept a parameter to specify male/female, and only use facial features for the appropriate gender.
Advantage of this approach - one single source of truth (the filenames), so you never have to worry about updating some other dictionary somewhere or what happens if that falls out of sync.
I am back to the forum! I was thinking, what if we kept the current avatar style but we change the shape of the body and the different options to be more feminine?
Thinking about this again. I'm thinking there will need to be a few changes to the codebase which I'll start brainstorming below, and start in a branch off of a fork I made.
Need to have gender passed in to the generate() function
- Perhaps if no gender provided, default to male
- I might need help from someone smarter than me to break down proper verbiage... gender vs sex, male vs female vs other, not sure yet.
If female, generate with the following conditions:
Always blank out facial hair & "shave" attributes
Maybe exclude body shape body2 & body3? A little bit bulkier, but that may not be mutually exclusive
Exclude some of the sharper jaw lines? Like head3
Should we narrow down to some of the smaller eyebrows?
Only allow some hair types
- cornrows
- emo?
- longHair
- afro
- shortBangs
- could short2 be viewed as someone having the hair pulled back into a pony tail? Might need to adjust it slightly
Add some hair types, but don't need to have a ton initially:
- Basic pigtails
- Shoulder-length hair, slightly longer than 'longHair'
@dumbmatter with some of these constraints, I might want your thoughts on how to best implement. A few further thoughts:
The getID() function is elegant and 'dumb' right now (in a good way!), such that every element is just as likely to be chosen as another
This is an issue for ladies, as there are a few hairstyles and other than may be male-only attributes
We can add logic to getID, where we swap body/hair/etc ids if female vs male. This would work, but would complicate getID as we would need to pass in additional info to the function, rather than just type
OR, we add logic to the inline generate functions, like seen here. Could also work, but would push some of these ternary operators into high complexity
Last idea, and this is a somewhat major divergence in current generate() architecture, is to keep some sort of index/lookup of different svg options, and allow to narrow down to a smaller set based on attributes like gender (or maybe age too?)
- This could be a dictionary of attribute types (eyes/body/hair/etc), which you can then filter by gender, and then maybe even keep probability as well. But that could be added later on too
- Downside here is that this index/dictionary would need to be kept up to date anytime a new svg is added
- Would also slow down performance a tad
We'll need to get some people's opinions on the outcome. For instance, if a user sees the picture below, will they automatically think "oh yeah this is a women's league"?
This is absolutely brilliant my guy!
I've tried re-visiting this a number of times, but I'm not artistically talented enough to make it happen. If anyone is interested in giving it a shot, I'd be happy to chat through some of my previously commented brainstorming!
Very neat Library but I don't think converting males to females is the way to go. There needs to be two separate forks dedicated to gender then combined back into one master library. Then maybe introduce a plugin system that let's you create custom genders. This is frankly a hugely critical feature to make this library useful to anything outside of a very narrow use case.