Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Should be fixed for 2.0.2 or github checkin 51f169e.
     
    Richardm1985 likes this.
  2. riodespain

    riodespain

    Joined:
    May 10, 2015
    Posts:
    3
    Hello. Please help me.
    I changed Male_Separated and Male_Unified. I exported them as shown in the tutorial on YouTube. Then I created a new slot for the new legs of the character. But there was a problem. What I have done wrong?

    0.png 1.png 2.png
     
  3. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    Try not using anything in the "Seams Mesh" section.
     
  4. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Looks like a skinning error to me. If you bring the model prefab into a scene (pre-UMA, just the regular Unity model) can you rotate the joints?
     
  5. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    Thank you soooooo much! This solved it and everything works fine :)
     
  6. riodespain

    riodespain

    Joined:
    May 10, 2015
    Posts:
    3
    Yes i can 3.png
     
  7. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    Hey guys,

    Just a little bug/conflicting orders with creating a new UMA Material and using Material Builder for overlays.

    UMA Material wants the normal map marked as "Normal" and Material Builder" wants it marked as "Texture".
     
    Last edited: May 13, 2015
  8. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Actually that's not so...
    UMALegacyMaterial doesn't use Unity NormalMaps. That's why you need the MaterialBuilder to construct the right texture channels.
    All other uma materials and shader are likely to use Unity normal maps! (And such you shouldn't use the Legacy Material Builder to construct them but rather just use the Asset/Create UMA Material context menu and the inspector.
     
    Richardm1985 likes this.
  9. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    boysenberry likes this.
  10. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    Sorry Joen, I stated the incorrect facts.

    Here is an image of what I am referring to:

    issue normal maps.png

    Creating a Unity standard shader, it expects the normal map to be marked as "Normal Map" but in the Material Builder it says to set the normal map as "Texture".
     
  11. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    You're using an old version of UMA, please grab the updated version from the Asset Store. :)

    Now there is two windows, Legacy Material Builder and Slot Builder.

    You should never use the Legacy Material Builder for any other shader than the UMA Legacy Shader!
     
  12. Hedonsoft

    Hedonsoft

    Joined:
    Jul 11, 2012
    Posts:
    168
    Now that UFPS suports Photon I want to integrate UFPS with UMA. UFPS uses a full body awareness system that takes a headless, armless body, separate model for arms, and a complete model for third person or other player view. What's the best way to do this? Generate 3 recipes?
     
    boysenberry likes this.
  13. kreston

    kreston

    Joined:
    Sep 3, 2014
    Posts:
    7
    Hello there, i'm using UMA in ipad air 2.
    There are lots of slots and overlays that i'm using. And its taking too much memory (around 600mb THATS HUGE)

    How can i reduce memory consumption in UMA?
     
  14. nosyrbllewe

    nosyrbllewe

    Joined:
    Oct 18, 2012
    Posts:
    182
    Actually, UFPS only uses one mesh. What they do is apply a transparency shader on the arms and head. When in 1st person, the transparency is switched on, but turned back off when switching to 3rd person.
     
    Hedonsoft likes this.
  15. wmesci

    wmesci

    Joined:
    May 15, 2015
    Posts:
    1
    hi
    I run the example scene and found it need 16 or 32MB memory each character
    how can i reduce the memory consumption?
     
  16. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    The uma run-time memory consumption is primarily texture atlasses. In the pbr demo I created I only used atlas resolution scale 1 for characters within four meters, then I used half up till eight meters, a quarter until 16 meters, etc. I kept reducing atlas resolution scale all the way down to 0.03125 !

    Each channel in a 1k texture atlas costs 4mb of memory, and each time you half it the memory usage goes down to a quarter! In addition to saving memory this also serves as an alternative to mipmaps and prevents the textures from becoming noisy at long distances.

    In addition UMA 2 allows you to use tinted textures that are not even atlassed at all this means the textures can be compressed and doesn't have to be instantiated for each character, the down side is that it only supports tinting and not multiple overlays.
     
  17. Hedonsoft

    Hedonsoft

    Joined:
    Jul 11, 2012
    Posts:
    168
    But the first person view with the weapon is a separate arm and weapon model that's positioned roughly where the character's arms with the transparent material are. So a set of arms still needs to be generated separately, right?
     
  18. Hummy_Seed

    Hummy_Seed

    Joined:
    Jan 9, 2015
    Posts:
    6
    @ecurtz I saw on the editing expression clips.txt to contact you. I'm having a problem getting my face animation to work in the expression test Unity scene. I created one with the expression editor scene and it seems to work fine, but after converting to classic animation clip, and testing in the expression test scene, I cant get it to play. Do you know of something I might be doing wrong? They just seem to have an open mouth blank stare and no facial movement. Even using the test scene's default 'converted FSB' clilp is not playing. Maybe I am missing something.
     
  19. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Looks like maybe that example scene was never tested with the latest updates and has a bug in it. I'll fix it and let you know what the issue was.

    EDIT: Looks like the script doesn't expect it to be able to build the character in a single frame so it misses the initialization. A quick work around until it is fixed is to turn off "Fast Generation" on the UMAGenerator object in that scene.
     
    Last edited: May 15, 2015
    hopeful likes this.
  20. Hummy_Seed

    Hummy_Seed

    Joined:
    Jan 9, 2015
    Posts:
    6
    Great! Thanks so much, it looks like that will work for now.
     
  21. Soul_Raven

    Soul_Raven

    Joined:
    Apr 12, 2014
    Posts:
    13
    I know this will seem like a stupid question but how do i change the locomotion script to my own script?
     
  22. h8spaCec4EspUdE

    h8spaCec4EspUdE

    Joined:
    Jan 8, 2015
    Posts:
    9
    Hi, I am learning to create content for UMA and encounter problems. Please help me.
    I am using blender 2.74.

    A. Rig rotation in content creation kit(blender file) differs from UMA2 fbx file
    In the content creation kit, the blender file's male and female rigs have 180 degree rotation in z axis.
    (which turn into 180 degree in y axis after exporting to unity)

    While inside unity5.0 using UMA 2.0, the male and female rig fbx files at path:\\Assets\UMA\Content\UMA\Humanoid\FBX, both have 1.52587 degree rotation in y axis

    When I follow the tutorial using scene 3 slot validation wizard, I
    1. Choose browse>select uma male fbx file(note:the UMA male and UMA female have no response)
    2. Choose the TShirt created following Fernando's tutorial
    then, I encountered the following error


    B. The blender exported mesh is facing opposite to the fbx base mesh in UMA2
    No matter I set forward axis in blender fbx exporter to be +z/-z, both are facing opposite to the fbx files in UMA2.
    I also notice that after setting foward axis to +z for export, the resultant fbx TShirt has a strange y rotation of 8.14222 which is as strange as the 1.52587 existed in the UMA2 fbx files.

    C. I cannot find the material builder for creating overlay. I can only find the slot builder

    I am very confused right now. I was trying to follow the video tutorials provided and make a simpe TShirt as a start. However, it just frustrated me a lot. Please help.
     
    Last edited: May 16, 2015
  23. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    The important thing is that your umaData have the correct animation controller set. All our helper wrappers (Crowd, DynamicAvatar, etc) have an animation controller setting that it will pass on to the umaData.
     
  24. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Are you trying to use the FBX files in Blender? Because Blender's FBX import is still terrible. There are Blender files of the original meshes available as part of the content creation package.
     
  25. h8spaCec4EspUdE

    h8spaCec4EspUdE

    Joined:
    Jan 8, 2015
    Posts:
    9
    Yeah, I was using the blender files following Fernando's video tutorial.
    Then, I encountered the problems A,B,C described above.
    A. Angle discrepancy between blender files and UMA2 fbx base mesh
    B. Opposite facing between blender exported fbx and UMA2 fbx base mesh(same for both +z/-z forward axis export setting)
    C. Missing material builder in unity

    Is the content creation package compatible with UMA2 base mesh?
     
  26. shadowdiver

    shadowdiver

    Joined:
    Aug 18, 2014
    Posts:
    5
    Hi,
    im programming a multiplayer game using uma 2 for player-characters.

    What is the best way to store the uma object in database and/or server-folder?
     
  27. Hummy_Seed

    Hummy_Seed

    Joined:
    Jan 9, 2015
    Posts:
    6
    Hello ecurtz. I have a follow up question to UMA2's face animations. The animations seem to be playing back on the test scene fine now, but I'm getting a console error when testing out clips I created:
    " 'Avatar' AnimationEvent has no function name specified". Any idea what I could be doing wrong? Thanks.
     
  28. jonboris

    jonboris

    Joined:
    Jan 8, 2009
    Posts:
    78
    Hi, I'm using a custom race that I created... but I now need to add in an extra wrist twist bone. I did not include it originally for simplicity but have subsequently discovered the importance of wrist twist...

    Can anyone take me through the procedure for adding bones to a pre-existing race?
     
  29. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    The bones hierarchy is built from the slots meshes hierarchy, so just recreate all slots that reference the arms' child bones (arms/wrists/hands/fingers) once they use the new skeleton hierarchy you're done.
     
  30. jonboris

    jonboris

    Joined:
    Jan 8, 2009
    Posts:
    78
    @UnLogick wow as simple as that? Brilliant - but on the race prefab there is a UMA data component with a list of animated bones - do I have to add the new wrist bones here as well?
     
  31. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Race Prefab? I guess you're using UMA 1x, that complicates things and you also needs to create a new race using a new model with the extra bones.
     
  32. jonboris

    jonboris

    Joined:
    Jan 8, 2009
    Posts:
    78
    @UnLogick right - I upgraded to 2x but I must still have legacy assets in the project. Is there a tutorial for creating races under 2x that you can point me to?
     
  33. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I'm pretty sure the races are reduced to next to nothing. Now you just create them with the inspectors, no real data in there anymore.
     
  34. jonboris

    jonboris

    Joined:
    Jan 8, 2009
    Posts:
    78
  35. shadowdiver

    shadowdiver

    Joined:
    Aug 18, 2014
    Posts:
    5
    No one likes to answer my question?
    Mayby its not clear.

    I like to know what is best way to save a UMA 2 Charakter. Write the data as JSON-string in database or the recipe as asset on server storage.
     
  36. cyby89

    cyby89

    Joined:
    Apr 30, 2014
    Posts:
    35
    I serialize the character to JSON and save them to the database for my game.
     
  37. shadowdiver

    shadowdiver

    Joined:
    Aug 18, 2014
    Posts:
    5
    Fine, thats what i have done before.

    And how do you create a character with that JSON-data on runtime?
    With UMA 1 i have done it with UMACrowd and UMAData. Works that in v2 too?
     
  38. Hummy_Seed

    Hummy_Seed

    Joined:
    Jan 9, 2015
    Posts:
    6
    Hello, I'm getting an error when I try to use the slot builder. ".asset failed." I used to do this all the time in UMA version 1 with the material builder. Any idea what I could be doing wrong?
     
  39. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Sounds like you accidentally added in an event when you were editing the animation: http://answers.unity3d.com/questions/582229/animationevent-has-no-function-name-specified-1.html
     
  40. Teh_Creatorer

    Teh_Creatorer

    Joined:
    May 8, 2014
    Posts:
    5
    Hello.

    I know this might be a very basic question, but how do you Trigger the menu Item: "UMA|Find Missing References" ?

    I in a rush to update characters to unity 5 version from 4.6. We cannot use the old unity version due to technical issues and the power tools won't work with new unity. We don't use old unity to make the prefabs, because we had errors in character normals. Normals would show wrong in character skin, where the x-component has wrong values compared to other textures.
     
  41. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Is there way in UMA 2 to save out prefabs? I used Power Tools with UMA 1 but that doesn't seem to be updated yet for UMA 2. I would like to make a couple of prefabs to use for videos for our game. Thanks.
     
  42. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    It's just a menu item you select. "UMA" is the menu name, and "Find Missing References" is the item name.
     
  43. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    No, you'll have to include the UMA context and libraries and used saved recipes on an UMADynamicAvatar like the Serialized demo scene until Power Tools gets updated.
     
  44. shadowdiver

    shadowdiver

    Joined:
    Aug 18, 2014
    Posts:
    5
    I have created a GameObject for UMAData under UMA and added the script from "StandardAssets/Uma/Core/Scripts". There i get in Inspector the message "UMA Data not loaded."

    In script added to UMA-GameObject i wrote the following Code:

    Code (CSharp):
    1. if (assetData != null && assetData != "{}" && umaAvatar == null) {
    2.     umaAvatar = gameObject.AddComponent<UMADynamicAvatar>();
    3.     umaAvatar.umaGenerator = gameObject.GetComponentInChildren<UMAGenerator>();
    4.     umaAvatar.context = gameObject.GetComponentInChildren<UMAContext>();
    5.     umaAvatar.animationController = (RuntimeAnimatorController)RuntimeAnimatorController.Instantiate(Resources.Load("Locomotion", typeof(RuntimeAnimatorController )));
    6.     umaAvatar.umaData = gameObject.GetComponentInChildren<UMAData>();
    7.     var asset = ScriptableObject.CreateInstance<UMATextRecipe> ();
    8.     asset.recipeString = assetData;
    9.     umaAvatar.Load(asset);
    10.     Destroy (asset);
    11. }
    "assetData" contains the JSON from Database.

    On runtime i get the following two errors:
    The second one Point at the line with "umaAvatar.animationController = ..."

    What is going wrong?
     
  45. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I'm sorry about the delay, I will get it updated soon (tm).
     
    Dreamaster and Teila like this.
  46. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Oooo, I have heard that (tm) before from someone else. :) I trust you though, Unlogick. Thanks.

    I do have power tools so will grab those files. Thank you. Do I just add those into the UMA folder? Sorry, I am the artist, not the programmer. :)
     
    Dreamaster likes this.
  47. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    The SaveCharacterPrefab.cs must be placed in any project folder named "Editor" this ensures that Unity doesn't include them in the actual platform builds. I'd recommend placing the PowerToolsRuntime.cs next to it, but that's not required.
     
    Teila likes this.
  48. SecretAnorak

    SecretAnorak

    Joined:
    Mar 19, 2014
    Posts:
    177
    Hi Guys, I'm after some more help with the new features. I'm not the sharpest tool in the box so bear with me.

    I'm currently putting a video tutorial series together to help people get to grips with generating UMA's straight from code. So far I've got simple generation covered and attaching a freshly made UMA to a custom controller. I'm also hoping to throw in a few slots and overlays of my own. My intention is to share what I have learned on the Wiki.



    My whole tutorial is based on a stripped down version of the legacy UMA crowd code which I'm walking through from scratch. I want to avoid using any prefabs if at all possible. However I've reached a bit of a brick wall trying to include the new expression system.

    I cannot for the life of me work out how to add the additional recipes required for Expressions and Forearm Twist via code. This is my nice simple core method so far:

    Code (CSharp):
    1.  
    2.     public GameObject CreateBasicUMA()
    3.     {
    4.  
    5.         // Create new gameobject and add Uma components
    6.         GameObject GO = new GameObject("MyUMA");
    7.         umaDynamicAvatar = GO.AddComponent<UMADynamicAvatar>();
    8.  
    9.         // Initialise Avatar and grab a reference to its DATA  
    10.         umaDynamicAvatar.Initialize();
    11.         umaData = umaDynamicAvatar.umaData;
    12.    
    13.         // Attach our generator
    14.         umaDynamicAvatar.umaGenerator = generator;
    15.         umaData.umaGenerator = generator;
    16.    
    17.         // Set up Slot Array
    18.         umaData.umaRecipe.slotDataList = new SlotData[20];
    19.    
    20.         // Set up Morph References
    21.         umaDna = new UMADnaHumanoid();
    22.         umaTutorialDna = new UMADnaTutorial();
    23.         umaData.umaRecipe.AddDna(umaDna);
    24.         umaData.umaRecipe.AddDna(umaTutorialDna);
    25.    
    26.         // Process Slots and Overlays
    27.         CreateMale(); //Method to add all slots and overlays to umadata
    28.  
    29.         // attach animator controller
    30.         umaDynamicAvatar.animationController = animationController;
    31.    
    32.         // generate UMA
    33.         umaDynamicAvatar.UpdateNewRace();
    34.         tempUMA = GO.transform;
    35.  
    36.         tempUMA.position = new Vector3(0, 0, 0);
    37.         tempUMA.rotation = Quaternion.identity;
    38.  
    39.         return GO;
    40.     }
    41.  
    I've tried adding a reference to "UMA.PoseTools" and attempted fiddling around with "UMADynamicAvatar.umaAdditionalRecipes" but just can't figure out how to use it.

    If you could point me in the right direction I'd really appreciate it.
     
    Last edited: May 21, 2015
    UnLogick, Dreamaster and hopeful like this.
  49. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Those are both regular components, the recipes are just a convenience method for adding them but not required. If you look in the code those recipes bits use in the "AdditionalSlots" folder you can see what they are doing.

    For instance here's the code which adds the component for the ExpressionSlotScript.
    Code (CSharp):
    1.         public void OnDnaApplied(UMAData umaData)
    2.         {
    3.             var expressionSet = umaData.umaRecipe.raceData.expressionSet;
    4.             if (expressionSet == null)
    5.             {
    6.                 Debug.LogError("Couldn't add Expressions to Race: " + umaData.umaRecipe.raceData.raceName, umaData.gameObject);
    7.                 return;
    8.             }
    9.             var expressionPlayer = umaData.GetComponent<UMAExpressionPlayer>();
    10.             if (expressionPlayer == null)
    11.             {
    12.                 expressionPlayer = umaData.gameObject.AddComponent<UMAExpressionPlayer>();
    13.             }
    14.             expressionPlayer.expressionSet = expressionSet;
    15.             expressionPlayer.umaData = umaData;
    16. #pragma warning disable 618
    17.             umaData.animatedBones = expressionSet.GetAnimatedBones(umaData.skeleton);
    18. #pragma warning restore 618
    19.         }
    20.     }
    21.  
    Edit: Of course since those recipes use slots, there are defined slots that just call this code and you could also just use them when you're adding the other slots to the recipe. If you use umaRecipe.MergeSlot(SlotData slot, bool additional) rather than umaRecipe.SetSlot() you can keep them as "additional" but that basically just means they wouldn't be serialized so it isn't necessary if you don't care about that.
     
    Last edited: May 22, 2015
  50. SecretAnorak

    SecretAnorak

    Joined:
    Mar 19, 2014
    Posts:
    177
    Thanks ecurtz, I'm using a boiled down version of that code (without the checks) but no matter where I use it (before or after generation, the values have no effect on the UMA. I have noticed that blink and saccades do not animate the values like they should either.

    I've tried adding the following code before and after UpdateNewRace() with the same effect:

    Code (CSharp):
    1. var expressionSet = umaData.umaRecipe.raceData.expressionSet;
    2. var expressionPlayer = umaData.gameObject.AddComponent<UMAExpressionPlayer>();
    3. expressionPlayer.expressionSet = expressionSet;
    4. expressionPlayer.umaData = umaData;
    5. umaData.animatedBones = expressionSet.GetAnimatedBones(umaData.skeleton);
    All looks fine, no exceptions, but sliders have no effect...?