Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. dudedude123

    dudedude123

    Joined:
    Aug 24, 2013
    Posts:
    123
    I was using this video to make physics for my fighting game but I'm not sure how it works




    Will this
    Code (CSharp):
    1.  
    2. public Collider[] fist;
    3.  
    4. private void InflictDamage(Collider collider)
    5.     {
    6.         Collider[] colliders = Physics.OverlapBox(collider.bounds.center, collider.bounds.extents, collider.transform.rotation, LayerMask.GetMask("Fist"));
    7.         foreach(Collider c in colliders)
    8.         {
    9.             if (c.transform.parent.parent == transform)
    10.                 continue;
    11.  
    12.             float damage = 0;
    13.             switch(c.name)
    14.             {
    15.                 case "Head":
    16.                     damage = 1;
    17.                     break;
    18.                 case "Body":
    19.                     damage = 1;
    20.                     break;
    21.                 case "Arm":
    22.                     damage = 0;
    23.                     break;
    24.             }
    25.         }
    26.     }
    work with UMA?
     
    Firlefanz73 likes this.
  2. Pomelo874

    Pomelo874

    Joined:
    May 31, 2017
    Posts:
    22
    I had asked on the Slack already and not get a solution. I chose waiting for your programmer.;)

    BTW, we want to use the same Face Animation system as UMA ( UMA_20_Expressions_M.fbx ), since our rig is resizing, So the best way is making a new face animation around 1000 frames with the same key frame design, is that right?
     
    Teila likes this.
  3. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,794
    Ack, he is in bed now. Sorry, I will try to remember tomorrow to get him to help you, either here or on Slack. His Unity time is limited.

    He cannot help you with the face stuff, sorry.
     
    Pomelo874 likes this.
  4. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    615
    There's nothing special about that particular sequence of keyframes, they just need to be spaced enough that the importer can cleanly pick out the specific poses you want from the animation. There is also a rough editor for the poses you can use inside Unity, but using an external app is probably simpler if you have one you're comfortable with.
     
    Pomelo874 likes this.
  5. Pomelo874

    Pomelo874

    Joined:
    May 31, 2017
    Posts:
    22
    ;)will the help come today?
     
  6. dudedude123

    dudedude123

    Joined:
    Aug 24, 2013
    Posts:
    123
    Are there any UMA collision tutorials?
     
    Firlefanz73 likes this.
  7. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    340
    @Pomelo874 , you're referring to this issue from dudedude123, correct?

    The issue is caused from an incorrect animation controller. Double check you are using the correct one under "Race Animation Controllers" -> "Default Animation Controller"
     
  8. Pomelo874

    Pomelo874

    Joined:
    May 31, 2017
    Posts:
    22
    Hi Kenamis, nice to see you here, I don't know anything about dudedude123.
    At this time, I am only waiting for the patched code about tolerence.
     
  9. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,794
    I guess not. We spent last night dealing with a scam artist who stole money from my elderly mother so I honestly forgot all about it. Priorities, you know.
     
  10. Pomelo874

    Pomelo874

    Joined:
    May 31, 2017
    Posts:
    22
    Sorry to hear that, hope things will get better.
     
  11. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,956
    Take a look at the UMA26 tree, and the ragdoll example. it shows how to add the colliders to the Dynamic Character Avatar. Integrating physics is not a simple task, so I can't really help walk anyone through it. Doing it the way the Ragdoll Example does it is the 'right way'.

    However, if it were me, I would likely cheat like mad, and just add sphere colliders to the fists/feet bones, and box colliders (trigger) to the bodies (probably to the headadjust and spine1), and fudge them to be "about correct", and go from there.


     
    hopeful, TeagansDad and Teila like this.
  12. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    340
    I'm not sure what you're original issue was, but if you're just trying to use Unity's Third Person controller, and the "tolerance/ground check" fix that Teila is referring to, then follow the steps here; http://www.umawiki.secretanorak.com/Third_person_controller
     
    Pomelo874 and Teila like this.
  13. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,956
    Lets define the issue as best we can. This is what I think has happened - please correct me where I am mistaken.

    1. You create a new skeleton in max by scaling the bones of the old skeleton.
    2. You then bound your character to this skeleton, chopped it up, and exported it.
    2. Then you created the slots for the character, and when you built it, at some point it came out all "chunky" looking where you didn't expect it to.

    If that is the issue we're looking at, Here's what we need to know:

    1. Did you extract the t-pose for the new skeleton? (by exporting a t-posed character, and using the menu item)
    2. Did you create a new race with the new t-pose?
    3. Did you create new DNA for the new race? (it's a lot easier to create "dynamic DNA").
    4. Did you create a new Base Recipe for the character?
    5. Did it look correct when built with the default DNA (from #3), or did it mess up after adjusting DNA?
     
    Pomelo874 and Teila like this.
  14. dudedude123

    dudedude123

    Joined:
    Aug 24, 2013
    Posts:
    123
    Wheres the ragdoll example?
     
  15. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    340
    hopeful likes this.
  16. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,009
    UMA26 branch on github.
     
    kenamis likes this.
  17. lorddanger

    lorddanger

    Joined:
    Aug 8, 2015
    Posts:
    74
    What is the poly count for each uma character complete with hair and is it possible to make it low ploy?
     
  18. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,009
    Do you know how many polys you are aiming for?

    The original UMA body art is lower in polys than the newer stuff that's still in the process of coming out, but the main thing is you can use the UMA system and supply your own body art. So if you want to go extremely low poly, so long as you are comfortable making your own character art, this system can still work for you.
     
  19. Anisoropos

    Anisoropos

    Joined:
    Jul 30, 2012
    Posts:
    92
    Hey thanks for this awesome framework.

    My only concern before integrating it is that it might be a bit overkill ;
    • Build size went from 80MB to 500MB just by including the sample UMA DCS Demo - Using Asset Bundles scene to my build scenes. Is this to be expected? Can it be reduced?
    And a bit confused as to wether this is a benefit or not:
    • I want to expose ~10 different body archetypes (per race) for the player to choose from. With UMA, all items should in theory stick well to those bodies since they are created by tweeking sliders from the same race. If instead I used traditional modeling, the artist would have to make 10 variations of each race (archetypes) and 10 variations of each item, one for each archetype ; correct?
     
  20. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,956
    The build size is large because (by default) everything is added to the global library, that includes all the, overlays (which bring along their textures), slots (mesh data), etc. You can clear the slots, overlays and recipes from the global library that you don't need and it will drastically lower the build size. (what you need will basically be dependent on your game. At the minimum you will need one set of body slots, and the body and face overlays).

    Your assumption is correct. You can create 10 different archetypes all based from the same slots, and UMA will build them on the fly.

    What I do is create a new "race" for each type and sex -- in addition to "Human Male" and "Human Female", I have "Elf Male", "Elf Female", "Orc Male", "Orc Female", "Gnome Male", "Gnome Female" (etc). Each race is marked compatible with the corresponding human race. (ie - "Gnome Male" is compatible with "Human Male"). Each race has a different "Base race recipe". For example, for the Elf Male, I duplicated the "Human Male" base race recipe, tuned the DNA to make it thinner, etc, replaced the head with the separated head, and added the elf ears (basically, just made it "elfish").

    You don't have to do it that way. You can create a "race" slot, for example, and then create a wardrobe recipe that basically replaces everything in the base, for example, and manage the DNA separately.
     
    Anisoropos, Pomelo874 and hopeful like this.
  21. dudedude123

    dudedude123

    Joined:
    Aug 24, 2013
    Posts:
    123
    How do I make the colliders hitboxes?
     

    Attached Files:

  22. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    340
    You'll have to change your script to find them at runtime, probably find them by bone name.
     
  23. dudedude123

    dudedude123

    Joined:
    Aug 24, 2013
    Posts:
    123
    Like this?
    Code (CSharp):
    1. case gameObject.GetComponent<Collision>()."HeadHD":
    2.                     damage = 1;
    3.                     break;
     
    Last edited: Jun 24, 2017
  24. Anisoropos

    Anisoropos

    Joined:
    Jul 30, 2012
    Posts:
    92
    Solved this right after I posted..

    This will get you the data (you need to filter 'base' colors like skin, hair etc sometimes)

    Code (CSharp):
    1. UMAData.UMARecipe ur = tr.GetCachedRecipe(Avatar.context);
    2. foreach(OverlayColorData colorData in ur.sharedColors)
    3. {
    4.     ..
    5. }
     
    Last edited: Jun 24, 2017
  25. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    340
    That doesn't look quite valid. I assume you'd want to be getting the component of a collider type. Also, you'll need to tie this function in to an event callback or sometime appropriate after the colliders get added. If you send me a private message or message me on slack I can help you with the specifics for your project.
     
  26. Firlefanz73

    Firlefanz73

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

    I would like to attach the camera Position to the eyes Position, at least in some situations /animations.

    Can I get the eyes position somehow from my UMA (Player)?

    Thanks and have a nice sunday :)
     
  27. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    340
    if you have access to your umaData, then you can use GetBoneGameObject(string boneName)

    instead of getting the eye positions though, I'd recommend grabbing the head transform and then offsetting it's position.
     
    Last edited: Jun 25, 2017
    hopeful and Firlefanz73 like this.
  28. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,116
    Thanks! It works.
     
  29. dudedude123

    dudedude123

    Joined:
    Aug 24, 2013
    Posts:
    123
    I don't know how to send a private message on here
     
  30. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,116
    Click a Profile Picture then "Start a conversation" ?
    Works like a Forum for just you two.
     
  31. createthiscom

    createthiscom

    Joined:
    Dec 19, 2016
    Posts:
    67
    New to UMA. Looks pretty awesome. I was playing with the "Simple Setup" scene today after reading through the Getting Started file. It's great, but I couldn't figure out how to save the character I had created. I thought maybe pressing "Create in Code" would do the job, but that didn't seem to work. I also thought copying the UMADynamicCharacterAvatar might work, but it broke when I pasted and the DNA settings were defaulted.

    What's the procedure for saving a character? Thanks.
     
  32. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    340
  33. createthiscom

    createthiscom

    Joined:
    Dec 19, 2016
    Posts:
    67
    Cool. Thanks. What's the best way to hide the head of an UMA in 1st person mode, but still have it visible in mirrors?
     
  34. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,956
    Easiest thing to do is to not hide the head, and instead place the camera right in front of the eyes. Otherwise, you have to deal with having two UMA's, and putting them on different layers, and culling/not culling the head.
     
  35. createthiscom

    createthiscom

    Joined:
    Dec 19, 2016
    Posts:
    67
    It's a shame we don't just have the head on a separate layer. That would make things easy.
     
  36. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,956
    Try the camera in front of the eyes - I actually like it that way, it feels more natural to me when the character looks around (for a test, you can make it a child of the HeadAdjust bone - but this will be a bit jittery and bouncy. For a real solution you'll need a way to dampen the movement, etc). Using this method, you move the head/body to look, instead of the camera.
     
  37. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    You can do that. UMA supports generating multiple skinned mesh renderers, it was designed with cloth in mind rather than setting layers so it comes with some assembly required. You should join the slack channel and ask a few questions.
     
    hopeful likes this.
  38. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,785
    Another solution is to move the near plane of the view frustrum ahead
     
    hopeful likes this.
  39. shahafyz

    shahafyz

    Joined:
    Mar 26, 2014
    Posts:
    7
    hi everyone :)
    i started looking into uma
    im creating my own race and was wondering if uma can change the avatar bones based on what in the slots

    for example switching from a 5 fingers hand to 3 fingers hand
    of changing the legs from plantigrade locomotion to digitigrade locomotion
    or adding a tail or wings
     
    hopeful likes this.
  40. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    Of course it can... the only thing is that the existing content is made for the existing races and what you describe would not be compatible.
    While it's obvious that if you make a digitigrade race then the existing boots will not work, but the same is true with all content including the upper body shirt, unless you take care to make the upper body rig of your digitigrade race completely identical...
     
  41. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,956
    Umut has a sample where he does basically the same thing with high-heeled shoes (with his Bastioni-based races). I think it should be on the asset store soon.
     
  42. dudedude123

    dudedude123

    Joined:
    Aug 24, 2013
    Posts:
    123
    I cant get the model to move, I had set up the animator to move at less than -0.1 and greater than 0.1


    2017-06-30_00h56_21.png 2017-06-30_00h55_26.png
     
  43. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    340
    If you want your character to move you'll need a controller script. I don't see any from your screenshots.
     
  44. dudedude123

    dudedude123

    Joined:
    Aug 24, 2013
    Posts:
    123
    I had set up the script like this to control the model
    Code (CSharp):
    1.  
    2. // Use this for initialization
    3.     private Animator animator;
    4. void Start()
    5.     {
    6.  
    7.         animator = GetComponent<Animator>();
    8.  
    9.     }
    10.  
    11.     void Update()
    12.     {
    13.  
    14.         v = Input.GetAxis("LeftThumbstickY");
    15.         h = Input.GetAxis("LeftThumbstickX");
    16.         v = Input.GetAxis("LeftThumbstickY");
    17.         h = Input.GetAxis("LeftThumbstickX");
    18.         punch = Input.GetAxis("RightThumbstickY");
    19.         leftright = Input.GetAxis("RightThumbstickX");
    20.         punch = Input.GetAxis("RightThumbstickY");
    21.         leftright = Input.GetAxis("RightThumbstickX");
    22.         animator.SetFloat("Punch", punch);
    23.         animator.SetFloat("LeftRight", leftright);
    24.         animator.SetFloat("Vertical", v);
    25.         animator.SetFloat("Horizontal", h);
    26. }
     
  45. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    340
    Why is this duplicated?

    For why it won't move, try viewing the animator states during runtime or add some debug.log . My initial guess is that 'h' and 'v' aren't getting any input from Input.GetAxis("LeftThumbstick..."), so I'd confirm that first.
     
    Last edited: Jul 2, 2017
  46. dudedude123

    dudedude123

    Joined:
    Aug 24, 2013
    Posts:
    123
    I got an error:
    Type `UMA.UMAData' does not contain a definition for `GetRenderers' and no extension method `GetRenderers' of type `UMA.UMAData' could be found. Are you missing an assembly reference?
     
  47. JamesK24

    JamesK24

    Joined:
    Feb 28, 2017
    Posts:
    20
    Hello guys,

    We've been using UMA for a long time, and it's fantastic.

    However, one of my programmers has a habit of going through UMA scripts and adjusting them to his own taste. I get that sometimes compiler errors do occur and a fix is necessary. But, with this kind of work habit our whole team goes through nightmares whenever there is an UMA update.

    I want to address the UMA masters before doing any adjustments or fix to our UMA scripts.

    1. Ios Compile error -"assetBundleNale' does not exist in the current context.
    Original Script
    Code (CSharp):
    1. if (bundleBaseDownloadingURL.ToLower().StartsWith("odr://"))
    2.             {
    3. #if ENABLE_IOS_ON_DEMAND_RESOURCES
    4.                 Log(LogType.Info, "Requesting bundle " + [B]assetBundleName[/B] + " through ODR");
    5.                 m_InProgressOperations.Add(new AssetBundleDownloadFromODROperation(assetBundleToGet));
    6. #else
    7.                 new ApplicationException("Can't load bundle " + assetBundleToFind + " through ODR: this Unity version or build target doesn't support it.");
    8. #endif
    9.             }
    10.             else if (bundleBaseDownloadingURL.ToLower().StartsWith("res://"))
    11.             {
    12. #if ENABLE_IOS_APP_SLICING
    13.                 Log(LogType.Info, "Requesting bundle " + assetBundleName + " through asset catalog");
    14.                 m_InProgressOperations.Add(new AssetBundleOpenFromAssetCatalogOperation(assetBundleToGet));
    15. #else
    16.                 new ApplicationException("Can't load bundle " + assetBundleToFind + " through asset catalog: this Unity version or build target doesn't support it.");
    17. #endif
    18.             }
    19.  
    Revised Script

    Code (CSharp):
    1. if (bundleBaseDownloadingURL.ToLower().StartsWith("odr://"))
    2.             {
    3. #if ENABLE_IOS_ON_DEMAND_RESOURCES
    4.                 Log(LogType.Info, "Requesting bundle " + [B]assetBundleToFind[/B] + " through ODR");
    5.                 m_InProgressOperations.Add(new AssetBundleDownloadFromODROperation(assetBundleToGet));
    6. #else
    7.                 new ApplicationException("Can't load bundle " + assetBundleToFind + " through ODR: this Unity version or build target doesn't support it.");
    8. #endif
    9.             }
    10.             else if (bundleBaseDownloadingURL.ToLower().StartsWith("res://"))
    11.             {
    12. #if ENABLE_IOS_APP_SLICING
    13.                 Log(LogType.Info, "Requesting bundle " + assetBundleToFind + " through asset catalog");
    14.                 m_InProgressOperations.Add(new AssetBundleOpenFromAssetCatalogOperation(assetBundleToGet));
    15. #else
    16.                 new ApplicationException("Can't load bundle " + assetBundleToFind + " through asset catalog: this Unity version or build target doesn't support it.");
    17. #endif
    18.             }
    19.  
    The assetBundleName was changed to assetBundleToFind. Is this alright? I know it solves the problem, but later on with more updates I don't want any trouble and conflicts.
     
  48. shahafyz

    shahafyz

    Joined:
    Mar 26, 2014
    Posts:
    7
    is it possible to use the dna to change a slot size without affecting the next part in the body shape

    for example
    forearm change width(x,z) but not length(y) right now this cause the palm to also deform(x,z) which cause the palm to lose its shape

    what i want is that the palm bone will increase scale in all axis so it wont get deformed unless done in its own slider

    forearm scale(x=1.5,y=1,z=1.5) palm change scale to (x=1,y=1.5,z=1) so it wont get deformed
     
  49. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    340
    Yes

    Are you saying you're seeing this issue currently? If so, are you using the UMA human race or did you make your own?
    The UMA human race has forearm width dna that scales the forearmAdjust bone which does not affect the hand bone and very minimally the hand vertices (the seam).
     
  50. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    340
    UMAData.GetRenderer(int idx) and UMAData.GetRenderers() are in uma2.6 (beta/development branch on github) to support multiple renderers. You need to be using that version to use those functions.
     
unityunity