Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. xercool

    xercool

    Joined:
    Sep 5, 2017
    Posts:
    90
    WOW! Got it...

    Where can I get avatar for bones that generated by bone builder?
     
    Last edited: Nov 27, 2017
  2. ychv

    ychv

    Joined:
    Apr 9, 2014
    Posts:
    18
    After using the Bone Builder an "Animator" component is created in the selected GameObject. The Animator would have the "Avatar" value set. (The avatar currently does not have a name.)
     
    xercool likes this.
  3. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    OK, I see that. Not sure what we can do about it. Should be able to just pull the avatar from the FBX though (example: Male_unified_avatar). It should be rebuilt when you build the character at runtime.
     
  4. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    386
  5. ychv

    ychv

    Joined:
    Apr 9, 2014
    Posts:
    18
    I found the FBX avatars. I'll try using them.

    Do I rebuild by calling DynamicCharacterAvatar.BuildCharacter() in the CharacterCreated event handler?

    Thanks.
     
  6. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    No, it should already be built at that point. I'm assuming that you're either loading the character from a string, or from a character file. If that is the case, it should build automatically (and then give the event).

    If that's not what you're doing, I need more information
     
  7. ychv

    ychv

    Joined:
    Apr 9, 2014
    Posts:
    18
    I'm currently creating the character with recipes sets in a DynamicCharacterAvatar component attached to a GameObject.

    I'll try it out. Thanks.
     
  8. xercool

    xercool

    Joined:
    Sep 5, 2017
    Posts:
    90
    I found some issues in beta version. I'll post them today
     
  9. xercool

    xercool

    Joined:
    Sep 5, 2017
    Posts:
    90
    Also I'm curious.. should I call bone builder automatically after changing UMA data? For example if I want to make in-game character customization... Will it update existing character skeleton by changing parameters dynamically?
     
  10. Bantichai

    Bantichai

    Joined:
    Nov 6, 2016
    Posts:
    138
    Just a general question, I'm noticing that after importing UMA + Powertools, after coming out of runtime and doing something like saving the project, saving a scene or saving a prefab in a scene there is a 10-15 second slowdown. I tested the same project without UMA + Powertools and I didn't get the slowdown.

    Am I missing everything here?
     
  11. SrsDave

    SrsDave

    Joined:
    May 21, 2013
    Posts:
    1
    Hi,
    I also have UMA plus powertools and seem to recieve a lot of slowdown especially when trying to view something containing a dyncamic character avatar- i was suspicious that perhaps the was an uma editor context being spawned and destroyed that may have been causing the issue but im unsure.
    I am also seeing other issues when trying to run the simple scene demo scene such as:
    "UnityException: Repaint is not allowed to be called during serialization, call it from OnEnable instead. Called from ScriptableObject 'SlotDataAsset'.
    See "Script Serialization" page in the Unity Manual for further details."

    Does anybody have any idea what could be causing this?
     
  12. Bantichai

    Bantichai

    Joined:
    Nov 6, 2016
    Posts:
    138
    I'll post this again on the powertools forum, for what it is worth, glad it isn't just me :p
     
  13. Bantichai

    Bantichai

    Joined:
    Nov 6, 2016
    Posts:
    138
    Also wanted to say, the slowdown only happens once. IE the first time I save on a prefab, or save the project after coming out of a scene. If I do the same thing again, it is much faster until I enter runtime and exit out of runtime again.
     
  14. Bantichai

    Bantichai

    Joined:
    Nov 6, 2016
    Posts:
    138
    So I've spoken to Unlogick and I think it is coming from UMA alone. If I load up a new project in 2017.1.1 and imported UMA 2.6.2 and loaded just UMA, hit play in the scene then come out of the scene, attempt to create a prefab from a square it will take 10 seconds to load. Create another prefab without entering the scene won't give me the long wait time. Hitting play again, coming out and repeating the steps will give me the wait again. Doing the same thing but interacting with the Unity editor, IE saving the scene will also give me the wait time.
     
  15. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    The bone builder is only needed if you want access to the skeleton in the editor (like for a third person controller asset). You don't need to call it during game time as the skeleton is automatically created as part of the build process.
     
  16. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    It's likely caused by the global library loading. it's slower when you have a large library, and the build references are included. You can clear build references in your library to improve performance, but they'll be re-added when any of the assets are accessed. We're looking at ways to speed this up, but for the current time, the best thing you can do is ensure that you have a UMA_DCS prefab in your scene so you only see the slowdown one time.
     
  17. xercool

    xercool

    Joined:
    Sep 5, 2017
    Posts:
    90
    Magicful cool!
    I tested it today :)
     
  18. ychv

    ychv

    Joined:
    Apr 9, 2014
    Posts:
    18
    I tested replacing the avatar with Male_unifiedAvatar but calls to

    var rightHand = animator.GetBoneTransform(HumanBodyBones.RightHand);

    would return "null". Similar results with other bone references and using other avatars in the UMA directory.

    Edit 1: By replacing I mean changing the reference in the Animator component's avatar value.
     
  19. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    When are you calling this?
     
  20. ychv

    ychv

    Joined:
    Apr 9, 2014
    Posts:
    18
    It's called by Invector's Shooter template controller creation wizard. After using the Bone Builder I switched the Animator.avatar value and used the GameObject for the controller wizard.

    Edit 1: Could it be that the Male_unifiedAvatar still references its FBX skeleton?
     
  21. Bantichai

    Bantichai

    Joined:
    Nov 6, 2016
    Posts:
    138
    Cheers Jaimi! It's a quick fix at least that has improved the slowdown issue :)
     
    Jaimi likes this.
  22. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    It should put the new avatar on the component after it's rebuilt. I added the invector melee component to my RPG, and didn't have any issues, so I was wondering if there was some procedural difference. Maybe the shooter template is doing something that the melee template wasn't doing. Are you calling any of the code from the callbacks? Sometimes you have to wait until after the frame is complete to actually access some of the data. Or is this just plain vanilla invector?
     
  23. ychv

    ychv

    Joined:
    Apr 9, 2014
    Posts:
    18
    I am using Invector's Shooter template which builds on top of their melee template - so they share the same code.

    I do not have any event handlers or other scripts setup. I am just creating a default GameObject with DynamicCharacterAvatar. Use it with the Bone Builder, change the avatar, and feed the result to the Invector controller creation tool. That is when the "animator.GetBoneTransform()" null exception occured (it is from Invector's editor code). The scene wasn't executed with the "Play" button. (It all works if I use the default output from the Bone Builder. I just can not save the generated avatar.)

    I could be missing something. For instance, I am not sure what I need to do to rebuild with the new avatar. Could you list your steps? Thanks.
     
    Last edited: Nov 29, 2017
  24. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    I actually switched to a different controller, as I had problems with Invector moving on terrain (it would sometimes just jump up, and then sink into the terrain). I'll try to duplicate my old setup tomorrow, see if I can still get it to work.
     
  25. ychv

    ychv

    Joined:
    Apr 9, 2014
    Posts:
    18
    Thanks. I could probably use the default Bone Builder output. It will just be less convenient.

    I haven't seen the terrain movement problem with the controller - but I am fairly early in development. I find it fairly easy to make changes and add animations.
     
  26. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    955
    I've seen that kind of behaviour with rigidbody-based controllers (Invector and Opsive). Haven't seen it with ootii's (which is input based), and it shouldn't be an issue with Opsive's upcoming v2 controller (which will also be input-based).
     
  27. ychv

    ychv

    Joined:
    Apr 9, 2014
    Posts:
    18
    I think I found a way for using the Bone Builder output as a prefab. The inability to save the avatar is not an issue because it is rebuild by DynamicCharacterAvatar at runtime. Save the prefab with third party components disabled. Listen to DynamicCharacterAvatar's "Character Created" event and enable the third party components there.

    UMA is a terrific asset. Thanks to Jaimi and kenamis for the great features and support.

    Thanks for the alternative controllers. I enjoyed watching ootii's videos on creating character controllers.
     
  28. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
  29. mzr

    mzr

    Joined:
    Jul 25, 2014
    Posts:
    35
    Hey, amazing work guys. I found an issue though, after using bone builder, when I try to create opsive TPC character I get a message that my object is not humanoid and I should correct the animation type and bones. Any ideas? I'm using the latest release I think, I don't use the latest TPC though, so that may have something to do with it.
     
  30. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    386
    Are you using a custom race and did you set your mecanim avatar to "humanoid" before exporting the tpose?
     
  31. mzr

    mzr

    Joined:
    Jul 25, 2014
    Posts:
    35
    Nope, using the humanmale race with the free mage robe. I also tried the Uma prefab from the getting started folder and got the same thing.
     
  32. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    I dont' have the opsive controller, but on the invector controller, you have to select the avatar from the Male_Unified fbx. It may not be set to humanoid (don't recall). So if it isn't you'll need to change that under the rig button.

    edit: It appears he has an integration for UMA on his website:

    http://www.opsive.com/assets/ThirdPersonController/integrations.php
     
  33. mzr

    mzr

    Joined:
    Jul 25, 2014
    Posts:
    35
    Ok, I managed to get it working.
    For some reason it doesn't work when you use the bone builder on a gameobject that is a child, it only works when the gameobject doesn't have a parent.
    I created 2 characters, 1 without parent and 1 with a parent. Ran bone builder on them.
    The first one worked with TPC the second didn't, even if I moved it outside of the parent.
    I couldn't see any differences in them. The structure seems to be the same, animator settings too.
    This is the line that checks if the object is humanoid I think:
    animator.GetBoneTransform(HumanBodyBones.Head) != null
     
    hopeful likes this.
  34. mzr

    mzr

    Joined:
    Jul 25, 2014
    Posts:
    35
    Thanks, I tried selecting that avatar before, but it didn't change anything. By default uma bone builder doesn't choose any avatar, right?
    As for the integration I think I've already been using it, but it's creating TPC on runtime after creating uma, and therefore is harder to set up and I can't use the editor the change the settings. I just wanted to check if new uma features could replace that workflow and It looks like they can (see message above).
     
  35. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    386
    Are you confusing what bone builder is checking and what TPC is checking? GetBoneTransform isn't used in the bone builder, but it is used in TPC. In TPC it expects your player object to have the animator on it, which if you were parenting I would guess is why you were seeing an issue.

    It chooses the mecanim avatar settings of the currently selected DCA race, or if you supply a base recipe it pulls the mecanim avatar off the race data.

    I originally started the bone builder specifically to use Opsive TPC without the runtime hook up.
     
  36. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    My daughters and I collaborated on some UMA clothing. Here are a tunic mesh with two different textures. I made the high poly meshes, one of my daughters made the low poly mesh, baked the normals, and rigged the mesh. My other daughter painted the mesh twice to make the lovely textures. This is all one mesh and the belts are created with a height map.

    Wanted to share how possible it is to make your own clothing!

    Poor_cropped.png rich_cropped.png
     
  37. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,625
    Beautiful! The folds are very nicely done, and I like the use of the height map. :)
     
    Teila likes this.
  38. mzr

    mzr

    Joined:
    Jul 25, 2014
    Posts:
    35
    Yes, this code is from TPC, I pasted it here to let you know where I see the difference. The object had an animator (created by the bone builder).It's weird that these objects look exactly the same, but GetBoneTransform doesn't work for one of them. But it works now, so it's cool.

    I used the same prefab for both examples, so there shouldn't be any differences here.
     
  39. arteria

    arteria

    Joined:
    May 31, 2007
    Posts:
    2,190
    Teilia, that is really nice. Very very natural looking creases and wrinkles. Wonerfully textured.
     
    Teila likes this.
  40. MichaelPickering

    MichaelPickering

    Joined:
    Oct 11, 2017
    Posts:
    14
    Hi Everyone! Has anyone tried to install the UMA asset in Unity 2017.2? I'm having a problem as soon as I load the asset and open a project -- I get an error message regarding the "AssetBundleManager" that says:
    Assets/UMA/Core/Extensions/DynamicCharacterSystem/UMAAssetBundleManager/AssetBundleManager.cs(190,25): error CS0619: `UnityEngine.Application.isWebPlayer' is obsolete: `This property is deprecated and will be removed in a future version of Unity, Webplayer support has been removed since Unity 5.4'
    I tried commenting out the two relevant lines from the script, but then I get issues with Meshes that I can't figure out...
     
  41. MichaelPickering

    MichaelPickering

    Joined:
    Oct 11, 2017
    Posts:
    14
    Here are the two lines (line numbers 190-1) from AssetBundleManager.cs that I commented out:
    //else if (Application.isWebPlayer)
    // return System.IO.Path.GetDirectoryName(Application.absoluteURL).Replace("\\", "/") + "/StreamingAssets";
     
  42. MichaelPickering

    MichaelPickering

    Joined:
    Oct 11, 2017
    Posts:
    14
    I'm assuming this is safe because the WebPlayer itself isn't supported anymore, so this must be a 'legacy' case that should never apply, correct?
     
  43. MichaelPickering

    MichaelPickering

    Joined:
    Oct 11, 2017
    Posts:
    14
    Here's the error message that I get when trying to run the UMA DCS Demo - DNA Delegates example scene:
    SkinnedMeshRenderer: Trying to set a mesh ("") that is unfit for use with SkinnedMeshRenderer. Most likely it doesn't have Skin information and/or is only assigned to the renderer during runtime, in which case Unity isn't aware of its use with SkinnedMeshRenderer. Mark the mesh as Readable or assign it to the renderer in the Editor before building.
    UnityEngine.SkinnedMeshRenderer:set_sharedMesh(Mesh)
    UMA.UMADefaultMeshCombiner:MakeRenderer(Int32, Transform) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMADefaultMeshCombiner.cs:105)
    UMA.UMADefaultMeshCombiner:EnsureUMADataSetup(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMADefaultMeshCombiner.cs:44)
    UMA.UMADefaultMeshCombiner:UpdateUMAMesh(Boolean, UMAData, Int32) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMADefaultMeshCombiner.cs:126)
    UMA.UMAGeneratorBuiltin:UpdateUMAMesh(Boolean) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:282)
    UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:226)
    UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:265)
    UMA.UMAGeneratorBuiltin:Work() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:132)
    UMA.UMAGeneratorBuiltin:Update() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:97)
     
    Sparky11 likes this.
  44. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Here is the fix for you:
    https://forum.unity.com/threads/uma...-the-asset-store.219175/page-117#post-3253517
     
    EdWaters and Sparky11 like this.
  45. MichaelPickering

    MichaelPickering

    Joined:
    Oct 11, 2017
    Posts:
    14
    That works! Thanks!!
     
    boysenberry likes this.
  46. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,625
    Hey there! As noted in comments somewhere above, Unity had a regression bug that popped up with 2017.2 affecting skinned meshes. To avoid that error you need the right patch, which I think was the .2 one.

    Also, if you're just getting started with UMA, you might want to give the latest build on GitHub a try. There are a few great new features to test out (they're probably pretty stable, but are technically beta).
     
  47. midnight_on_mars

    midnight_on_mars

    Joined:
    Oct 10, 2017
    Posts:
    3
    Hi, thanks so much for this amazing tool. I'm still a pretty novice user at this but one thing I've been stumbling on is how to set changes to overlays for slots at runtime through code. I can change the overlay through the "SetOverlay" function but as soon as I change another overlay, the first one gets changed back to what it was. Is there a way to save overlay changes to a slot so that it doesn't get keep getting changed back?

    Thanks again, for this awesome asset!
     
  48. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    386
    Are you intending on using the DynamicCharacterSystem? It sounds like you are and that would reset any overlays you manually set. I would suggest using wardrobe recipes and you can set those from code. Take a look at the simple setup scene for examples.
     
    Teila likes this.
  49. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    This is a very useful concept and will act like a filter list for me; thank you for suggesting it. It might be something that could be incorporated to make it even easier, like an exclude button that bundles it (and updates the bundle if we lived in a perfect world).


    After more reading it would seem, Asset Bundle Browser would make this trivial.
    https://assetstore.unity.com/packages/tools/utilities/asset-bundle-browser-93571
    https://docs.unity3d.com/Manual/AssetBundles-Browser.html
     
    Last edited: Dec 7, 2017
  50. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Was curious about the differences between using an AssetBundle vs the Global Library. It seems to me there might be a happy medium between the two. Being new I haven't tested the two and am not sure how they perform in relationship to each other and when they're best used (other than using AssetBundles to prevent Global Library bloat of unwanted assets). What is the best way to use one vs the other?