Hi people, this is my first upload ever. I hope you like it .
VAM-Character-Fusion
Create beatiful girls (and guys!) for Virt-A-Mate by fusing two parent appearances using a genetic algorithm. This app is made in python (you can look at the source) but is also available as a windows executable.
How do I use this?
What do the options do?
Save filename
By default each child is named Child (Preset_Child.vap to be precise). But you can use your own custom name if you want.
Parent Template
This lets you choose which appearance file you want to use as the base appearance for your child. The child will inherit from the chosen parent appearance file: the clothing, hair, eyes, makeup, skin, height, etc. Basically everything which is not a morph. The only changed values for the child, will be the new morphs chosen from both parents. Available choices are: Parent 1 (child's will only use this as a template), Parent 2 (child's will only use this as a template), or Random Parent (each child will randomly use the appearance of Parent 1 or Parent 2 as a template).
Remove morphs with absolute value below
Some appearances have a lot of morphs which are really close to zero. If you would keep those, there is a lot of morphs which would not do anything for the child when chosen or mutated. For this reason I'd advice to keep this value at the default of 0.01 to make sure to delete the most insignificant morphs from the appearance, resulting in more variation in the childs you create. If you want to keep all the morphs anyway, just enter 0 in this box or keep it empty.
What do I do with the Morph information?
Here the total amount of morphs found in each parent is shown (after removing all morphs with an absolute value below the set treshold). This is a good indicator of the amount of custom morphs the parent has. If a parent has a small amount of morphs (say, smaller than 50), there is a big chance that the "look" has been saved into a few custom morphs especially for this character. Parents with such specific custom morphs are not really suited for child generation since there is only 1 or 2 "genes" which decide the look, namely the custom morph. If you generate a child from such a parent, you either copy the whole look (if the morph was randomly chosen for your child), or lose the whole look (if the morph was not randomly chosen for your child). Long story short: try to use parents with a total amount of morphs, larger than say, 100. You can do that by looking at the Morph information when you load your parents.
How does your program work?
Thanks for asking! In a nutshell it works like this.
Hah! If you would look at the code, you would know the answer. Which is: no.
Why don't you release this as a var package?
I would, if I could. But I can't program anything in C# (yet?). So at this point I have no clue how I would go about doing this in C#. If someone would like to pick this up and convert it to .var, be my guest! Otherwise, you might wait for me to do it myself once I learned to work in C#. If people are willing to help me do this by answering some C# questions here and there, let me know.
Can I help you, or give feedback on your code?
Yes, please. I'd love to improve my coding skills. Check out my github.
VAM-Character-Fusion
Create beatiful girls (and guys!) for Virt-A-Mate by fusing two parent appearances using a genetic algorithm. This app is made in python (you can look at the source) but is also available as a windows executable.
How do I use this?
- When you start the app, click on the left silhouette, and go to your Virt-A-Mate Appearance directory (e.g.: C:\VaM\Custom\Atom\Person\Appearance or something).
- Click on the appearance you want to load.
- Do the same for the right silhouette.
- Now the "Generate Child" button will become green, click on it.
- Congratulations! You now have a beautiful "Child" of both parent appearances (left and right).
What do the options do?
Save filename
By default each child is named Child (Preset_Child.vap to be precise). But you can use your own custom name if you want.
Parent Template
This lets you choose which appearance file you want to use as the base appearance for your child. The child will inherit from the chosen parent appearance file: the clothing, hair, eyes, makeup, skin, height, etc. Basically everything which is not a morph. The only changed values for the child, will be the new morphs chosen from both parents. Available choices are: Parent 1 (child's will only use this as a template), Parent 2 (child's will only use this as a template), or Random Parent (each child will randomly use the appearance of Parent 1 or Parent 2 as a template).
Remove morphs with absolute value below
Some appearances have a lot of morphs which are really close to zero. If you would keep those, there is a lot of morphs which would not do anything for the child when chosen or mutated. For this reason I'd advice to keep this value at the default of 0.01 to make sure to delete the most insignificant morphs from the appearance, resulting in more variation in the childs you create. If you want to keep all the morphs anyway, just enter 0 in this box or keep it empty.
What do I do with the Morph information?
Here the total amount of morphs found in each parent is shown (after removing all morphs with an absolute value below the set treshold). This is a good indicator of the amount of custom morphs the parent has. If a parent has a small amount of morphs (say, smaller than 50), there is a big chance that the "look" has been saved into a few custom morphs especially for this character. Parents with such specific custom morphs are not really suited for child generation since there is only 1 or 2 "genes" which decide the look, namely the custom morph. If you generate a child from such a parent, you either copy the whole look (if the morph was randomly chosen for your child), or lose the whole look (if the morph was not randomly chosen for your child). Long story short: try to use parents with a total amount of morphs, larger than say, 100. You can do that by looking at the Morph information when you load your parents.
How does your program work?
Thanks for asking! In a nutshell it works like this.
- Load two appearances.
- Extract all morphs from each appearance.
- Depending on if you use a treshold, keep all these morphs, or remove those morphs which have an absolute value below the set treshold.
- Combine all remaining morphs of both appearances into a single list.
- Remove all duplicate morphs from this list.
- Keep adding morphs from this list to both appearances, until both appearances contain all the morphs in the list from the above step.
- If a morph is new for an appearance (because it originally came from the other appearance), set it 0.
- Now we do crossover: create the morphs for the child, by looping through all the available morphs in the list from (5) and randomly copying the values from this morph from either parent 1 or parent 2.
- After that, apply mutation: this is a non uniform mutation. This link explains how it works https://www.geeksforgeeks.org/mutation-algorithms-for-real-valued-parameters-ga/. Very simply put, you choose one morph at random and change its number while making sure the random chosen number stays between 0.0 and 1.0. By the way, b = 0.5 is used as a parameter.
- Choose the appearance either from parent 1 or parent 2 (depending on the choice for "parent template" by the user).
- Overwrite the morphs from that appearance by the generated morphs for the child.
- Save the new child appearance.
Hah! If you would look at the code, you would know the answer. Which is: no.
Why don't you release this as a var package?
I would, if I could. But I can't program anything in C# (yet?). So at this point I have no clue how I would go about doing this in C#. If someone would like to pick this up and convert it to .var, be my guest! Otherwise, you might wait for me to do it myself once I learned to work in C#. If people are willing to help me do this by answering some C# questions here and there, let me know.
Can I help you, or give feedback on your code?
Yes, please. I'd love to improve my coding skills. Check out my github.