Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. mfitzpatrick-1

    mfitzpatrick-1

    Joined:
    Oct 8, 2013
    Posts:
    31
    Thanks Jaimi, ill check these out.
     
  2. mfitzpatrick-1

    mfitzpatrick-1

    Joined:
    Oct 8, 2013
    Posts:
    31
    Oh Jaimi, another question. Its been happening randomly. A waredrobe recipe sometimes become corrupted. When I select it, none of the options appear on it, The inspector is totally blank. I have to delete it and set it up again. Do you know whats going on?
     
  3. DeadSeraph

    DeadSeraph

    Joined:
    Sep 8, 2017
    Posts:
    97
    I figured it out. The problem was that the o3n blender files have the male and female in the same scene, so UMA was expecting one root bone but finding two. Fixed now.

    I do have another question about how UMA handles it's materials. I'm looking to start producing accessories soon, and in the short term, sun glasses. If I wanted to have the lenses semi-transparent so you can still see the eyes through the shades, how would I approach that?

    Normally, I'd just model the lenses separated and give them a different material/shader so I could set the transparency level of the shader in the unity editor, but since UMA has it's own shaders, what would be the best way to do this? I think I remember reading somewhere that the UMA shaders currently don't support transparency?

    Apologies if my question is somewhat redundant but I've absorbed a lot very quickly over the last month :)
     
  4. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I'm guessing that something generated an error - if you see this again, can you check your console for error messages, and post them?
     
  5. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You would do the same thing in UMA. You create your material, and assign the shader (and any values that you want) on it. Then create a UMAMaterial to point to that material. You then assign that to the slots/overlays that use the transparent material you created.

    At runtime, UMA will detect the new material, and move it to a separate atlas, and generate a new material for that.


     
  6. williampire

    williampire

    Joined:
    Jul 24, 2018
    Posts:
    9
    Noticed something when following your guide on youtube howto create your own race. Although when I try and work with the slot builder, somehow I cannot drag any skinned meshes from my model into the slot



    Despite my model having a skinned mesh attached to the body mesh. Is this due to Unity 2019.2?
     
  7. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208

    I'm not the venerable SecretAnorak, but 2019.2 should work fine. I'll give it a go here this weekend. Usually this is caused by not selecting the right subobject underneath the fbx.
     
  8. williampire

    williampire

    Joined:
    Jul 24, 2018
    Posts:
    9
    Awesome, thank you Jaimi. Just to make sure, there is a skinned mesh renderer as a child, containing the body mesh of the character


    https://gyazo.com/f153f28e4ded951df146a59e43973f27
     
  9. DeadSeraph

    DeadSeraph

    Joined:
    Sep 8, 2017
    Posts:
    97
    When I do this it doesn't work. I've created a standard transparency shader in unity and tested it and it works the way I want. When I create a UMA shader and point it to that unity shader, and then apply it to both my slot and my overlay, as soon as I drop the recipe on the character at run time the game freezes.

    Could it have something to do with the way I've set up the recipe?

    What I've done is set up the shades as 2 objects so there's the frames, and the lenses (in blender the lenses are a child of the frames, and not joined). Then I pulled the blender file into unity and used the slot creator to set up a separate overlay and slot for both the lenses and the frames, created a recipe to place everything, and then added both sets of slots and overlays to the recipe. It works fine until I try to add the UMA shader that I created for the transparency to the lens slot / overlay.

    It seems to be complaining about the 2 shaders being used not being the same, but that's what I'm trying to achieve?
     
    Last edited: Aug 17, 2019
  10. bran76765

    bran76765

    Joined:
    Jul 14, 2018
    Posts:
    26
    Hello again, everything was working great until I imported https://assetstore.unity.com/packages/3d/characters/uma-male-base-2-0-99379 UMA Male Base 2.0 and I also bought some arteria3d clothing.

    Now all the clothing says it's compatible with UMA-and it is compatible...with the default. My question is, shouldn't I be able to use the UMA Male Base 2.0 and still not have my clothes clipping through the character model? In fact, it should be fitting perfectly....but it isn't and I'm trying to figure out why.

    I've also tried hiding the specific body part it replaces but that doesn't work for 2 reasons 1) It's kinda obvious I've hidden just that body part 2) Sometimes the body part it replaces isn't really covered at all so it's just floating head or floating arms. So I need an actual fix for this and I have a feeling it's a simple fix (since everythings compatible with UMA and the clothing clips through regardless of DNA...)
     

    Attached Files:

  11. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You'll probably need to create "Mesh Hide Assets" for the Arteria3d recipes to hide the parts of the male base 2.0 that poke through. My guess is that Arteria didn't do this, as the Male Base 2.0 is an optional race.


     
  12. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Each slot and overlay have to have the same UMAMaterial. So your new UMAMaterial with the transparent shader has to be on both the sunglasses slot and the sunglasses overlay. For an example, take a look at the eyelashes slot and overlay, they have a separate fade material.


     
  13. DankP3

    DankP3

    Joined:
    Jul 17, 2017
    Posts:
    93
    Are you exporting from blender? I had the same problem as you exporting from Daz Studio, but an import to blender and immediate export fixed it. Never explained it, but it could be an export setting?
     
  14. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I loaded UMA into Release 2019.2, and was able to create a slot without issue. If you would like, I can take a look at your model.

     
  15. LarsH673

    LarsH673

    Joined:
    Mar 7, 2015
    Posts:
    17
    Still having problems with UMA and bone buildes, i cant get it working correctly for me.
    step1.jpg step2.jpg
     
  16. l7ajabi

    l7ajabi

    Joined:
    Jan 16, 2018
    Posts:
    3
    I'm having a problem with weights, when I import my blender file to unity everything looks good, even if i drag my meshes into my scene everything looks fine. In blender also, I transferred the weights from the base mesh, no
    problem

    , I play the animation to testthe weights also no problem. but when I create my wardrobe recipe and run, I get a a deformed mesh.

    since its a helmet i tried making the head adjust bone as the only bone affecting it, but in unity although the mesh is not deformed this time its rotated wrong.


    I have all the transforms applied.
    I just don't know what i'm doing wrong this time.
     
  17. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    For the saving of the avatar you need to be at runtime.

    For your duplicate skeleton issue. Can you show a screenshot of your DCA with all it's components collapsed?
     
  18. LarsH673

    LarsH673

    Joined:
    Mar 7, 2015
    Posts:
    17
    oh doesent know thath, its my first project with UMA. Thank you for pointing thath out
    DCA.JPG
    DCA2.jpg
     
  19. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    I wanted to see the inspector for your UMA with it's components collapsed. I'm trying to see if you have duplicate DCA components.
     
  20. LarsH673

    LarsH673

    Joined:
    Mar 7, 2015
    Posts:
    17
    I'm sorry my english isn't so good.
    DCA2.jpg
     
  21. DeadSeraph

    DeadSeraph

    Joined:
    Sep 8, 2017
    Posts:
    97
    So if I'm understanding this correctly, I can't have the frames opaque and the lenses transparent using the same recipe, and would have to make a separate recipe for each?
     
  22. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    A separate slot and overlay pair for each (the frames and the lenses), but then they can both be added to the same wardrobe recipe.
     
    Jaimi likes this.
  23. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    What are those errors you have in the console?
     
  24. DeadSeraph

    DeadSeraph

    Joined:
    Sep 8, 2017
    Posts:
    97
    That's how I have it set up but it doesn't work because UMA is complaining that one pair of slot / overlays have a different shader than the other.
     
    Last edited: Aug 18, 2019
  25. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    The UMAMaterial is tied to the slot. You should have two slots - one for the frame, and one for the lenses. The frame would have the opaque material. The lenses would have the transparent material. Then you would have two overlays - one for the frame, and one for the lenses. You could use the same textures for both overlays if you need to, but that won't stop it from taking up additional atlas space.

    so
    frame slot + frame material, frame overlay + frame material.
    Lens slot + lens material, lens overlay + lens material.

    Those can both be in the same wardrobe recipe.
     
  26. DeadSeraph

    DeadSeraph

    Joined:
    Sep 8, 2017
    Posts:
    97
    That's the way I have things set up. I will take some screen shots and edit this post with them once unity loads so I can hopefully get to the bottom of this.

    *EDIT TO ADD*:

    Never mind. I got it figured out. I must have been tired friday evening :D

    Problem was that I had forgotten to plug the UMA shader I made into both the lenses overlay and the lenses slot, and only had it plugged into one of them. It's working now.
     
    Last edited: Aug 18, 2019
    hopeful likes this.
  27. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Perhaps you have duplicate slots or overlays with the same name? UMA finds them in the library by SlotName/OverlayName.
     
  28. LarsH673

    LarsH673

    Joined:
    Mar 7, 2015
    Posts:
    17
    its only one Error for this line of code
    Code (CSharp):
    1. var head = _animator.GetBoneTransform(HumanBodyBones.Head).position;
    this is the Error:

    NullReferenceException: Object reference not set to an instance of an object
    CoverShooter.CharacterMotor.updateCover (Boolean isForcedToMaintain) (at Assets/ThirdPersonCoverShooter/Scripts/Character/CharacterMotor.cs:4707)
    CoverShooter.CharacterMotor.updateCommon () (at Assets/ThirdPersonCoverShooter/Scripts/Character/CharacterMotor.cs:5208)
    CoverShooter.CharacterMotor.LateUpdate () (at Assets/ThirdPersonCoverShooter/Scripts/Character/CharacterMotor.cs:3323)

    the head bone couldn't be found.
     
  29. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    755
    Make sure you have no duplicate tabs open. For me, it was I had multiple inspector tabs open. (your screenshot has two inspector tabs).

    I believe this has to do with UMA using EditorApplication.Update which means multiple inspection tabs can be telling UMA to update it's files two different ways at the same time.
     
    Last edited: Aug 18, 2019
  30. shiquhudong

    shiquhudong

    Joined:
    May 19, 2017
    Posts:
    26
  31. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    UMA produces a standard Skinned Mesh with a Mecanim Avatar at runtime. If the software requires the bones to exist at edit time, you can use the Bone Builder to generate them. The latest version on github will also allow you to generate a mecanim avatar at runtime and save it.
    With that, I would say it's very likely that it would work. But I honestly have no clue.
     
  32. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    Can someone please answer this. I need to know also.
     
  33. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    This is most likely caused by using the wrong export parameters when exporting to FBX. Please review the manual for the correct parameters. The Blender 2.79 and Blender 2.8 paramaters are different, and the base meshes are as well.

     
  34. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    Witch is the best version of Blender to use for UMA 2 then?
     
  35. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Blender 2.8.

    There is a "Uma content creation" pdf in the UMA folder with the correct parameters. Please use the base model blend from the Blender28 folder, which has the correct rotations.

     
  36. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    755
    This usually happens when you rename an overlay the wardrobe recipe was using. I believe this is because wardrobe recipes compile by using string values, instead of file reference.

    This often requires rebuilding the wardrobe recipe, as it wrecks it bad anyway upon first error. (especially if using LODs) :/ One of those areas UMA punishes you harshly for trying to rename files.

    It is better to copy the overlay file, rename it to what you want, and then add it to the global library, and then swap it into the wardrobe recipe. It's tedious, but it is better than having all your slots in the wardrobe recipe wiped out.
     
    Last edited: Aug 19, 2019
  37. DeadSeraph

    DeadSeraph

    Joined:
    Sep 8, 2017
    Posts:
    97
    Hi guys. Just wondering how I'd approach a certain accessory. I'm look to adapt an existing asset for use with our new UMA characters. In this case, it's a gym bag that the character is supposed to hold in their hand. So far I've just been creating things like shoes and glasses, which are relatively easy to weight.

    In this case, the bag is static and held by the hand, so the idea is that the animation in the idle position is different to ensure the bag doesn't clip through the body and the fingers are closed around the straps. I don't need the bag to deform with the body, so I'm wondering how I'd go about this with UMA?

    In secret Anorak's youtube tutorials, all the accessories have the weights transferred from the base mesh of the uma's body, to the new asset, then have the armature assigned, and weights are painted to fix any resulting issues. In this case, I don't actually need weights on the item. Would I just export it as an fbx and assign it to the hand slot in the recipe, and if so, what determines the point of contact between the hand and the object?
     
    Last edited: Aug 20, 2019
  38. TonismoGames

    TonismoGames

    Joined:
    Jun 12, 2018
    Posts:
    111
    Hellp everyone,I ran into this issue when instantiating Character prefab from Resources and then changing race. upload_2019-8-20_15-24-16.png upload_2019-8-20_15-22-18.png upload_2019-8-20_15-23-6.png
     
  39. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You can either attach it like a weapon (see the "MountingObjectsExampleScene"), or you can position it and weight it to the "RightHand" or "LeftHand" hand bones, create a slot, and add a "wardrobe slot" to your race to assign it to. You can add new wardrobe slots on the racedata itself - they are added in the order they are presented in the array.
     
  40. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Your script is executing before the DynamicCharacterAvatar, so it hasn't initialized yet. You'll need to make sure it runs after the initialization.

     
  41. TonismoGames

    TonismoGames

    Joined:
    Jun 12, 2018
    Posts:
    111
    Thank You for the quick reply!
     
  42. l7ajabi

    l7ajabi

    Joined:
    Jan 16, 2018
    Posts:
    3
    when I use those settings and run my scene nothing shows up on my UMA model,don't know why.
     
  43. mfitzpatrick-1

    mfitzpatrick-1

    Joined:
    Oct 8, 2013
    Posts:
    31
    So it happens when I rename a waredrobe collection. Here is the error.

    MissingReferenceException: The object of type 'UMAWardrobeRecipe' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    UnityEngine.Object.get_name () (at C:/buildslave/unity/build/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:189)
    UMA.CharacterSystem.DynamicCharacterSystem.GetRecipeNamesForRaceSlot (System.String race, System.String slot) (at Assets/GraphicAssets/Plugins/UMA/Core/Extensions/DynamicCharacterSystem/Scripts/DynamicCharacterSystem.cs:453)
    UMA.Editors.RecipeEditor+WardrobeSlotRecipePopup.OnGUI () (at Assets/GraphicAssets/Plugins/UMA/Core/Editor/Extensions/DynamicCharacterSystem/pDCSRecipeEditor.cs:54)
    UMA.Editors.RecipeEditor+WardrobeSetEditor.OnGUI () (at Assets/GraphicAssets/Plugins/UMA/Core/Editor/Extensions/DynamicCharacterSystem/pDCSRecipeEditor.cs:279)
    UMA.Editors.UMAWardrobeCollectionEditor+WardrobeCollectionMasterEditor.OnGUI (System.String targetName, System.Boolean& _dnaDirty, System.Boolean& _textureDirty, System.Boolean& _meshDirty) (at Assets/GraphicAssets/Plugins/UMA/Core/Editor/Extensions/DynamicCharacterSystem/UMAWardrobeCollectionEditor.cs:212)
    UMA.Editors.RecipeEditor.ToolbarGUI () (at Assets/GraphicAssets/Plugins/UMA/Core/Editor/Extensions/DynamicCharacterSystem/pTextRecipeEditor.cs:37)
    UMA.Editors.CharacterBaseEditor.OnInspectorGUI () (at Assets/GraphicAssets/Plugins/UMA/Core/Editor/Scripts/CharacterBaseEditor.cs:1943)
    UMA.Editors.RecipeEditor.OnInspectorGUI () (at Assets/GraphicAssets/Plugins/UMA/Core/Editor/Extensions/DynamicCharacterSystem/RecipeEditor.cs:151)
    UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:496)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  44. DeadSeraph

    DeadSeraph

    Joined:
    Sep 8, 2017
    Posts:
    97
    Thanks. I want it as a wardrobe recipe but I'm not seeing a hand bone in the vertex groups listed in the blender file. It's the o3n male I'm working with at the moment, so I'm guessing the dev might have named the bones a bit differently. I've sent off a ticket to him so hopefully he can help me out with that.

    In the meantime I'm also looking at implementing some backpacks. Which wardrobe slot would I use for the recipe? I don't see one for backpacks and I don't want the backpack to override any clothing on the torso, for instance. Would it be "Over Clothing" that I would use?
     
  45. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I would suggest adding a new one - You can create new wardrobe slots by editing the racedata.
     
  46. TonismoGames

    TonismoGames

    Joined:
    Jun 12, 2018
    Posts:
    111
    Where can i find API doc for UMA?What is the field to check if DynamicCharacterAvatar has finished initialization?
     
  47. DeadSeraph

    DeadSeraph

    Joined:
    Sep 8, 2017
    Posts:
    97
    How would I go about doing that?
     
  48. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I'm not exactly sure what has happened, but In UMA, most things are found by name - so if you have something that references an item, you should copy it, fix the recipes (etc), then delete the old one.

     
  49. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Find the racedata in the project by typing t:racedata in the search box, then select it. In the inspector. You can edit it in the Wardrobe Slots.

    WardrobeSlots.jpg
     
    Last edited: Aug 20, 2019
  50. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    http://umaapi.secretanorak.com/

    You could check if .context is null to see if it has already been initialized.