Search Unity

procedural character generation

Discussion in 'Works In Progress' started by FernandoRibeiro, Oct 5, 2012.

Thread Status:
Not open for further replies.
  1. gryff

    gryff

    Joined:
    Apr 17, 2012
    Posts:
    360
    Thanks Fernando for the upload - though I'm not sure I would call myself a "content creator"

    Anyway, I wanted to give your SL->UMA a slightly more severe test than the one you showed in your video - the normal skins are basically all the same colour - which could cover up mismatching. So instead of using a skin, I used a skin template that was regularly used - and probably still is - to create avatar skins in SL.

    Results in the two images below. The coloured areas represent seams, attachment points etc. The mesh "quads" you see (different sizes for each area bottom, top, head) come from the SL template.

    Seemed to work rather well

    cheers, gryff
     

    Attached Files:

  2. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Yay =D I though using the templates would scare some people Hehehe =D
     
  3. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hey guys! I´m just doing some final changes on code to upload it!
    I´ll provide an 1.0.1.0 RC1 today.

    Joen identified a bug on SkinnedMeshCombiner that will be listed on known bugs, and might probably be handled for official Asset Store pack.

    For people using the ContentCreator pack, please wait to test the resulting content on 1.0.1.0 RC1, as 1.0.0.6b base meshes were different.

    Cheers! =D
     
  4. gryff

    gryff

    Joined:
    Apr 17, 2012
    Posts:
    360
    LOL. First thing I thought of when I saw your video - I want to try that with SL templates. That was why I was so keen to get the T-Pose version of the UMA model.

    cheers, gryff :)
     
  5. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    BTW probably this question had answered... UMA support any-ledges (more than 2) characters? cow, dogs, kraken etc.

    and u planned anytime support blend shapes ? (i think it can allow remove some rigs in some situation) i know its very hard so i ask ANYTIME
     
    Last edited: Oct 21, 2013
  6. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    UMA can handle any kind of avatar, the real challenge is getting animations for those :)
    About blend shapes, I really can´t tell for sure how this would be integrated. Most likely we would have an UMA avatar handling the body and the head being a separated mesh with correct vertex index for Blend shapes.
    I provide enough bones on head for facial animation, but I understand the benefits of Blend Shapes :)

     
  7. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Last edited: Oct 22, 2013
  8. Venged

    Venged

    Joined:
    Oct 24, 2010
    Posts:
    500
    @FernandoRibeiro Thank you this asset is great! How do we compensate you?
     
  9. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hi there!
    No need to compensate! :) Same I told to @KrisToe4 applies: I´m supper happy to provide this to the community! Consider helping improving UMA even further if you´re a coder or an artist, as a way to help both me and community : ))
    I´ve just uploaded the 1.0.1.0 RC1, now it´s possible to test any content on this version.
    Cheers
     
  10. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
  11. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    Congratulations : D
    Importing now, thats a lot of files! : p

    Read somewhere there was functionality to Instantiate characters through the network, any documentation on that?
     
  12. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    It´s very simple in fact, just take a look how I save/load avatars. I´m still updating documentation on free time.
     
  13. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
     
    Last edited: Oct 22, 2013
  14. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    Thanx, you are awesome : D
     
  15. jzela

    jzela

    Joined:
    Mar 2, 2013
    Posts:
    68
    Thank you!
     
  16. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,262
    Does this mean 4.3 is out ;) or really near?
    Sorry, could not resist

    But love the UMa idear and think about using it with zbrush :)
     
  17. gryff

    gryff

    Joined:
    Apr 17, 2012
    Posts:
    360
    From the description of the Content Pack on the download page:

    Fernando, I have watched your series of videos on creating clothing for the rigged character. Those videos show T-Shirt creation essentially by duplicating part of the character mesh you provide, then scaling it slightly. As you describe in the video the simplest way to create clothing is to:

    What is the licence agreement for this piece of copied mesh? Infact, what is the licence agreement for the rig too - if I was to add a bone (to the hand for example to connect to a weapon)?

    cheers, gryff :)
     
  18. Venged

    Venged

    Joined:
    Oct 24, 2010
    Posts:
    500
    @FernandoRibeiro

    Is there a video or thread with advice regarding replacing the UMA female and or male mesh with my own. I already rigg in Blender. Is there anything I need to know beyond rigging and weight painting?

    Could I take advantage of the weight transfer tool? I did not know about that blender .py script until I read your documentation.

    My character does not have teeth and a tongue so I was going to copy that from the UMA base mesh and add it to mine as well.



    Thanks
     
  19. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    =DDD
     
  20. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hehehe =D Have no idea about 4.3 release. there are some small adjusts that will only be possible on 4.3, but Joen already left everything ready for when it´s available.

    Zbrush is very good for creating content for UMA, hope you have fun!
     
  21. cynel

    cynel

    Joined:
    Apr 18, 2012
    Posts:
    734
    well hers the problem i cant afford Zbrush.
     
  22. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    All project, including files on the content pack, will be available at GitHub under MIT License. I believe this is one of the most flexible licenses we could provide. (You guys need to thank Unity for that :) )
    I might not be able to Include the ZTL files there, still need to confirm.
     
  23. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Some of you guys have been asking me about using different base meshes. It´s possible, and some projects have already done that. I personally don´t recommend that, because it´s probably that you end up losing compatibility with the assets made for default base meshes.

    I´ll record some tutorials about how to handle that on future, but I´ll need some time and feedback from the Release before that.

    "Could I take advantage of the weight transfer tool? I did not know about that blender .py script until I read your documentation."-> I´ve spent LOTS of hours on the rig and skinning data, so i would be happy if those can help you :)
    "My character does not have teeth and a tongue so I was going to copy that from the UMA base mesh and add it to mine as well."-> Hehehe, that remembers me of this image from bizarre galery =D
     
  24. gryff

    gryff

    Joined:
    Apr 17, 2012
    Posts:
    360
    Fernando: the MIT licence talks about:

    So it maybe:

    "Software" may cover all your scripts and doc files - but does it include the meshes?

    To me that is not immeadiately obvious :confused:

    cheers, gryff :)
     
  25. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    To be very sincere, I have no previews experience with those licenses. I´ll need to check with Caitlyn and Joen.
     
  26. jzela

    jzela

    Joined:
    Mar 2, 2013
    Posts:
    68
    I didn't see this question asked anywhere (I apologize if I missed it), so I figured I'd ask. Is there any solution for incorporating cloth simulation into UMA? Is it possible?
     
  27. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    This: http://docs.unity3d.com/Documentation/Components/class-InteractiveCloth.html might be only viable for capes.
    and this: http://docs.unity3d.com/Documentation/Components/class-SkinnedCloth.html is probably the best approach.
    SkinnedCloth should be a applied to a separated mesh (easy part) and ideally all cloth pieces would have to be combined for optimization (tricky one). :)
    Cheers!
     
  28. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    Playing around with this and its really nice and powerful!

    One small thing i noticed though is that the bounding box and colliders don't seem to very accurate?

    Edit: Another question, is there a way to reliably change the color of a character regardless of gender or overlay used? Right now im using: "umaData.umaRecipe.slotDataList[1].SetOverlayColor"
    But thats dependant on what overlay is used an also what gender. Or just regardless of overlay would be great.
     
    Last edited: Oct 24, 2013
  29. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    I just gave an very brief example about updating collider, but I take each project requires it's own collision setup.

    About color of a character, are you talking about the avatar skin? after avatar creation, you can access the SlotList on UMARecipe and change it's overlays color to any values, just need to trigger updating atlas/mesh and dirty()

    cheers
     
  30. em3plum

    em3plum

    Joined:
    Oct 14, 2013
    Posts:
    10
    does UMA come with animations
     
  31. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    UMA comes with the sample Mecanim animations that you can try out in the demo scene.
     
  32. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Thanks :)
     
  33. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    Yes, im talking about skin color. If i access the SlotList and change the overlays color i need to know what overlay im using at this particular character right? No way of "just" changing the skin color independently of what overlays currently used? And same for the hair, i have have as an example 10 different hair colors, i need to go through all of those until i find what hair is currently used and then change that or always just change all the hair overlays.

    Cant wait until content starts to show up for this, would be nice with a hair/facial hair package : D

    Edit: I guess the main issue here is that its no way to separate different types of overlays. Like if i want to know if one overlay in the list is a hair overlay, i have to do a string comparison against all my hair overlays in the library that i also have to add manually to the comparison. There is a big need for some kind of overlayType enum or something so i can just do:
    Code (csharp):
    1.  
    2. InstantiateOverlay("FemaleShortHair01", skinColor, OVERLAY_HAIR)
    3.  
    4. if(umaData.umaRecipe.slotDataList[1].overlayList[i].Type == OVERLAY_HAIR)
    5.  
    This would help both with changing colors, changing a specific overlay like hair and other stuff.
    Maybe im just missing something here?

    Edit2: More rantings : D

    Related to my previous edit, i think something like that would help a lot, and this is my current implementation of it:
    OverlayData
    Code (csharp):
    1.  
    2. public class OverlayData : ScriptableObject
    3. {
    4.     public enum Type
    5.     {
    6.         DONT_CARE,
    7.         BODY,
    8.         HAIR,
    9.         BEARD,
    10.     };
    11.    
    12.     public Type overlayType;
    13.  
    OverlayLibrary:
    Code (csharp):
    1.  
    2.     public OverlayData InstantiateOverlay(string name, Color color){
    3.         return InstantiateOverlay(name, color, OverlayData.Type.DONT_CARE);
    4.     }
    5.    
    6.     public OverlayData InstantiateOverlay(string name, Color color, OverlayData.Type type){
    7.         OverlayData source;
    8.         if (!overlayDictionary.TryGetValue(name, out source))
    9.         {
    10.             Debug.LogError("Unable to find " + name);
    11.             return null;
    12.         }else{
    13.             source = source.Duplicate();
    14.             source.color = color;
    15.             source.overlayType = type;
    16.             return source;
    17.         }
    18.     }
    19.  
    And in my character customization code i can do like this:
    Code (csharp):
    1.  
    2.     byte skinColor = sliderControlList[18].actualStepValue;
    3.                
    4.     if(sliderControlList[18].pressed == true)
    5.     {
    6.         List<OverlayData> tmpList = umaData.umaRecipe.slotDataList[1].overlayList;
    7.         int length = tmpList.Count;
    8.         for(int i = 0; i < length; i++) //Head color
    9.         {
    10.             if(tmpList[i].overlayType == OverlayData.Type.BODY)
    11.             {
    12.                 tmpList[i].color = skinColors[skinColor];
    13.             }
    14.         }
    15.        
    16.         tmpList = umaData.umaRecipe.slotDataList[2].overlayList;
    17.         length = tmpList.Count;
    18.         for(int i = 0; i < length; i++) //Body color
    19.         {
    20.             if(tmpList[i].overlayType == OverlayData.Type.BODY)
    21.             {
    22.                 tmpList[i].color = skinColors[skinColor];
    23.             }
    24.         }
    25.     }
    26.  
    This way its independent of any race or overlay, might be a good way, might be bad, i will let you decide on that : p

    Also, any specific reason "slotDataList" is an array and not a List like the "overlayList"?
    With it being an array its not really possible to remove and add slots during runtime in a good way.

    Sorry for all the text and for being this late with feedback, just hope i can contribute to make a awesome product even better : )

    /Victor
     
    Last edited: Oct 25, 2013
  34. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    Also having some trouble with changing hair style, it seem like i need to remove the old slot and overlay first, and then instantiate a new one, but cant really figure out how to do that?

    What i have now is the below, but that just adds in on top of the old slot and that does not look very good : p
    Code (csharp):
    1.  
    2. umaData.umaRecipe.slotDataList[3] = umaData.slotLibrary.InstantiateSlot(femaleHairStyles[hairStyle]);
    3. umaData.umaRecipe.slotDataList[3].overlayList.Add(umaData.overlayLibrary.InstantiateOverlay(femaleHairStyles[hairStyle], hairColors[hairColor], OverlayData.Type.HAIR));
    4.  
     
  35. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Keep in mind UMA can be used on different projects, so defining very specific standards would restrict the final solution, so I´ve left this for user customization.
    About the hair, hair overlay is applied directly on head texture space, to save atlas space. You need to handle the old hair overlay first.
     
  36. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    Of course it should be flexible, that's why i thing the ability to add types for the overlays is a good idea, if you look at the code there is no need at all for the user to specify it if they don't want it.
    In my opinion, the ability to differentiate different overlay types from each other is vital for pretty much anything.

    About the hair, that's exactly what i was asking about, how do i handle the old hair? I cant remove/add slots which i find to be a bit limiting since its an array and not a List as the overlays. Some pointers would be helpful : )
     
    Last edited: Oct 26, 2013
  37. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    The fast answer is: Keep track of the hair overlay index and simply swap it.
     
  38. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    But its not enough to change the overlay only, i also need to change the slot right?
    I got it working for the mails pretty quick because as you said i only have to change overlay. But for the females its trickier since the hair is its own slot.
    Tried this but it wont work:
    Code (csharp):
    1.  
    2. umaData.umaRecipe.slotDataList[3] = umaData.slotLibrary.InstantiateSlot(femaleHairStyles[hairStyle]);
    3. umaData.umaRecipe.slotDataList[3].overlayList.Add(umaData.overlayLibrary.InstantiateOverlay(femaleHairStyles[hairStyle], hairColors[hairColor], OverlayData.Type.HAIR));
    4.  
     
  39. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hey =)

    It didn´t worked because you´re using "overlayList.Add", in this case you would need something like:
    umaData.umaRecipe.slotDataList[3].overlayList[hairOverlayIndexITookNote] = umaData.overlayLibrary.InstantiateOverlay(femaleHairStyles[hairStyle], hairColors[hairColor], OverlayData.Type.HAIR);

    Cheers! =D
     
  40. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    Haha, thanx for your help, but i just cant get this to work : p

    You say that i don't need to change slot, but hair is a mesh and the mesh data is stored in the slot right?
    Or did i misunderstand something completely : p

    Really helpful for all help, i plan on releasing this to the public when im done so it can help others because the current scene is more of a random generator than a customization scene. That way ppl have something that they can build from that has example code for changing most stuff : )
     
  41. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Sorry, I wasn´t clear! You need to exchange both hair slot and the hair specific overlay that had been applied to the head :)
    Great to hear that! You´re going to help a LOT of people with that. Joen example couldn´t be shared because it uses third party libraries on GUI.
    Cheers! =D
     
  42. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,177
    I second that thanks!
     
  43. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    Ok, finally got it, once again saved by the small overlayType addition : p
    Final working solution is:
    Code (csharp):
    1.  
    2. List<OverlayData> tmpList = umaData.umaRecipe.slotDataList[3].overlayList;
    3. int length = tmpList.Count;
    4. if(sliderControlList2[30].pressed == true)
    5. {
    6.     if(umaData.umaRecipe.raceData.raceName == "HumanFemale")  //Only Females have mesh hair in this scene
    7.     {
    8.         for(int i = 0; i < length; i++) //Loop and remove everything thats hair
    9.         {
    10.             if(tmpList[i].overlayType == OverlayData.Type.HAIR)
    11.             {
    12.                 tmpList.RemoveAt(i);
    13.                 length--;
    14.             }
    15.         }
    16.         umaData.umaRecipe.slotDataList[3] = umaData.slotLibrary.InstantiateSlot(femaleHairStyles[hairStyle]);
    17.         umaData.umaRecipe.slotDataList[3].overlayList.Add(umaData.overlayLibrary.InstantiateOverlay(femaleHairStyles[hairStyle], hairColors[hairColor], OverlayData.Type.HAIR));
    18.     }
    19.     else
    20.     {
    21.         umaData.umaRecipe.slotDataList[1].overlayList[1] = umaData.overlayLibrary.InstantiateOverlay(maleHairStyles[hairStyle], hairColors[hairColor], OverlayData.Type.HAIR);
    22.     }
    23. }
    24.  
     
  44. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Great =)
    You might want to get on UMA beta test skype channel, as we will keep it after release.
    please PM me with you skype ID in case you wan´t to be part of the group.
    Cheers


    PS: Same is valid to everyone, if you want to participate the channel, just let me know! :)
     
  45. em3plum

    em3plum

    Joined:
    Oct 14, 2013
    Posts:
    10
    I am going to try to uma for a fps
     
    Last edited: Oct 28, 2013
  46. Leeyuda

    Leeyuda

    Joined:
    Jan 28, 2013
    Posts:
    4
    Hi! Your work looks really amazing, thank you for your contributions!

    I was wondering if you have a web build of UMA up anywhere?
     
  47. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
  48. GD.Darren

    GD.Darren

    Joined:
    Jan 12, 2013
    Posts:
    53
    Will the tutorials still work if there are newer versions of UMA?
     
  49. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Project already received a considerable amount of changes since those tutorials had been recorded.
    The most important ones are listed on releaseNotes document.
    Most concepts still applies, but with time I´ll be updating everything to the latest version. Also, most big changes received their own video logs on youtube :) Cheers
     
  50. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    I watched the tutorials (code ones) and they did give me a good insight before i started working even if some stuff have been changed.
    Looking at the example scene code is also a very good way of understanding whats going on : )
     
Thread Status:
Not open for further replies.
unityunity