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. chaza_li

    chaza_li

    Joined:
    Jan 8, 2018
    Posts:
    29
    Thanks hopeful! I'll try it out! :)
     
    hopeful likes this.
  2. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    130
    @Jaimi

    I think I hit a bug: When I use the bone builder to create my bones, I get two sets of root bones, one under the root gameobject and one under the DynamicCharacterAvatar gameobject. It's like it doesn't recognize it had its bones built.

    It's very easy to fix, though: Unpack your prefab, open your bone builder, drag DynamicCharacterAvatar and build your bones, then redo your prefab.
     
    Last edited: Mar 1, 2019
  3. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    130
    By the way, I'm a bit ashamed to ask this, but I couldn't figure it out while reading the example code and scripts. Can somebody guide me into making a simple class that I can call whenever I want to modify individual DNA values? DNA.Set doesn't seem to exist, anymore. I need something simple, like Avatar.DnaSet("Muscles", value) or something to that effect.
     
  4. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,203
    Dictionary<string, DnaSetter> allDNA = Avatar.GetDNA();

    allDNA["Height"].Set(1.0f);
    allDNA["ChinSize"].Set(0.0f);
    etc.

    You'll need to get the DNA each time after calling BuildCharacter if you cache it.
     
  5. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,203
    OK - I'll put in a bug for it. I think the BoneBuilder thinks that your GameObject with the DCA will be the root.

    Edit: I can't seem to duplicate this. I set the gameobject with the DCA as the "UMA GameObject" in the window, and generate bones, and it generates them under the DCA.
    I place the DCA under a root Game Object, put the object with the DCA in the field, and generate bones, and they all appear under the DCA.
     
    Last edited: Mar 1, 2019
  6. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    130
    This is weird. I can reproduce it allright. Have you tried to make the gameobject a prefab?
     
  7. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,203
    Yeah - this is what I get:

    PrefabObj.jpg

    What steps are you doing to get the behavior?
     
  8. Andrius32

    Andrius32

    Joined:
    Nov 27, 2018
    Posts:
    17
    Hello, i would like to ask, what reason could be that UMA animations not detected by Photon networking? Maybe i could do something about that? P.S. all my movements synchronized and not UMA chars animations as well Synchronizing.
     
  9. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    The only aspect in which UMA, as a runtime character generation approach, can be different from an approach in which characters exist in edit mode, is when the character is in a start up state and has no body generated yet. That's probably where you're running into a difficulty.

    The usual way to resolve such problems is to use the UMA bone builder, which causes the skeleton to exist before the character is generated. When you do this, you are basically starting with a generic character that exists in edit mode, which then at runtime gets modified by a recipe to look like your desired character.
     
    kenamis likes this.
  10. Andrius32

    Andrius32

    Joined:
    Nov 27, 2018
    Posts:
    17
    Now im geting this error :(

    AvatarBuilder 'Player': Transform 'Position' parent 'Global' must be included in the HumanDescription Skeleton
     
  11. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    IIRC, global and position are the first two bones in the UMA skeleton.
     
  12. DankP3

    DankP3

    Joined:
    Jul 17, 2017
    Posts:
    93
    So this works of course, but what then is the 'starting blendshape weight'
     
  13. Andrius32

    Andrius32

    Joined:
    Nov 27, 2018
    Posts:
    17
    Hello, still have problem with animation. Between idle animation is synchronized, but others like move , jump, crouch are not. Using Photon networking and already built bones ( Player avatar is in Animator ). Maybe there is other ways to fix that problem?
     
  14. twospoonstn

    twospoonstn

    Joined:
    Mar 10, 2013
    Posts:
    12
    I've been playing with LWRP, and from what I have seen and read it doesn't work with UMA (It just renders a black texture). The lightmaps and specular maps do work. Does anyone know where to start to fix it? I'm pretty familiar with code in general; I would just like to see if I can even get a simple shader working.

    The single forward rendering yields a huge boost for me for a mobile game.

    Thanks
     
  15. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    It's not an UMA problem. You probably need to share / pass variables in Photon that control the state of animation, so all the players get the state updates for each player.
     
    kenamis likes this.
  16. arteria

    arteria

    Joined:
    May 31, 2007
    Posts:
    2,189
    Jaimi and Firlefanz73 like this.
  17. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,314
  18. Andrius32

    Andrius32

    Joined:
    Nov 27, 2018
    Posts:
    17
    Okay than. If its not UMA problem that means im looking in wrong direction. Thank you :)
     
  19. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    There is a WIP branch on github called "Feature-HDRP". I haven't tested it with LWRP, but it should work and others have reported it working. There are no examples with it and you need to know how to upgrade your Unity Materials, textures, and the UMA materials to convert assets to work with it.
     
  20. twospoonstn

    twospoonstn

    Joined:
    Mar 10, 2013
    Posts:
    12
    Awesome, I'll check it out and let you know how it works with LWRP. I did some digging around and it seems like the issue with LWRP and UMA was setting the render texture on the camera always returned a black texture. There are some mentions of that;

    https://issuetracker.unity3d.com/is...nder-texture-gives-black-screen-only-on-build
     
  21. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    For debugging during development, especially early on, I think it's quite reasonable to have a standard character (like Unity's Ethan) that you can substitute for the UMA and see if the problem remains

    That said, the only UMA-side problems should be the ones that occur at start / awake type phases. And that's why the bone builder mode was created for UMA, as a solution for those problems. After its creation, the generated UMA should behave in animation and physics just like a standard character, because that's what it is.

    As for your character controller, whatever solution you are using, there will be variables that control phases like "is jumping," "is flying," "is in stealth mode," "is swimming," "is climbing," "is doing combat move #1," etc. These will be like events where after receiving input from the client, the server puts the player into a mode and Photon passes this changed variable along to the clients, which then act on it.

    So I think where you're running into problems is in hooking up your character controller to Photon.
     
  22. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    The new version draws the overlay textures straight to a render texture. It doesn't use a camera anymore, which was the issue with SRP. I think that code was a relic anyways from before when render textures were pro only. I don't know if that issue you linked is related or not.
     
    hopeful likes this.
  23. twospoonstn

    twospoonstn

    Joined:
    Mar 10, 2013
    Posts:
    12
    That worked great. This is kind of a silly example (or is it?), where I have 3 real time light points and one directional light.

    This is all done in one render pass, and the tris do not go up when adding point lights. This is a scene with no shadows, but if you did the same example in the regular pipe line you would be looking at 120k tris to get the same effect.

    For the eye lashes I used used LWRP/Lit/Specular/Transparent. They look a lot better than unities regular rendering pipe line.

    For some reason, this uma character loads 3-4 times faster also, not sure why?

    Thank you all, feature-HDRP worked great (so far) with LWRP.

    Versions used:
    - LWRP 4.10
    - Unity 2018.3.6f1
     

    Attached Files:

    kenamis and Jaimi like this.
  24. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    You mean compared to the built-in rendering pipeline? It's the same model/recipe and scene and the only difference is the rendering pipeline?
     
  25. twospoonstn

    twospoonstn

    Joined:
    Mar 10, 2013
    Posts:
    12
    Correct. It loads almost instantaneously with 103 blend shapes. 4096 atlas, not scaled.

    I'll try it on the actual device to see if it still works great.
     
    Last edited: Mar 3, 2019
  26. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,203
    Are you comparing it to the release version of 2.8 or a previous release? 2.8 should have several speed improvements.
     
  27. twospoonstn

    twospoonstn

    Joined:
    Mar 10, 2013
    Posts:
    12
    To 2.8 RC3.
     
  28. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,203
    That explains it - the new converters in the release version are significantly faster than the Dynamic DNA in the release candidates.
     
  29. chaza_li

    chaza_li

    Joined:
    Jan 8, 2018
    Posts:
    29
    Hi there, after upgrading my Unity to 2018.3, the UMARenderer on my GameObjects are no longer generated, anybody facing something similar?
     
  30. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,203
    Have you upgraded to UMA 2.8? That is a requirement for Unity 2018.3
     
  31. chaza_li

    chaza_li

    Joined:
    Jan 8, 2018
    Posts:
    29
    Hi Jaimi!

    Thanks, I have upgraded and it can render the default UMA human.

    However, when I set the recipe for my DynamicCharacterAvatar it says that UMA recipe slot list is empty.

    Is there something I am doing doing wrong? It was working correctly before I upgraded to 2018.3

    Edit : I think there's something with my call for umaData.Dirty(), I called it after LoadFromRecipeString(), is it the right way to do it?
     
    Last edited: Mar 4, 2019
  32. Andrius32

    Andrius32

    Joined:
    Nov 27, 2018
    Posts:
    17
    Hello, maybe anyone could give a link to any documentation page or tutorial: HOW TO IMPLEMENT "UMA" INTO CHARACTER SELECTION. I've been trying alot ways and still geting NULL. one way i've tryed to do that: Becouse i dont want to create seperate script for each character and cuztomizable menus. i created
    GameObject[] characters;
    DynamicCharacters avatar;

    foreach(GameObject character in characters)
    {

    avatar = character;

    }

    other

    for(int i = 0; i < characters.Lenght; i++{

    avatar = characters.GetCOmponent<DynamicCharacters>();
    }
    and this:

    avatar = StaticFunction.FindObjectInChilds(charsHolder , "NPC Models").GetComponentInChildren<DynamicCharacterAvatar>();


    and still NULL;

    other code i which handles DNA i have took from "Secret Anorak" Tutorials.

    And i think i am missing something :)

     

    Attached Files:

    Last edited: Mar 4, 2019
  33. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,203
    With a DynamicCharacterAvatar, you shouldn't ever have to deal with the umaData. You should load your string, and that should build the character. Can you past the code so I can see what you are doing?
     
  34. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    130
    Guys, if some of you come about your Avatar loading with no recipes or no clothes on, check on your UMADynamicCharacterAvatar prefab to see if you have a Uma Recipe loaded. Just remove it and things will work correctly.

    Just a PSA so you don't tear out your nether regions hair in frustration. Like I did.
     
  35. Bartek_Gudowski_Friend_Factory

    Bartek_Gudowski_Friend_Factory

    Joined:
    Feb 18, 2019
    Posts:
    54
    Hi!

    Just wanted to add that @kenamis feature-HDPR branch works great with LWRP. And it works well on iOS mobile with LWRP. A great achievement.

    I am trying to get a exported character prefab from UMA 2.8 in iOS runtime and is wondering if anybody has found solution? I have tried the UMA Power Tools 2 but it doesn't seems to work with 2.8 version. It's also important to get facial blendshapes as part of the prefab export/save process.

    Has anybody resolve prefab export in UMA 2.8 or have any other ideas? Many thanks!

    This is the error I am getting when importing UMA Power Tools 2 into UMA 2.8:
     

    Attached Files:

  36. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,203
    The fix for PowerTools in 2.8 is to double-click that error (which should load Visual Studio to that line), and then remove the "override" in the function definition. In the end it should look like this:

    Code (csharp):
    1.  
    2.         public bool KnowsBone(int nameHash)
    3.         {
    4.             return boneHashData.ContainsKey(nameHash);
    5.         }
    6.  
    It doesn't actually look like it's used anywhere anyway, I believe you can just delete it as well. But that gets it to compile and export.
     
    hopeful likes this.
  37. Bartek_Gudowski_Friend_Factory

    Bartek_Gudowski_Friend_Factory

    Joined:
    Feb 18, 2019
    Posts:
    54
    Many many thanks, @Jaimi ! It helped me to get through further.
    Any ideas how to resolve these new errors?
     

    Attached Files:

  38. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,203
    In Meshbuilder.CS, the following line:
    if (UnityEditor.PrefabUtility.IsComponentAddedToPrefabInstance(renderer))
    should be changed to:
    if (UnityEditor.PrefabUtility.IsAddedComponentOverride(renderer))

    The other error (TextureMergePrefab doesn't exist on UMAGeneratorBuiltin, gameObject is not a member of TextureMerge)
    is problematic, as those values DO exist in 2.8. Are you on an experimental branch?
     
  39. Bartek_Gudowski_Friend_Factory

    Bartek_Gudowski_Friend_Factory

    Joined:
    Feb 18, 2019
    Posts:
    54
    Thanks! Yes, I'm on Kenamis feature-HDRP which I use for LWRP on iOS. Works great.

    What I want to do is create prefabs with facial blendshape of the UMA character during iOS runtime. Do you know of any suggestions of how to resolve? Thanks again for your great support.
     
  40. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,203
    If you need to modify the character (repurpose it, change it's hat, etc) then you can use this method:

    http://umadocs.secretanorak.com/doku.php?id=knowledgebase:creating_a_customizable_prefab

    If you need it to be an unmodifiable prefab that doesn't need to build, then the only option is to use the power tools, or you may be able to use Unity's fbx exporter.

    The two bugs you have appear to be due to a change in the code so that the Texturemerge is no longer a prefab, and is now a scriptable object. The fix should be easy, I'll look at it tonight.
     
    hopeful likes this.
  41. Admin_Friend_Factory

    Admin_Friend_Factory

    Joined:
    Oct 23, 2018
    Posts:
    41
    Great, I only have these 2 errors left. Should I send anything else to be able to track the problem?

    Yes, I want to create an unmodifiable prefab initially as the character shall go into another game. But long term we want to see if we can integrate the whole pipeline with UMA. Though, it's all in iOS and LWRP.

    Many thanks if you can look into the scriptable object issue with Texturemerge.
     

    Attached Files:

  42. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,203

    Delete this whole section of code in

    Code (csharp):
    1.  
    2. #if UNITY_EDITOR
    3.             if (!UnityEditor.EditorApplication.isPlaying && umaGenerator.textureMerge != null)
    4.             {
    5.                 if( umaGenerator.textureMerge != null )
    6.                 {
    7.                     DestroyImmediate(umaGenerator.textureMerge.gameObject);
    8.                     umaGenerator.textureMerge = null;
    9.                 }
    10.             }
    11. #endif
    12.  
    in UMAEditorAvatar.cs (around line 81-90). it's no longer needed if it's not a prefab.
     
  43. Myst12

    Myst12

    Joined:
    Mar 6, 2019
    Posts:
    7
    Hi this is my first time really posting but I've been following a you-tuber to get a better understanding of UMA and I have come across an issue. I am trying to connect the DNA of the UMA's to a slider I was able to get it working for the waist, belly and height but when it comes down to arm size or arm width it gives me "the key is not found in dictionary" and I am not sure what i am doing wrong or if i am just missing something.

    This is what I followed inn the video and I add the waist portion without help and it worked but nothing else seems to go through.

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UMA;
    using UMA.CharacterSystem;
    using UnityEngine.UI;
    public class CharacterCreator : MonoBehaviour
    {
    public DynamicCharacterAvatar avatar;
    public Slider heightSlider;
    public Slider bellySlider;
    public Slider waistSlider;

    public Dictionary<string, DnaSetter> dna;
    private void OnEnable()
    {
    avatar.CharacterUpdated.AddListener(Updated);
    heightSlider.onValueChanged.AddListener(HeightChange);
    bellySlider.onValueChanged.AddListener(BellyChange);
    waistSlider.onValueChanged.AddListener(WaistChange);
    }
    void OnDisable()
    {
    avatar.CharacterUpdated.RemoveListener(Updated);
    heightSlider.onValueChanged.RemoveListener(HeightChange);
    bellySlider.onValueChanged.RemoveListener(BellyChange);
    waistSlider.onValueChanged.RemoveListener(WaistChange);
    }
    public void SwitchGender(bool male)
    {
    if (male && avatar.activeRace.name != "HumanMaleDCS")
    avatar.ChangeRace("HumanMaleDCS");
    if (!male && avatar.activeRace.name != "HumanFemaleDCS")
    avatar.ChangeRace("HumanFemaleDCS");
    }
    void Updated(UMAData data)
    {
    dna = avatar.GetDNA();
    heightSlider.value = dna["height"].Get();
    bellySlider.value = dna["belly"].Get();
    waistSlider.value = dna["waist"].Get();
    }
    public void HeightChange(float val)
    {
    dna["height"].Set(val);
    avatar.BuildCharacter();
    }
    public void BellyChange(float val)
    {
    dna["belly"].Set(val);
    avatar.BuildCharacter();
    }
    public void WaistChange(float val)
    {
    dna["waist"].Set(val);
    avatar.BuildCharacter();
    }
    }
     
  44. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,203
    The DNA is in a dictionary, so you have to match the case. Arm Width would be "armWidth", etc. You can find the right case and spelling for the DNA Names in the DynamicDNA Asset. For example, Human Male is in "HumanMaleDynamicDnaAsset" - just click on that, and you can see the names in the inspector.
     
    Myst12 and hopeful like this.
  45. Myst12

    Myst12

    Joined:
    Mar 6, 2019
    Posts:
    7
    Thank you so much i have been struggling with the naming convention of it all this helps me so much. I will definitely go in and rename the things that are not showing up due to "key not found." Again thank you!!!
     
  46. chaza_li

    chaza_li

    Joined:
    Jan 8, 2018
    Posts:
    29
    Hey thanks Jaimi, I have it solved now and it turns out that I was using the wrong race data. Moving on from this question, is it possible to generate an AO for the UMA character's skin during runtime?
     
  47. Bartek_Gudowski_Friend_Factory

    Bartek_Gudowski_Friend_Factory

    Joined:
    Feb 18, 2019
    Posts:
    54
    Hi again!

    That worked great, I am now through all the big error and can create a character prefab. Awesome.
    Once created Prefab I get some errors and the characters is laying down. Please see attached.
    I can though put the character "_receipt" file into the scene.

    I see that the new created prefab has some UMA components attached to it. Is it possible to get a clean baked character with the new selected clothes and face/body DNA without UMA to be integrated in another iOS game?

    Thanks!
     

    Attached Files:

  48. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,203
    I've never actually used the Power Tools before this, so I'm not sure I can help at this point. I was able to produce a prefab under 2017.4, but not on this new tree and under Unity 2018.3. Seems to be having some sort of issue finding all the bones. You may get more help on Joen's power tool thread.
     
  49. Cleverlie

    Cleverlie

    Joined:
    Dec 23, 2013
    Posts:
    219
    Hi UMA community, I have a problem that I hope someone here can help me solve.

    I'm trying to implement my own UMA race, working with an artist that does the modeling/rigging part, I followed the secret anorak's tutorial on how to do a custom race (tutorials 301)

    it is almost working, the recipes and slots seem to work fine, although there is a problem related to texturing (more on that later).

    the main problem is that when the UMA is generated, the bone rig gets somewhat corrupted and creates this weird cripled thing

    problem 1.jpg

    while the model itself works well, because I tested it outside of uma (dragging and dropping the fbx prefab to scene and adding a Locomotion animator), you can see it working as just a model (no UMA) here:

    problem2.jpg

    So I'm guessing that UMA in the process of runtime building of the skeleton, for some reason deforms or manipulates the bone rig or more precisely the rotations of the bones, why does this happen? shouldn't it just grab a copy of the bone hierarchy and respect the original rotations and translations? thanks in advance
     
  50. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,203
    Unity likes to do a bunch of "magic" behind the scenes to fix up the various models as you import them. But UMA uses the raw mesh data and skeleton. You can get goofy things that look fine in the editor, but bad in UMA if you are not careful to export correctly and clean the various transformations.

    Are you exporting from Blender?
    If so, are you using Blender 2.7 or 2.8?
    If not, what are you exporting from?