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?
  1. 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).
  2. Click on the appearance you want to load.
  3. Do the same for the right silhouette.
  4. Now the "Generate Child" button will become green, click on it.
  5. Congratulations! You now have a beautiful "Child" of both parent appearances (left and right).
You can find the Child appearance card in the last folder you used when loading an appearance. It is named Preset_Child.vap and it has a fancy generic "VAM Character Fusion Child" thumbnail.

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.
  1. Load two appearances.
  2. Extract all morphs from each appearance.
  3. Depending on if you use a treshold, keep all these morphs, or remove those morphs which have an absolute value below the set treshold.
  4. Combine all remaining morphs of both appearances into a single list.
  5. Remove all duplicate morphs from this list.
  6. Keep adding morphs from this list to both appearances, until both appearances contain all the morphs in the list from the above step.
  7. If a morph is new for an appearance (because it originally came from the other appearance), set it 0.
  8. 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.
  9. 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.
  10. Choose the appearance either from parent 1 or parent 2 (depending on the choice for "parent template" by the user).
  11. Overwrite the morphs from that appearance by the generated morphs for the child.
  12. Save the new child appearance.
Are you a professional coder?
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.
Author
pinosante
Downloads
3,781
Views
16,297
Version
v1.0.0
First release
Last update
Rating
5.00 star(s) 7 ratings

More resources from pinosante

Latest reviews

Such a novel idea!
pinosante
pinosante
Thanks for the kind words!
Upvote 0
1111111111111
Upvote 0
Amazing, regardless of its kinks a thousand thank yous for even making this. A character fusion function was the #1 thing I wanted in VAM.
pinosante
pinosante
Glad you feel that way, I had the same feeling. Personally I don't really like tweaking 100's of morphs to get the perfect character, so this helps a ton.
Upvote 0
Cool little tool.Thanks!
Feedback:
I agree, it's bit hit & miss, especially when fusing presets with clothes (and custom textures).Hard to notice diferences right away.
But as you said it only takes template from 1 parent preset.

So definetly wanna use this with naked presets, maybe without textures (or same textures applied).To speedup process and see changes more easily.
Other than that it does what it suppose to, and way better than morphMixer (without those low 0.00001 morphs).
Result is good foundation preset to build upon.

Suggestion:
-add sometype of overal ratio to have more control over it (maybe fuse 25-75%, 50-50, 80-20...etc), with value limit applied
-maybe add options to not use (remove) clothing or custom textures, as optional
pinosante
pinosante
Thanks for the feedback, much appreciated. Personally I always use models without clothing for this purpose, but I agree that a setting would be nice. I'll look into adding a setting which allows to load a default clothing set. For me that clothing set would only be the Real Enhanced eyes clothing and nothing else. The other suggestion 25-75%, etc. splits between the two parent's is an interesting suggestion and quite easily added. I'll also look into that. Thanks again for thinking with me on the app.
Upvote 0
I had more misses than hits, but the hits were amazing. I have a new favorite look created by mixing two other favorites that differed quite a lot from one another.
pinosante
pinosante
Very glad to hear that the hits were amazing and that it resulted in a new favorite look. That makes me happy! I agree that the process is kind of hit or miss. But for me it's also part of a fun, kind of a beautiful girl gacha. Anyway, thanks for your kind review!
Upvote 0
Thanks for making this! I really appreciate that you made it open source as well. Any tools that help create variety with VAM looks is awesome.
pinosante
pinosante
Thank you for your kind words!
Upvote 0
Excellent.....
pinosante
pinosante
Thanks!
Upvote 0
Back
Top Bottom