Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    OK - here's the fix. I'll get this worked into 2.8. Around line 503 in CharacterBaseEditor.cs, there is a block of code:

    Code (CSharp):
    1.                 if (FirstSlot == null)
    2.                 {
    3.                     FirstSlot = _recipe.GetSlot(0);
    4.                 }
    Replace it with this:

    Code (CSharp):
    1.                 if (FirstSlot == null)
    2.                 {
    3.                     foreach (SlotData sd in _recipe.slotDataList)
    4.                     {
    5.                         if (sd != null)
    6.                         {
    7.                             FirstSlot = sd;
    8.                             break;
    9.                         }
    10.                     }
    11.                 }
    12.  
     
    hopeful likes this.
  2. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870

    "Unity Custom IK" doesnt work with the unified version of UMA either, the arms just fly everywhere, cant understand why that would be because everything is identical to their demo scene, but by some magic it doesnt work.

    I even attached their demo rig onto the arm of the UMA, and that works, but as soon as i tell it to IK the UMA's arm it goes crazy.

    Maybe the coordinates of the UMA joints are moving behind the scenes somehow and its trying to follow it?
     
  3. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Something about the skeleton it doesn't like - I'll look at it, but I can't promise anything. I'd recommend getting AnyIK, the author is very active in the UMA community.
     
  4. IbtesamSadiq

    IbtesamSadiq

    Joined:
    Aug 24, 2017
    Posts:
    4
    I am getting error on dna["headSize"].Set(1f); the error is "KeyNotFoundException: The given key was not present in the dictionary".
     
  5. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    What this is saying is that it can't find the "headSize" DNA.

    This can happen for several reasons:

    • The DNAConverterBehavior that includes it is not on the race.
    • The spelling or case is wrong
    • You are accessing the DNA before the avatar is built. This is probably the most common.
    The DNA is on the race, so until the avatar is built, it doesn't yet have any DNA. The building process merges all the wardrobe and base recipes together (including the base race recipe with the DNA), and then schedules the Avatar to be built by the generator - this will usually happen on the next frame (but could be delayed by a frame if "fast generation" is turned off). An event is sent when the build is complete (see the events on the DCA).

    The expected way to solve the "setting the character up before it's built" problem is to save the character to a JSON string (or file), and then have the DCA load and build itself from that.
     
    hopeful likes this.
  6. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hi all,

    I am using UMA with RFPS prefab and it work very well...

    Making a shooter I have some Custom UMA Characters that are Enemy NPC Characters and I instantiate a weapon for the enemies to use which works fine and the enemies shoot away as they shouuld.....

    That said I have one thing that I cant find out how to do.....

    Anyone know how to add a muzzle flash to the end of the weapon when the enemy/weapon fires (bullet)?

    I have not been able to find any info anywhere about how this might be done. Obviously the muzzle flash needs to be (invisible) unseen until the enemy fires the weapon as opposed to the weapon itself which is immediately displayed on game run in editor. The UMA Enemy and weapons themselves work fine and the enemy bullet is correct as the enemy can damage other UMA or non UMA NPC's. Just the muzzle flash bit missing which kinda looks naff at the moment....

    Any help would be very much appreciated.

    Thank you kindly :)

    Peter
     
  7. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    There shouldn't be a special way to do this specifically with UMA. It should be built in to rfps, I thought?
    Did you make your weapons as slots? If so, I'd recommend keeping them separate normal game objects, like rfps does without UMA.
     
    LukeDawn and hopeful like this.
  8. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Thanks for that.

    Yes I use RFPSP Enemies, Tactical AI Shooter Enemies and in those instances the muzzle flash works as should by attaching the muzzle flash appropriately to the end of the weapon....

    As said though in the case of UMA it is totally different as the weapon is not existing until it is instantiated at run time and if the muzzle flash is physically attached to the end of the weapon to be instantiated it displays attached to the end of the weapon always. i.e. when the enemy Character spawns with the weapon so does the muzzle flash, whereas we only want it to instantiate or display to view when the weapon is fired so its incorrect as it is either way. Either I have a permanent muzzle flash displaying or none at all at the moment.

    As a thought it might be needed to attach the muzzle flash to the bullet? though I don't know if it would work at all as that would mean it would probably follow the path of the bullet if it appeared at all.

    Not sure if anyone using UMA has ever done this?

    Thanks again

    Peter
     
  9. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I have never used this package. But just using regular Unity, I would have approached it this way: create a prefab that has all of game objects on it (rifle, flash, audiosource, etc). Disable the flash on the prefab. Write a script that would trigger the flash to enable, play the gunshot sound, and then execute a delayed function that would disable the flash after a few MS. Then, I would instantiate that prefab instead of the rifle.

     
    hopeful likes this.
  10. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    You ought to be using the "bone builder" feature of UMA, and then setting your character up otherwise just like it is done for Tactical AI (or whatever). With the bone builder you get a skeleton you can attach items to, just as you would with a regular non-procedural model.
     
  11. bschumacher

    bschumacher

    Joined:
    Mar 9, 2014
    Posts:
    10
    What would be the best way to generate a separate mesh renderer for Arms and the Body using the Dynamic Character Avatar?

    I'm thinking it would be ideal to set the default renderer to Shadows Only and have two others for the Arms and Body with Shadows disabled in first person mode and have the Arms and Body disabled while in third person while setting the default to enabled.

    Is there an easy way to accomplish this? Has anyone done it? Is there a better way?
     
  12. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    If you use the bone builder, you can construct partial umas without a problem. You can create wardrobe recipes that hide everything you dont want to see, and add/remove and rebuild to get what you want with a single UMA
     
    bschumacher likes this.
  13. bschumacher

    bschumacher

    Joined:
    Mar 9, 2014
    Posts:
    10
    Thanks I'll give it a try.
     
  14. bschumacher

    bschumacher

    Joined:
    Mar 9, 2014
    Posts:
    10
    My UMA menu looks vastly different from the Wiki, page that shows how to do that.
    The docs being out of date threw me off for a bit but I got it figured out and works perfectly. Thank you again.
     
  15. IbtesamSadiq

    IbtesamSadiq

    Joined:
    Aug 24, 2017
    Posts:
    4
    I want to use UMA in unity's new HD rendering pipeline if Its possible. Is UMA support the unity's new HD renderig pipeline??
     
    Last edited: Sep 22, 2018
  16. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
    There are issues with the current HD Render pipeline AFAIK. They are aware of it, just waiting for the release of a stable Unity version with the HD Pipeline feature (as in not experimental).
     
  17. AsoraX

    AsoraX

    Joined:
    May 3, 2017
    Posts:
    22
    Hey guys... May a dump question, but i couldn't find a fast solution for it :D
    How can i blend out the head, or what is the best solution to use UMA in FPS?

    Thanks ;)
     
  18. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    If you use the bone builder, you can build partial UMAs. If you always want the head gone, you can simply remove it from the base race. If you want it optional, You would need to make a wardrobe item that turned off the items you don't want to see.
    Personally, I would just place the camera in front of the face for an fps.


     
    umutozkan likes this.
  19. chaza_li

    chaza_li

    Joined:
    Jan 8, 2018
    Posts:
    29
    Hi guys,

    Is there anything I have to add before using Will B's face pack? It doesn't work for me at the moment....and there are no text recipes that came with it, is that normal?
     
  20. chaza_li

    chaza_li

    Joined:
    Jan 8, 2018
    Posts:
    29
    Moreover, is there some way we can create our own recipe for the faces only?

    Thanks guys!
     
  21. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
    Hey guys, just an FYI, I am running a giveaway in Unity forums for the o3n assets. (Most of them are content for o3n UMA Races)

    Thread is here.
     
  22. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    Is there a tutorial on how to use UMA with AnyIK in VR (VRTK)?
     
  23. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
    I don't know if there is a tutorial But when you put AnyIK (3) on the UMA avatar it should just work. AnyIK 3 detects avatar in the runtime.

    For AnyIK2 there should be an animator relay script that does that for you.
     
  24. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    I have AnyIK2 tho not 3 .....
     
    Last edited: Sep 23, 2018
  25. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
    You should be able to upgrade to AnyIK3 for just $1. If you are using humanoid animators I recommend it.

    As I said you can just use the animator relay script in AnyIK2, on the avatar. It connects the IK scripts to the UMA avatar at runtime. If I am not mistaken there should be a section in the guide.pdf (in the package) that explains that script.
     
    Mark_01 likes this.
  26. Turniper

    Turniper

    Joined:
    Nov 2, 2013
    Posts:
    15
    So, I'm trying to integrate UMA with my existing ragdoll management code. I installed UMA, grabbed all the scene level assets, popped a DCA onto my existing character controllers and it was pretty simple to get everything working. Since my code expects ragdoll objects to be populated at compile time, I used the UMA bone builder and then the standard unity ragdoll wizard on the output bones. That worked fine, and when I run the scene, the UMA smoothly transitions from animator control to ragdoll control on death. However, if I update the UMA's outfit mid run, by using code like:

    UMAavatar.SetSlot(UMAHitEffectDecals[1]);
    UMAavatar.BuildCharacter();

    It will update and run fine, but when it comes time to enable the ragdoll mode, the character just starts floating in T-Pose. I've checked that all the relevant rigidbodies and colliders are still present, and all the colliders kinematic/trigger/gravity settings are set or unset as appropriate. The gameobject looks like exact same as before, but it doesn't collapse. Is this a known issue, or is there any documentation on exactly what happens when characters get rebuilt (Other than the code?). I've tried using getcomponent to re-grab references to the colliders after the rebuild, and stepping through my c# functions, but I don't see anything obviously out of place on the skeleton, and I'm not the most familiar at debugging physics objects. I could probably figure it out myself eventually, but I'm really hoping there's something obviously wrong with my workflow. The wardrope recipes in question are just overlays, but removing an item of clothing does the same thing, so I think it's related to the rebuild step.
     
  27. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Have you looked at the "RagdollExample" scene? It shows how to ragdoll a DCA. I tested rebuilding it in that test scene, and didn't have any issues. The characters in that scene use a UMA script to setup the ragdoll (UMAPhysicsAvatar). It looks like that is doing some additional work that might be needed.
     
  28. chaza_li

    chaza_li

    Joined:
    Jan 8, 2018
    Posts:
    29
    Sorry to disturb once more guys, just a few questions:

    1. Is it possible to change the textures associated to the UMA materials during runtime? I began an approach by changing the Texture[] in the overlay, but not sure whether if thats the correct way of doing it.

    2. Can we substitute head/faces using the UMA201 approach (making a slot) as well? Is there a better way of doing so?

    Thanks!
     
  29. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208

    1. While it is possible, it is also dangerous as Overlays are shared, and UMA's can be rebuilt for various reasons on the fly (LOD, etc). I recommend instead to swap out recipes with different overlays, if possible.

    2. Yes you can - we actually have two different heads for the main body (low and medium poly count), and you can swap them out no problem. To swap out base race slots takes a little more setup:

    • 1. You need to use the "replaces" option in your recipe for the new head (not the one that hides).
    • 2. You should name the new slots the same as the one it replaces.
    There is a sample recipe (MaleLowPolyHead) that shows how to do it. My copy was wrong though - the "replaces" should point to MaleHead_Head.
     
  30. chaza_li

    chaza_li

    Joined:
    Jan 8, 2018
    Posts:
    29
    Thanks for the prompt reply Jaimi!
     
  31. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197
    Hello,

    I have the problem when i use UMA Characters the cars and helicopters where the UMA CHaracter then in it flips the car and in heli bounce up from ground and twist .

    With other character not :( only with UMA

    Regards
     
  32. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    That sounds like a character controller issue. You need a character controller that is designed to ride in vehicles.

    It's like with riding horses. In that particular case, you can use Horse Animset Pro ... either to buy or to research to understand the idea.
     
  33. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    It might also be possible that your colliders are intersecting with the colliders for the vehicle. Getting something that already takes care of that like @hopeful says is probably the simplest. If you're planning to do this on your own, you will likely need to disable the colliders before they enter the vehicle.
     
    hopeful likes this.
  34. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197

    Yes thanks but as said with other Characters from Moprh3D to Fuse Character it work good only with UMA Charcater not :(
     
  35. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Like I mentioned previously, it's probably the colliders (and the rigidbody). You should disable them. Intersecting physics primitives cause all kinds of issues.
     
  36. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    Sorry ... for some reason I thought your post said the problem was with all characters. If your problem is only with UMA, keep in mind that by default UMA creates a capsule around the character, and this can be switched off. It's a setting on each UMA. IIRC, it's a checkbox. (That's what Jaimi is talking about.)

    Oh, I see ... I read it as "With other character, not only with UMA." Which would mean all characters. Oh well. :)
     
  37. chaza_li

    chaza_li

    Joined:
    Jan 8, 2018
    Posts:
    29
    Hi Jaimi a follow up from this, when I append the new head recipe it seems that there are only the eyes and mouths left (perhaps the head is shown as a totally transparent model? idk), is there a solution to this? Thanks!
     
  38. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    It sounds like there is a problem with the new head slot - sometimes Unity exports models, and makes them 100 times too small - in this case, the slot builder should have shown a warning that it was so small. If you did get the warning, you might try reimporting the base fbx after setting the scale value to 100 in the import settings.

    If that's not it, maybe it is transparent - what UMAMaterial are you using? The default one should have no alpha, but there is a cutout version that will clip anything out based on the templates alpha cutoff value.
     
  39. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    151
    Hello,

    I plan for my game to have characters looking as realistic as possible, with possibility to add character customization screen to let player modify his characters runtime. I've been thinking about combination of UMA and iClone, but as I have very limited experience with character modeling and graphic in general, I would be grateful for any advice about this approach. Is it viable solution or there are better ways then using iClone?
     
  40. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
    Although you can use the output of iClone in UMA and create a configurable avatar out of it, you won't have access to the modifications in iClone at runtime. (AFAIK exported fbx don't have any blendshapes for body etc.)

    If you omit the runtime modification part you can easily use the iClone character as UMA and manage the wardrobe equipment through UMA.

    Also look at other UMA races that have different look than base UMA male & female. Like "my" o3n UMA Races (Demo here)or Willb's base 2 UMA races (female base 2, male base 2).
     
  41. IbtesamSadiq

    IbtesamSadiq

    Joined:
    Aug 24, 2017
    Posts:
    4
    Is this me or every one else feel like UMA character has shine effect after setting the metalic and smooth value to zero?
    and I want to create LOD meshes for UMA character by is there any good tutorial series that can help and i am creating my own race using these

    so i also want to use mesh lods if there is any tutorial on that it would be much easier to achieve that.
     
  42. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
    For mesh LOD all you need to do is create the slots with proper names (like _LOD2 etc at the end of the slot name). They need to be in the UMA library (global or in the scene)

    When you put UMASimpleLOD script on the avatar and select the swap slot option it checks to see if it can find a slot for calculated LOD.

    Simple as that :)
     
  43. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    The default materials use the standard shader with a MetallicGlossMap. The MetallicGlossMap can be added or multiplied by the colors assigned to the overlay, or by a shared color - making something shiny where it was not originally.

    So check your colors, specifically the gloss field if you are using shared colors. Also check channel 2 on the overlay make sure they are all black.
     
  44. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    151
    Thanks for your answer. UMA Races looks really interesting. Will check it more closely.
     
  45. qNaN

    qNaN

    Joined:
    Dec 29, 2015
    Posts:
    26
    I would like to have a minimum UMA install.

    UMA's full size is now more than 500 MB when installed in Unity. I see in the package alot of content that may not be necessary for a basic install. Would it be possible to arrange the package differently so the basic UMA system could be located clearly, separated from optional assets?
    Maybe even into several packages?
    As an non-expert user it will be quite hard to sort through the package to strip it down to a minimum install.
     
  46. etheryee

    etheryee

    Joined:
    Feb 3, 2017
    Posts:
    4
    This asset is amazing. But I have one problem to solve. Now my dynamic character avatar is on the child of a gameobject, and the gameobjcet has a ootii motion controller component. This means I need to put the animator on the parent of dynamic character avatar. Motion controller can move the gameobject around but uma doesn't respond to animations. I looked at UMAGenerateBase and made the avatar be created on the parent's animator. UMA still doesn't respond. What's the differences between normal avatar and UMA generated avatar. Regular avatar does respond to motion controller even it is on the parent of the character. Thank you so much.
     
  47. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Most of the size is the sample data in the content folder. You can remove the UMA_Contrib folder, and save 182mb. The UMA_examples folder can also be removed, saving 99mb. Under examples, you can remove extensions_examples, freeing 168mb.

    This will of course break all the samples, so I suggest only doing it when you are comfortable with the system, and you know what you need, and what can be removed.
     
    qNaN likes this.
  48. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I use this with OOTI's controller - first, i used the bone builder to pre-generate the skeleton for the DCA. Then I set it up according to the OOTI docs. This ended up with the DCA and UMAData on the root GameObject along with the motion controller, actor controller, and the animator. As well, I had to put the OOTI "MC_Humanoid_01" animator controller on the DCA "Default Animator Controller".
     
    hopeful likes this.
  49. Detulovnoc

    Detulovnoc

    Joined:
    Mar 12, 2017
    Posts:
    1
    Is there a tutorial I can look at to see how this is done? I've already found the ones by Secret Anorak (https://www.youtube.com/channel/UCjIhCVu3eN5qLAX7H9Uo6jg) but I'm not that far into them and thus not sure if they cover this. I'm working on integrating Opsive First Person Controller functionality and I need independent arms for the weapon overlays
     
  50. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    I am Having an issue with Animating my UMA as an AI. I have animations that i have derived from Mixamo as well as some other sources and with my Mixamo characters my animator controller is working with my scripts perfectly and they navigate my way-points with accurate animations, But when im setting up My Uma to replace the Mixamo Character it moves but without the Animations, and every once in a while when trying to run forward the animation will play but not correctly it seems the gate is off of the walk or run in that case. I have ticked the Tpose to use Mechanim but not sure where i am going wrong from there, This is the first time ive tried using animation with UMA so im sure im missing something simple, Can someone point me in the right direction, Much appreciated.