Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. vaki26

    vaki26

    Joined:
    Jan 23, 2015
    Posts:
    7
    Thanks very much
     
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,884
    UMA 2.8 RC2 Released

    https://github.com/umasteeringgroup/UMA/releases/tag/2.8rc2

    Includes the following new changes:

    Unity 2018.3 compatibility

    New Dynamic DNA framework -- this is a huge change, making it easier (and more powerful) than ever!

    New scene with new Dynamic DNA (ElfOrAlien) showing Color DNA, Morph DNA, Bone DNA all combined.

    Added spoiler to Car demo

    Various fixes
    • removed warnings
    • missing prefabs
    • removed extraneous components

    Also includes the following changes from RC1:

    General Changes
    The minumum supported release of Unity is now Release 2017.1
    Reworked Blendshapes, improved API, optimized.
    Improved performance in expression player.
    Ability to set texture properties on the UMMaterial (aniso level, trilinear filtering, mipmap bias).
    Ability to downsample textures at atlas build time (in UMAMaterial).
    Ability to hide any slot from a wardrobe (not just base slots)
    Improved Physics Avatar.
    UMAMeshData is now clonable
    Fixed issue with removed slots when using MeshHideAssets
    Cleaned up error reporting for duplicate bones
    Support for UWP build using IL2CPP
    Updated queue on hair shader and materials for improved look against skyboxes
    Added Timeline Clips for Race, Colors, DNA, and Wardrobe
    Mouse orbitor now takes a bone to look at (instead of a bone path)
    and many more bug fixes and optimizations

    Editor Improvements
    Add race updater to update base race overlays to new materials
    UMAGenerator atlas size is now a dropdown list
    Added progress bar when adding items to Global Lib via drag/drop or rebuild.
    Added Re-orderable list to Dynamic DNA
    Lot of enhancements to the Mesh Hide system:

    Ability to view and export UV map (With alpha for selected polys)
    Ability to select base slots from dropdown.
    Symmetry paint mode
    Ability to create wardrobe recipes from hierarchy and slot builder
    Tags editor to mass tag UMA assets (and remove UMA tags)
    Copy/Paste DCA Wardrobe
    Add progress bars to global library
    Added TPose inspector
    Menu item to create Dynamic DNA
    Ability to edit edit multiple SlotdataAsset and OverlayDataAsset in the inspector
    Morph DNA editor added

    Scenes
    Help text added to most scenes
    DCA Sample accessory mounting scene added
    Fixed small issue with not found colors in Asset Bundle scene
    Timeline sample scene showing how to morph, recolor, change sex, and change wardrobe.
     
    hopeful likes this.
  3. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    550
    Awesome job!! UMA is so powerful and it is a game changer! Unity should really support you guys more unless you get the proper support already.
    Thank you VERY much!
     
    Jaimi likes this.
  4. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,961
    UMA was originally a Unity sponsored project starting back in 2012, IIRC, with first publication on December 25th, 2013. That got the ball rolling, but it has been lifted even higher in recent years by some very excellent and talented volunteers. Much thanks to them! :)
     
    Last edited: Dec 21, 2018
    Jaimi, zisaboy and umutozkan like this.
  5. HP

    HP

    Joined:
    Nov 20, 2012
    Posts:
    56
    @Jaimi can you add these line to UMAPhysicsAvatar on line 48, please?
    Code (CSharp):
    1. public List<BoxCollider> BoxColliders {get { return _BoxColliders; }}
    I must add this line each update of UMA manually to get access to all colliders of the Ragdoll.
     
  6. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    369
    I seem to be missing something and I can’t seem to figure this out.

    No matter what I do, the original overlay seems to stay in the Material (I can see it in the Arlas for the character)

    My base slots use a shared color called "skin1"

    I created a new wardrobe recipe that has all the base slots except for the head. I added a new head. All slots use the new overlay and use the same shared color "skin1".

    When I add it to the UMA character, the character looks fine (except the body is a lower resolution that the face) when I go into the material, I notice that the new overlay is in it twice. It seems that the face is using the larger 1k texture, while the body is using the smaller 512 texture.

    Also, I noticed that when I look at the slots on the character they show shared 2 overlays under each slot...I think this is the reason its showing up twice in the Atlas.
     

    Attached Files:

    Last edited: Dec 21, 2018
  7. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    336
    I added this. It's an open Pull Request as of this post, but should be approved and merged with the RC here shortly.
    You can open an issues request if you'd like to request things like this in the future and us see it quickly.
    https://github.com/umasteeringgroup/UMA/issues
     
  8. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    336
    Did you try hiding the base body slots in the wardrobe recipe? Right now it's thinking you want both overlays over the body slots after you've applied the recipe. I'm not certain if hiding the base slots of the same slot name in the wardrobe recipe will hide those also or not, but give that a try.
     
  9. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    369
    Yea, I’ve tried that. What ends up happening is that the slot doesn’t show at all.


    I was thinking about doing that AND making a new slot for each body part (that contains the same meshes). The issue I have with that is that I’m using meshHides on the body parts. I don’t think meshHides will work ...even if the meshes are the the same.
     
  10. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,884
    You could just create a wardrobe item for the whole body, and then change the base race recipe to just a utility recipe or something. You'd probably want to put a "race" body in the default wardrobe, though.

    That makes managing the "hides" a bit tougher. But it should still all work.
     
  11. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    369
    Thanks I'll try that.
     
  12. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,103
    Hello,

    is there a Kind of head look Controller somewhere in the Depth of the uma scripts?
    I tried a free one with that name but it does not work very well for me...

    Thanks :)
     
  13. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,884
    Not that I'm aware of.
     
  14. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,884
    umutozkan likes this.
  15. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    46
    So I'm trying to make some clothing for a custom race. The custom race itself is working, it's all well and good. But when I import some models with clothing I made, when I try to build a slot for said clothings, I get an

    Disconnecting is no longer implemented
    UnityEditor.PrefabUtility:DisconnectPrefabInstance(Object)
    UMA.Editors.UMASlotProcessingUtil:CreateSlotData(String, String, String, SkinnedMeshRenderer, UMAMaterial, SkinnedMeshRenderer, String, Boolean) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/Editor/UMASlotProcessingUtil.cs:119)
    UMA.Editors.UmaSlotBuilderWindow:CreateSlot_Internal() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/Editor/UmaSlotBuilderWindow.cs:208)
    UMA.Editors.UmaSlotBuilderWindow:CreateSlot() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/Editor/UmaSlotBuilderWindow.cs:149)
    UMA.Editors.UmaSlotBuilderWindow:OnGUI() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/Editor/UmaSlotBuilderWindow.cs:94)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    What do?
     
  16. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,884
    Is this 2018.3? Have you tried the RC version?
     
  17. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    46
    Yes, I have tried the RC2 version, I even imported it to a brand new project. Same thing. I'm working around it by using Unity 2017 and making my clothes slots in there, hopefully they will import to 2018 without too much issues.

    I really love how it's easy to have the blendshapes combine on the mesh and clothes. As long as the blendshapes names are the same on every mesh, my DCA deforms everything correctly. It makes things so much easier for me. Although, is there a way to change the blendshapes values via script? I'm thinking of using something like that with ORK to do something resembling GTA: San Andreas, where if you train a lot, your avatar shapes swole, when you eat a lot it gets fat, etc.
     
  18. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,884
    Thanks - I have some slots to create this evening, I'll try to get this figured out and in the 2.8 RC.

    For blendshapes, you'll need to create DNA for them, then you can apply it to the DCA programatically:

    Dictionary<string, DnaSetter> MyDNA = Avatar.GetDNA(); // don't cache this - it doesn't survive some changes
    MyDNA["Height"] = Random.value; // 0..1
     
    Creiz likes this.
  19. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,884
    Also - Unity Developers - please don't do this anymore. Instead of throwing a hard error at runtime, please just remove the function so the compile fails. So much easier to find.
     
    Creiz and hopeful like this.
  20. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,884
    Edit:

    After testing, This line should simply be deleted. It hasn't actually done anything for the last few releases of Unity anyway. I will check the code in and create a new RC
     
    Last edited: Dec 27, 2018
    Creiz and hopeful like this.
  21. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    46
    @Jaimi Is it possible to add blendshapes to my UMA race via additional meshes? For example I have my race with it's blendshapes set up, but those are body shapes. I'd like for example to add more body shapes and facial expressions to it. Can I just import a new identical mesh with the new shapes or do I have to add it to the old mesh and re-import everything, then re-create the UMA race?
     
  22. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,884
    You'll need to add them to the old mesh(es), and recreate any of the affected the slots, but you shouldn't need to recreate the race.
     
  23. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    46
    All right. Eh, it's really not that bad, I guess I can work with that.

    Another thing, sorry if it exists and has been explained before, but I can't seem to find anything about it.
    Is there a way to get a Wardrobe Recipe to hide only what it's covering? Say I have different lengths of pants, Normal pants and shorts. I only have one peeled off mesh for the legs. Can I have my shorts recipe to only hide what's above the knee, and leave the rest?

    Or would I need to make the shorts mesh with the bottom legs visible and straight up import that and hide the main mesh's legs altogether?

    Just asking because if there's a way to only hide what a wardrobe mesh is using it may be a bit easier for me, but it's no biggie if I have to combine meshes at creation. It's a bit of a pain, though.
     
  24. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,884
    Yes - kenamis wrote a great system for that. What you do is create a "mesh hide asset".

    For example, say you have a male short pants recipe, and when you add that to the UMA, you want to hide the hips.
    Create a Mesh Hide Asset using the hips as the base. Go into the editor, and paint out the parts you want hidden, and then save it.

    Add that mesh hide asset to the shorts recipe. Then when you add the shorts recipe to your UMA, it will hide the hips you painted out.
     
  25. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    46
    @Jaimi This is amazing! Thank you! God this thing really is magic, isn't it?
     
    hopeful and kenamis like this.
  26. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,884
    Yeah - that's my favorite feature!
     
    kenamis likes this.
  27. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    46
    @Jaimi One last little thing. Forgive me for hogging your time.

    I have hair meshes with bones. The UMA race mesh doesn't have those bones. Apart from the new bones(like ponytails, etc.) the hair have the same basic armature as the UMA race. I know about bone builder. Can I make a wardrobe recipe for the hair, instead of using the root bone at the hip in the slot builder, can I just put in the neck and then build the bones on the hair so I can put Dynamic Bone or something for the physics?
     
  28. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,884
    If they're the same structure, UMA will append the new bones to the skeleton automatically, no need to do anything extra. I did the same thing with the "boneytail" ponytail slot. The physics on it broke in later versions of unity, but it works with dynamic bone - only thing is since the bones are dynamically added, you have fix it all up in an event (assign bones, add components as needed etc). Slots have events also, that makes it easy to write handlers that are slot specific
     
  29. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    46
    Allright. What about multiple materials? I have some hair (a ponytail) that has 3 materials, one for the strands, one for the scalp and one for the bow thing. The slot builder makes me 3 slots. What do? Do I create a new overlay for each?
     
  30. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    312
    You may use the same overlay (if one texture has all the mesh's islands) on 3 slots unless they will have separate UMA materials in Unity.

    On the other hand, I would create a scalp texture in model's body's UV space and add it as an overlay to the head instead of a separate slot.
     
    Creiz likes this.
  31. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    46
    I managed to get it working. Since it's got a texture for each material, I had to create a different overlay for each slot. It's a bit of a pain because the slots don't tell me which material it's been created from, so I have to guess which overlay go with which slot. I'm now fighting with Unity's toon materials to make the hair look good, now :p. Still, thanks for the tip, @umutozkan
     
  32. fueledbyochd

    fueledbyochd

    Joined:
    Dec 6, 2018
    Posts:
    10
    I dont know if this is the right place to post. But i am trying to build a first person RPG and i just found UMA, but what i am trying to do is move my camera to a position right between both eyes, can someone please point me in the right direction. Any help would be apriciated. even if it is point me to something
     
  33. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,961
    This isn't really an UMA question. It's more of a camera question, and if you're new to cameras, you might not realize the relative complexity of them. My suggestion is to research cameras, especially first person cameras. You should find some useful ideas and scripts.

    If you're trying to hook up the camera in editor, best to use UMA's bone builder.
     
  34. fueledbyochd

    fueledbyochd

    Joined:
    Dec 6, 2018
    Posts:
    10
    I was simply trying to find out if there was a simple way of getting the position of the eyes durring run time so if/when i add a character creater to the game i can always make sure that the camera is in the correct position
     
  35. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,961
    Well, if you can set the position of the camera manually, in the editor, using UMA's bone builder, that is one approach. If you are doing it in code, there's nothing tricky about it that I can think of ... other than the normal problems faced by people implementing a first person camera.
     
  36. fueledbyochd

    fueledbyochd

    Joined:
    Dec 6, 2018
    Posts:
    10
    I need to do it at run time, but guess ill use Find(RightEye) and Find(LeftEye) then calculate the difference
     
    hopeful likes this.
  37. DavidBVal

    DavidBVal

    Joined:
    Mar 13, 2017
    Posts:
    99
    First of all, thanks for your awesome work all these years, I am beginnign to use UMA now and I'm amazed at the huge effort behind it.

    My problem is that, after upgrading to 2018.3 I get this:

    Code (CSharp):
    1. Assets/UMA/Core/Scripts/Editor/OverlayLibraryEditor.cs(164,51): error CS0104: `TextureCompressionQuality' is an ambiguous reference between `UnityEngine.TextureCompressionQuality' and `UnityEditor.TextureCompressionQuality'
    I tried to delete the Core folder and reimport, to no avail.
     
  38. fueledbyochd

    fueledbyochd

    Joined:
    Dec 6, 2018
    Posts:
    10
    at the top of the file under the other usings add
    Code (CSharp):
    1.  
    2. using TextureCompressionQuality=UnityEngine.TextureCompressionQuality;
    3.  
    Although would also recommend downloading the latest release from their GitHub because i believe the version your using isn't compatible with 2018.3
     
    Last edited: Dec 28, 2018
    Slowload likes this.
  39. fueledbyochd

    fueledbyochd

    Joined:
    Dec 6, 2018
    Posts:
    10
    For some reason trying to find "Head" and "NoseTop" returns null (yes i'm looking on the game object which has the Dynamic Character Avatar) But in the editor i can easlly find them but in code it is unable to find it?
     
  40. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    336
    If you're using Transform.Find that only searches the children of the object, not the entire hierarchy under the object, so you need a recursive find.
    There is a uma built in method. UmaData.UmaSkeleton.GetBoneGameObject(int hash) or GetBoneTransform(int hash)
     
    hopeful likes this.
  41. fueledbyochd

    fueledbyochd

    Joined:
    Dec 6, 2018
    Posts:
    10
    How will i know what the hash is for the given bone, IE need Head and NoseTop
     
  42. fueledbyochd

    fueledbyochd

    Joined:
    Dec 6, 2018
    Posts:
    10
    Never mind, UmaData also has GetBoneGameObject(string name)

    thank you very much
     
    hopeful and kenamis like this.
  43. DavidBVal

    DavidBVal

    Joined:
    Mar 13, 2017
    Posts:
    99
    Thanks, I reimported the RC2 package and the error went away!

    However I am now getting this one:

    I see the issue is caused by pRaceInspector.cs, should I remove that file?
     
    Last edited: Dec 28, 2018
  44. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,884
    We used to have some partial classes back in earlier versions - I think you probably have some older files hanging around. You can try just deleting that file, but you're probably better off removing the entire UMA/Core folder and reimporting.
     
  45. DavidBVal

    DavidBVal

    Joined:
    Mar 13, 2017
    Posts:
    99
    Worked, thanks, it's now compiling without errors. Be aware that I had just installed the current Unity Store version, so the partial class is present there.
     
  46. Lathrey

    Lathrey

    Joined:
    Jun 7, 2016
    Posts:
    15
    Really new to UMA so I apologize if this is a stupid question or if I'm doing something wrong. I am trying to write a script to auto-resize a capsule collider around my UMA and I thought I would just ask the SkinnedMeshRenderer for it's bounds and use those. This seems to work fine but when I change the DNA height of the UMA it seems the bounds only grow and never shrink in the y-direction (height of the UMA.) Is this expected behavior or is it possible this is a bug?

    Edit: Note this increasing height is also happening with UMAAvatarBase.umaData.characterHeight.

    Thanks!
     
    Last edited: Dec 30, 2018
  47. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,884
    You will need to tell it to recalculate the bounds using sharedmesh.recakculatebounds.
     
  48. Lathrey

    Lathrey

    Joined:
    Jun 7, 2016
    Posts:
    15
    Thanks Jaimi but that doesn't seem to work.

    Telling UMAAvatarBase.umaData.GetRenderer(0).sharedMesh to RecalculateBounds doesn't seem to do anything to the associated UMAAvatarBase.umaData.GetRenderer(0).localBounds or .bounds. If I used the .GetRenderer(0).sharedMesh.bounds these are completely wrong and centered at the avatar's feet.

    I notice that there is code that seems to be explicitly setting the bounds when you adjust the DNA. This is in DynamicDNAConverterBehaviour.UpdateDynamicDnaBones and on line 299 (UMA 2.7 from Asset Store) they set the bounds:
    umaData.GetRenderer(0).localBounds = newBounds;

    Thoughts?

    Here is some really quick code I'm using for testing. I just created a basic UMA (DynamicCharacterAvatar) and added a CapsuleCollider and RigidBody (isKinematic) and put this script on the same GameObject. I then assigned the DynamicCharacterAvatar and CapsuleCollider to the script in the inspector. I then run and when the UMAData object shows up I drag the 'height' slider back and forth a bunch of times and watch as meshSize_.y continues to increase. I can make a video of it if that helps. Thanks!

    Code (CSharp):
    1. using UMA;
    2. using UnityEngine;
    3.  
    4. public class AutoResizeCollider : MonoBehaviour
    5. {
    6.     public CapsuleCollider umaCollider_;
    7.     public UMAAvatarBase umaAvatar_;
    8.  
    9.     // For viewing in editor
    10.     public Bounds meshBounds_;
    11.     public Vector3 meshSize_;
    12.  
    13.     private SkinnedMeshRenderer skinnedMesh_ = null;
    14.  
    15.     void Update ()
    16.     {
    17.         if (skinnedMesh_ == null)
    18.         {
    19.             skinnedMesh_ = umaAvatar_.umaData.GetRenderer(0);
    20.             if (skinnedMesh_ == null)
    21.             {
    22.                 return;
    23.             }
    24.         }
    25.         skinnedMesh_.sharedMesh.RecalculateBounds();
    26.         meshBounds_ = skinnedMesh_.localBounds;
    27.         meshSize_ = meshBounds_.size;
    28.         float height = meshBounds_.size.y;
    29.         float width = Mathf.Max(meshBounds_.size.x, meshBounds_.size.z);
    30.         umaCollider_.center = new Vector3(0.0f, height / 2.0f, 0.0f);
    31.         umaCollider_.height = height;
    32.         umaCollider_.radius = (width / 2.0f);
    33.     }
    34. }
    35.  
     
  49. Lathrey

    Lathrey

    Joined:
    Jun 7, 2016
    Posts:
    15
    Horribly inefficient but this does work (baking the mesh and getting the bounds of it) so I'll see if I can limit recalculating it to when the character change event happens. Interesting that it actually updates with animations as well so because I have the default idle animation running the collider is constantly resizing while the UMA moves slowly back and forth.

    Code (CSharp):
    1.     void Update ()
    2.     {
    3.         if (skinnedMesh_ == null)
    4.         {
    5.             skinnedMesh_ = umaAvatar_.umaData.GetRenderer(0);
    6.             if (skinnedMesh_ == null)
    7.             {
    8.                 return;
    9.             }
    10.         }
    11.         Mesh currentMesh = new Mesh();
    12.         skinnedMesh_.BakeMesh(currentMesh);
    13.         meshBounds_ = currentMesh.bounds;
    14.  
    15.         skinnedMesh_.sharedMesh.RecalculateBounds();
    16.         //meshBounds_ = skinnedMesh_.localBounds;
    17.         meshSize_ = meshBounds_.size;
    18.         float height = meshSize_.y;
    19.         float width = Mathf.Max(meshSize_.x, meshSize_.z);
    20.         umaCollider_.center = new Vector3(0.0f, height / 2.0f, 0.0f);
    21.         umaCollider_.height = height;
    22.         umaCollider_.radius = (width / 2.0f);
    23.     }
    24.  
     
  50. Lathrey

    Lathrey

    Joined:
    Jun 7, 2016
    Posts:
    15
    Ran into another issue I'm hoping someone has seen before. I'm trying to use the Invector Third Person Controller - Basic Locomotion Free with UMA 2.7. I've followed the guides I can find but it seems like Invector isn't properly finding the bone structure created with the bone builder utility. When started I get a bunch of Null reference exceptions and the UMA sinks into the ground plane about halfway. It can still be moved around and jump, etc. but the animations don't work. I think the issue might be that the bones created are in a hierarchy Root->Global->Position->Hips but the associated Avatar asset (Male_UnifiedAvatar I think) assumes the base is Global and not Root.

    Has anyone successfully integrated these recently? Thanks.