-
Notifications
You must be signed in to change notification settings - Fork 44
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
[FEATURE] Layer Combination Exclusions #15
Comments
As written by arnaugm (Thank you very much for the work done here) If for any reason the artist doesn't want two specific traits to appear together, they can be defined as incompatible. Let's consider an example where we are creating a character with a hat and a background among other layers. And we don't want to generate the character with a white hat if the background is also wait because we don't like how they look together. We can exclude this combination in the configuration. These incompatibilities can be configured at a layer configuration level with the option incompatibleTraits which is an object where the keys are traits in the format / and the value is an array of all the traits that are incompatible with this one using the same / format. Example:
If the art engine generates a new artwork that contains 2 incompatible traits, this new piece will be discarded and a notification will be displayed in the console with the message: Combination of traits excluded because of exclusion rules! This option will reduce the number of possible combinations and could be possible that the collection can not reach the requested number of elements. In this case reduce the number of incompatibilities or provide more traits in the layers that has less options to increase the probability of selecting different traits. If the option is not defined the restriction is not applied. |
I have introduced this functionality into my repo and have slightly modified the error that gets returned to the screen to "Combination of traits excluded because of incompatible layers exclusion rule!" |
Users can now make use of the incompatibleTraits configuration within their layer configuration to excluded or force certain trait combinations.
|
@cesar4design uou are 50% there. You have set that when Corpo Spider is chosen, then Head Spider should also be chosen. You also need to say that when Head Spider is chosen, only Corpo Spider can be chosen. |
@cesar4design you do not have any rarities specified, so first add the correct naming convention for your files as per the sample files provided in the code repo. |
i wanted to have dependentTrait function such that petals on ground should match color of flower. dependentTraits: { "ACC/PAT/ACC_PAT_BLACK-METAL":["FLO/FLO_BLACKMETAL",], "ACC/PAT/ACC_PAT_CARBON":["FLO/FLO_CARBON",], "ACC/PAT/ACC_PAT_CD":["FLO/FLO_CD",], "ACC/PAT/ACC_PAT_COLA":["FLO/FLO_COLA",], "ACC/PAT/ACC_PAT_DOLLAR":["FLO/FLO_DOLLAR",], "ACC/PAT/ACC_PAT_fabric":["FLO/FLO_FABRIC",], "ACC/PAT/ACC_PAT_GLASS":["FLO/FLO_GLASS",], "ACC/PAT/ACC_PAT_GOLD":["FLO/FLO_GOLD",], "ACC/PAT/ACC_PAT_JEANS":["FLO/FLO_JEANS",], "ACC/PAT/ACC_PAT_MARBLE":["FLO/FLO_MARBLE",], "ACC/PAT/ACC_PAT_METALIC":["FLO/FLO_METALIC",], "ACC/PAT/ACC_PAT_OVO":["FLO/FLO_OVO",], "ACC/PAT/ACC_PAT_PAINTEDMETAL":["FLO/FLO_PAINTEDMETAL",], "ACC/PAT/ACC_PAT_SELVER":["FLO/FLO_SELVER",], "ACC/PAT/ACC_PAT_VELVET_BLACK":["FLO/FLO_VELVET_BLACK",], "ACC/PAT/ACC_PAT_VELVET_BLOOD":["FLO/FLO_VELVET_BLOOD",], "ACC/PAT/ACC_PAT_VELVET_BROWN":["FLO/FLO_VELVET_BROWN",], "ACC/PAT/ACC_PAT_VELVET_CYAN":["FLO/FLO_VELVET_CYAN",], "ACC/PAT/ACC_PAT_VELVET_GREEN":["FLO/FLO_VELVET_GREEN",], "ACC/PAT/ACC_PAT_VELVET_LAVANDER1":["FLO/FLO_VELVET_LAVANDER1",], "ACC/PAT/ACC_PAT_VELVET_LAVANDER2":["FLO/FLO_VELVET_LAVANDER2",], "ACC/PAT/ACC_PAT_VELVET_ORANGE":["FLO/FLO_VELVET_ORANGE",], "ACC/PAT/ACC_PAT_VELVET_PASTELRED":["FLO/FLO_VELVET_PASTELRED",], "ACC/PAT/ACC_PAT_VELVET_PASTELRED":["FLO/FLO_VELVET_PINK",], "ACC/PAT/ACC_PAT_VELVET_RED":["FLO/FLO_VELVET_RED",], "ACC/PAT/ACC_PAT_VELVET_SKY":["FLO/FLO_VELVET_SKY",], "ACC/PAT/ACC_PAT_VELVET_TIFFANYBLUE":["FLO/FLO_VELVET_TIFFANYBLUE",], "ACC/PAT/ACC_PAT_VELVET_VIOLET":["FLO/FLO_VELVET_VIOLET",], "ACC/PAT/ACC_PAT_VELVET_VIOLET1":["FLO/FLO_VELVET_VIOLET1",], "ACC/PAT/ACC_PAT_VELVET_WHITE-":["FLO/FLO_VELVET_WHITE",], "ACC/PAT/ACC_PAT_VELVET_YELLOW":["FLO/FLO_VELVET_YELLOW",], } what am i doing wrong |
Summary
Add the ability to exclude certain layer item combinations from appearing on the art being generated.
Basic example
If I have a character layer with one item, hair layer with two items and glasses with three items.
Character:
main.png
Hair:
short.png
long.png
Glasses:
funky.png
square.png
oversized.png
I do not want my art generations to contain a combination of long.png and oversized.png, but all other combinations should be able to generate.
Motivation
Users would like to be able to to skip certain combinations as their art work does not look correct when certain combinations are used.
The text was updated successfully, but these errors were encountered: