Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

Discussion in 'Assets and Asset Store' started by FernandoRibeiro, Dec 24, 2013.

  1. philvanzu

    philvanzu

    Joined:
    Oct 14, 2012
    Posts:
    6
    When you create your avatar, add a listener to the CharacterCreated event
    Code (CSharp):
    1. _umaDynamicAvatar.CharacterCreated.AddListener(OnUmaCreated);
    then in your handler you can disable the animator root motion
    Code (CSharp):
    1.     public void OnUmaCreated(UMAData data)
    2.     {
    3.         data.gameObject.GetComponent<Animator>().applyRootMotion = false;
    4.    }
    I believe that should do the trick
     
  2. silentneedle

    silentneedle

    Joined:
    Mar 14, 2013
    Posts:
    280
    Is it possible to use custom shaders (e.g. UBER) with UMA?
     
  3. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Sure - After you've created a material and assigned the shader, then you create a UMAMaterial, and assign that to the slots/overlays.
     
    silentneedle likes this.
  4. silentneedle

    silentneedle

    Joined:
    Mar 14, 2013
    Posts:
    280
    Thanks, that works. :) Haven't thought that this is so easy.
     
  5. philvanzu

    philvanzu

    Joined:
    Oct 14, 2012
    Posts:
    6
    I just switched to the 5.3 branch and the expression player no longer conflicts with my DNA apparently. good.
     
    hopeful likes this.
  6. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    The 5.3 branch is the recommended for new development, its much more stable than the asset store version or the master branch.
     
    hopeful likes this.
  7. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I think it's too early to claim it is more stable... faster, prettier and with fewer KNOWN bugs!
     
  8. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Well, i claim it anyways since its probably true : p
    And thats why i said for new development only : )
     
  9. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Hi,

    I have problem with animator and it's method OptimizeTransformHierarchy. After use of this method I am getting this error all the time: "Bones do not match bindpose" and the character is no longer animated. It just stands in T-pose and it's scale is reduced from 2 to 1. Is there a solution how to fix this?
     
  10. dudedude123

    dudedude123

    Joined:
    Aug 24, 2013
    Posts:
    128
    There's compiler errors when I build for Windows
     
  11. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Don't keep us in suspense - what are they?
     
    Teila likes this.
  12. smd863

    smd863

    Joined:
    Jan 26, 2014
    Posts:
    292
    I've actually started adding blend shapes into UMA again. I've looked into it before, but it was a huge pain before 5.3 when Unity added API to directly access the blend shape frame data. This is the UMA guy (my skinnier version), and a very rough "muscularity" blend shape I added for testing.

    UMABlendShape.jpg

    I have it driven by the DNA converter which simply calls something like "umaData.SetBlendShape("Muscularity", (umaDna.muscularity - 0.5f) * 4.0f)". I am just baking them in with the mesh combiner so the final UMA doesn't use any more memory (though then you can't change them without re-baking the entire mesh).

    The blend shape seems to work fine with all the UMA bones, and I think they actually compliment each other pretty well. A blend shape can sculpt out lots of subtle muscles or fat deposits all over the entire body that even dozens of weighted bones would have trouble capturing. And you will always need weighted adjustment bones for the proportions, overall mass, and little tweaks (especially rotations).

    Just wanted to post about it to let people know it is certainly possible, and I'd like to look into adding it to UMA especially if there is a lot of interest in it. Probably after the newer 5.3 version is finalized. For now I will keep playing with it and see what kind of results I can get with some more careful and thoughtful modeling.
     
    Last edited: Jun 12, 2016
    Jaimi and hopeful like this.
  13. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    You just made my day!
     
  14. SamOatesGames

    SamOatesGames

    Joined:
    May 16, 2013
    Posts:
    6
    Hello,

    I'm trying to generate per bone collision meshes for a generated UMA.
    I currently have my code being able to generate the required meshes, however they are positioned incorrectly.

    I can't seem to get the verts into bone space.
    I'm using the following code...

    Code (CSharp):
    1.     private List<Vector3> TransformVerts(List<Vector3> sourceVerts, Transform boneTransform, Transform rootModelTransform)
    2.     {
    3.         var transformedVerts = new List<Vector3>();
    4.         foreach (var vert in sourceVerts)
    5.         {
    6.             var worldSpacePosition = rootModelTransform.TransformPoint(vert);
    7.             var boneSpacePosition = boneTransform.InverseTransformPoint(worldSpacePosition);
    8.             transformedVerts.Add(boneSpacePosition);
    9.         }
    10.         return transformedVerts;
    11.     }
    but the collision meshes are offset, e.g. (just the eyes for simplicity)



    Any ideas what I'm doing wrong?

    Thanks,
    Sam.
     
  15. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Looks awesome! If you are interested in adding it to UMA either as a separate asset or integrated into UMA core, feel free to hit us up on skype : )
     
  16. jrhee

    jrhee

    Joined:
    Dec 5, 2013
    Posts:
    74
    Hey guys,

    I just uploaded a big devlog post on the stuff I'm doing with UMA. It's been super valuable for me, so just wanted to say thanks to Fernando and team for the awesome work!





     
    Moerk75, Jaimi, ecurtz and 3 others like this.
  17. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Wow, looks really good!
     
  18. dudedude123

    dudedude123

    Joined:
    Aug 24, 2013
    Posts:
    128
    I didn't ask for friggin sarcasm, I asked is there a way to fix this?

     
  19. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    There's no "friggin sarcasm". If you want help on error messages, you need to post them. A video of the error isn't really helpful. Just copy them to the clipboard and post them in the message.
     
    Teila likes this.
  20. dudedude123

    dudedude123

    Joined:
    Aug 24, 2013
    Posts:
    128
    I keep having these compiler errors after I tried to build the game

    Assets/Standard Assets/UMA/Core/Scripts/UMAContext.cs(13,16): error CS0246: The type or namespace name `SlotLibrary' could not be found. Are you missing a using directive or an assembly reference?

    Assets/Standard Assets/UMA/Core/Scripts/UMAContext.cs(11,16): error CS0246: The type or namespace name `RaceLibrary' could not be found. Are you missing a using directive or an assembly reference?

    Assets/Standard Assets/UMA/Core/Scripts/UMAAssetCollection.cs(13,145): error CS0246: The type or namespace name `UMACrowd' could not be found. Are you missing a using directive or an assembly reference?

    Assets/Standard Assets/UMA/Core/Scripts/UMAAssetCollection.cs(11,24): error CS0246: The type or namespace name `UMACrowdRandomSet' could not be found. Are you missing a using directive or an assembly reference?

    Assets/Standard Assets/UMA/Core/Scripts/UMAContext.cs(15,16): error CS0246: The type or namespace name `OverlayLibrary' could not be found. Are you missing a using directive or an assembly reference?

    Assets/Standard Assets/UMA/Core/Scripts/UMADynamicAvatar.cs(5,7): error CS0246: The type or namespace name `LitJson' could not be found. Are you missing a using directive or an assembly reference?
     
  21. Hedonsoft

    Hedonsoft

    Joined:
    Jul 11, 2012
    Posts:
    168
    Hey everyone. How are people handling things like weapon pick ups? I understand that you need to apply offset to things the uma holds but doesn't this depend on scale?
     
  22. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    As long as you set the hand as parent and set the offset as a localPosition that will be scaled similarly to the hand. ;)
     
  23. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Clearly you don't have all of UMA in there, it's missing files/and libraries, try to reimport.
     
  24. silentneedle

    silentneedle

    Joined:
    Mar 14, 2013
    Posts:
    280
    I currently have a problem with the body mass of my generated character. When setting up the body parts (slots) manually in the editor the model looks like how it should be, but after generating the slots with uma, the model looks skinny. Shouldn't look the generated model identically when all DNA is set to 0.5?
     
  25. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    No
     
  26. silentneedle

    silentneedle

    Joined:
    Mar 14, 2013
    Posts:
    280
    Okay, is there any way to retain the original model proportions?
     
  27. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You'll need to adjust the DNA parameters. DNA parameters pass through a DNA Converter (for example: HumanFemaleDNAconvertBehaviour) that can basically do whatever it wants to the bones. You could in theory look through this to determine what to set to give you the results you want, but I recommend just adjusting the DNA yourself while eyeballing it, and saving a recipe off as the base.
     
  28. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    Any news on this problem? I have tested dozens of 3D characters and "Optimize Transform Hierarchy" in animator always worked, but I wasn't able to do that with uma character. I have also tried exporting/saving uma character using power tools, to make it independet on uma, but I'm still getting the same error.
     
  29. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Have you tried the version in GIT? The animatorTest_b branch has changed the way the animator is updated.
     
  30. PerunCreative

    PerunCreative

    Joined:
    Nov 2, 2015
    Posts:
    113
    AnimatorTest_b branch didn't help. Same problem :(
     
  31. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I tested it a long time ago and back then the Optimize Transform Hierarchy had strict rules to the scaling of the bones. Since we do a lot of bone scaling my conclusion back then was that it was unlikely to ever work. In theory I believe I could make the power tools compatible with this setting since it's already reskinning on the fly. But it would be a lot of work and not something on my active to do list.
     
  32. MikeyUchiha

    MikeyUchiha

    Joined:
    Jan 8, 2011
    Posts:
    109
    You keep mentioning power tools. What are you referring to?
     
  33. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
  34. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Just to clarify uma at it's core cannot work with Optimize Transform Hierarchy. This is not likely to change!

    The power tools cut away much of the expensive animation and skinning cost of UMA. It does this by reskinning the mesh to a simplified skeleton, while doing that I could make the simplified skeleton comply with the rules of Optimize Transform Hierarchy and gain that benefit on top.

    I'm working on a 2.1 version of the Power Tools that will be launched together with UMA 2.1 and made vast improvements on the character creation time so that it is now virtually identical with regular UMA! (roughly 4% slower, so 4.3ms rather than 4.1ms).
     
  35. callumhutchy

    callumhutchy

    Joined:
    Feb 6, 2014
    Posts:
    4
    I've been attempting to store my characters that I generate on a MySQL server and then retrieving them with WWW and PHP. The text gets retrieved successfully (I think) but when it get passed to turn it into an actual recipe it throws an error.

    JsonException: Invalid character 'h' in input string
    LitJson.Lexer.NextToken ()
    LitJson.JsonReader.ReadToken ()
    LitJson.JsonReader.Read ()
    LitJson.JsonMapper.ReadValue (System.Type inst_type, LitJson.JsonReader reader)
    LitJson.JsonMapper.ReadValue (System.Type inst_type, LitJson.JsonReader reader)
    LitJson.JsonMapper.ReadValue (System.Type inst_type, LitJson.JsonReader reader)
    LitJson.JsonMapper.ReadValue (System.Type inst_type, LitJson.JsonReader reader)
    LitJson.JsonMapper.ToObject[UMAPackRecipe] (System.String json)
    UMATextRecipe.PackedLoad (.UMAContext context) (at Assets/UMA/Example/Scripts/UMATextRecipe.cs:27)
    UMAPackedRecipeBase.Load (UMA.UMARecipe umaRecipe, .UMAContext context) (at Assets/UMA/Example/Scripts/UMAPackedRecipeBase.cs:19)
    UMAAvatarBase.Load (.UMARecipeBase umaRecipe, .UMARecipeBase[] umaAdditionalRecipes) (at Assets/Standard Assets/UMA/Core/Scripts/UMAAvatarBase.cs:102)
    UMAAvatarBase.Load (.UMARecipeBase umaRecipe) (at Assets/Standard Assets/UMA/Core/Scripts/UMAAvatarBase.cs:84)
    CharacterSelect.Load (System.String file) (at Assets/Scripts/CharacterSelect.cs:143)
    CharacterSelectButton.OnClick () (at Assets/Scripts/CharacterSelectButton.cs:20)
    UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:153)
    UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:630)
    UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:765)
    UnityEngine.Events.UnityEvent.Invoke () (at C:/buildslave/unity/build/Runtime/Export/UnityEvent_0.cs:53)
    UnityEngine.UI.Button.Press () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:35)
    UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:44)
    UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:52)
    UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData,

    What's confusing is, before I started messing with database storing I stored it just as a text file (following SecretAnorak's guide) and it worked fine. I read up about the max size of a string and whether that is a problem and it doesn't appear to be a problem, it's weird why it say 'h'. I guess half way through parsing the string it gets stuck on one of the 'h's. Ive tried saving the downloaded text to a txt file and it still doesn't work, so its something to do with uploading and downloading from the database. Im saving the text in a LONGTEXT attribute and just echoing back the result.

    Any ideas?
     
  36. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You should compare before and after strings, make sure they are the same. You are pulling them through the web, it's possible something is escaping them, or assuming they are escaped (when they're not). also verify that the character set you have specified for the column supports the characters you are storing:

    http://dev.mysql.com/doc/refman/5.7/en/charset.html

     
  37. callumhutchy

    callumhutchy

    Joined:
    Feb 6, 2014
    Posts:
    4
    Ok, ive discovered that it's the backslashes in the original string, when this is uploaded to MySql the backslashes are removed. So I need to make a method to add an extra backslash into the string everywhere there is a backslash so that it is escaped.

    Edit: Just used Regex.Replace(str, @"\\", @"\\");
    This gets sent to the database with a single backslash, and is retrieved with a single backslash.
     
    Last edited: Jun 17, 2016
    hopeful likes this.
  38. smd863

    smd863

    Joined:
    Jan 26, 2014
    Posts:
    292
    Just thought I'd post a quick update about the blend shapes I've been working on. So far, I'm pretty happy with them. Using an "average male" as my base I found I need at least 4 blend shapes to get some good variety: fatness, skinniness, muscularity, and femaleness. On top of those, I can use all the regular UMA bone adjustments to get different proportions:

    UMA_BlendShapes.jpg

    For full body characteristics, I think the blend shapes make it easier to build up realistic muscle and fat that isn't really practical using only bones. Of course, each piece of clothing will need to be adjusted to each base mesh, but then it will work for both genders of multiple character types. It's also important to really finalize the base meshes before making too many clothes/props because they will be difficult to change later.

    I will probably reach out to the UMA guys in a bit when I have some time, and maybe we can add blend shapes to UMA core. It shouldn't add an overhead for people who aren't using them, and the only "breaking" change I had to make was adding a null check for the skeleton in the DNA converter because the skeleton won't always be initializes when it is called anymore.

    For now I want to test out clothing, play around with animation, and see how everything is working.
     
    Gnurro, Moerk75 and hopeful like this.
  39. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Looks awesome! Adding this to the core would make uma a lot more flexible : )
     
  40. smd863

    smd863

    Joined:
    Jan 26, 2014
    Posts:
    292
    Thanks! Hopefully no big problems will crop up with blend shapes. One more tool can always be useful!

    I had a quick question for anyone using Mixamo animations with UMA: is there any trick to get them to work? I uploaded my base mesh with the default UMA skeleton, added a jogging animation to it, and it looks okay on the website. However, I get a few problems in Unity: a crooked foot, a pointed finger, and everything just looks a bit off. I exported it as a FBX for Unity, and imported it as a Humanoid and generated an avatar from the FBX. The example UMA animations from the Unity dude all seem to work okay, but the Mixamo ones get a big mangled somehow. I can't see any obvious problems with the settings so I was just going to poke at random stuff for a while unless anyone had any suggestions?

    Mixamo_Animation.jpg

    Edit: Doesn't work on the uploaded version of my base mesh either, but does seem to work if I download the base mesh from the Mixamo site. The upload processing changes the bones somehow?
     
    Last edited: Jun 20, 2016
    Gnurro likes this.
  41. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    I also have issues with the Mixamo animations and have not found a good solution for that : /
     
  42. philvanzu

    philvanzu

    Joined:
    Oct 14, 2012
    Posts:
    6
    I'm trying to figure out how to build poses for an expression set with the "UMA bone pose builder" tool in the UMA menu. I've got an FBX containing the UMA skeleton and an animation sequence with all the expressions I want in my Expression set. The rig is set to Animation type : Generic, Avatar Definition : build from this..., Root node : none...

    I imagine the animation sequence should go in the Animation Source / Pose Animation field, but what are the Rig Prefab and the Rig Source / Pose Rig transform that are expected by the build pose tool and how do you build them, what components do they need, should they be instanced in a scene or reside as asset prefabs somewhere ?.
     
  43. philvanzu

    philvanzu

    Joined:
    Oct 14, 2012
    Posts:
    6
    Ok nevermind I figured it out.
     
  44. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Mixamo works for our UMA characters.

    First, upload the unified Male from the UMA content package available on the Wiki to Mixamo. Do not replace the rig or anything like that. Just upload and use him in your animation window.

    Then choose your animations, add them to the pack. Add to the My Animations page and refresh page. Download choosing skin and Unity fbx. Make sure it is set to T-Pose.

    If that doesn't work you can try this after you have the animation in your editor.

    Go to animation in the import inspector for the animation.
    Choose copy avatar from UMA character.
    Hit apply.
    Click the update button.
    Hit apply again.

    I was able to get them to work without the second step but Ryan had to use the copy avatar. I think his were not attached to the skins.

    Also, it might help to use the following settings on the animation.
    Root Rotation unchecked
    Root Transform Y check original
    Root Transform ZX check original.

    Hope this helps. BTW, if you downloaded the huge pack from somewhere on the net that someone posted...I can't get those to work either. :)
     
    mtornio, hopeful and TeagansDad like this.
  45. smd863

    smd863

    Joined:
    Jan 26, 2014
    Posts:
    292
    Thanks! I went through all the steps again and it seems to be working now. And now I can't tell where exactly I messed it up, but I may have easily mis-clicked on something. I have a few too many ambiguously-named UMA base models for my own good right now.

    I'm glad that's working. I just discovered recently that my Adobe ID gives me free access to a couple thousand animations so that's handy!
     
    hopeful and Teila like this.
  46. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Yay! Glad to hear it is working. :)
     
  47. GeneralDaedalus

    GeneralDaedalus

    Joined:
    Jun 22, 2016
    Posts:
    1
    Hi everyone :)

    I am working on a mixed character controller which is almost finished apart from some clipping issues I'm having. I have a setup where the camera physically transitions between first and third person positions, and it looks really good apart from the fact that you can see the head unless I clip down to the neck using the camera's near clipping plane. However this then clips other animations (such as taking a drink) and there's really no way to do it with an overdraw camera because of our multiplayer setup. I was hoping that somebody might know about splitting a rendered UMA- if I can separate the head then I can simply switch it's layer based on whether or not the player is in first person, and prevent the camera from rendering the head when in first person. This way I will still be able to have objects in view when up close to the camera.

    Please let me know if you have any ideas! Thanks!
     
  48. jrhee

    jrhee

    Joined:
    Dec 5, 2013
    Posts:
    74
    It looks like non-deform bones and bones without any weights assigned are not being generated with my UMA skeleton. Is there a way to force these bones to be generated? I need non-deform bones for things like held objects where I'm parenting instead of assigning weights.
     
  49. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You could regenerate the character without a head on the fly. Not sure this will work out ell in the end, especially if you look down.

     
  50. silentneedle

    silentneedle

    Joined:
    Mar 14, 2013
    Posts:
    280
    Is there anything to consider when upgrading to the unity53 branch? So far anything works fine, I just had to switch some legacy materials to the new ones, but I just want to make sure I don't miss something.