Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    That is what i cant figure out how to get an index and set tit to color , But thanks ill keep googling
     
  2. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    Your new value variable comes in as a float (that's expected) but you want to use it as an int to index the list. Use (int) before the variable name or mathf.FloorToInt(newvalue)
     
  3. yusue899

    yusue899

    Joined:
    Jan 11, 2018
    Posts:
    5
    Thank you for your answer, I have spent few hrs on my issue today and finally found the problem like you point out I did not add the race data to wardrobe recipe. and there is a new issue coming out from unity warning said I need to rebuild resource reference for those wardrobe recipes I have changed. how do I rebuild the resource reference?
     
  4. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Hmm - I haven't seen that before. You might try telling the Global Library to rebuild itself.
    If that doesn't help, please post the console log with the warning.
     
  5. HP

    HP

    Joined:
    Nov 20, 2012
    Posts:
    80
    Is it possible to add an character event which is executed before a character updates? Like OnBeforeCharacterUpdated.
    I have some trouble to fix DynamicBone Components (http://u3d.as/7fH) after changing the UMA Race.
    The Mesh is deformed and the way to fix it seems like to disable the DynamicBone Components before the Character Update and force the UMA DNA to refresh (like it is happend on DNA sliders) and reactivate the DynamicBone Components on CharacterUpdated.
     
  6. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    That shouldn't be too tough, but is there a drawback to just disabling it when you tell it to update?
     
  7. HP

    HP

    Joined:
    Nov 20, 2012
    Posts:
    80
    Yes there is. If other addons/extensions for UMA tells to update, the disabling in my code does not work in this case.
    The addon/extension can not know what I need to disable or want to do before the UMA Update should perform.
    With events it always call the OnBeforeCharacterUpdate, also for addons/extensions.
     
    Last edited: Jan 27, 2018
  8. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    OK - I'll add a trello task, this probably won't make it into 2.7 though.
     
  9. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Kenamis reminded me that the event already exists - OnCharacterBegun. It's already in 2.7. (If you're using a prerelease, it's at the top until the next release).
     
    hopeful likes this.
  10. HP

    HP

    Joined:
    Nov 20, 2012
    Posts:
    80
    Thanks for the info. :)
     
  11. lorddanger

    lorddanger

    Joined:
    Aug 8, 2015
    Posts:
    103
    Hello,
    Can someone help me with UMA with the recipe and slot
    here is what I am stuck at

    In the examples SampleSetup.cs
    function WardrobeClick .

    there using
    Dictionary<string, List<UMATextRecipe>> recipes = Avatar.AvailableRecipes;

    Now when the Race HumaleMale is selected there are more option in recipes.keys are available than when "HumanFemale" is selected.

    ie: HumaleFemale doesn't have Eyesbrows, Eyes , Face, Ears compare to HumanMale

    Why is it ?
    Where and how I can add more to HumaleFemale.?
     
  12. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    To add more to the female, you need to create Wardrobe Recipes, and then add Slots (meshes) and/or Overlays (textures) to it, and assign it to the female race. There may be some additional slots and recipes we didn't include, but most likely you will either need to create new content, or get some from the asset store here:

    https://www.assetstore.unity3d.com/en/#!/search/page=1/sortby=popularity/query=category:161

    For example, here are quite a few new faces for UMA:

    https://www.assetstore.unity3d.com/en/#!/content/73428

    You can also purchase content from WillbGameArt:

    http://willbgameart.com/product-category/uma/

    Or from Arteria:

    https://arteria3d.myshopify.com/collections/uma

    If you're wanting to make your own content, then you can start with the content pack here:

    https://github.com/umasteeringgroup/content-pack

    You can use that to make your own original work, or you can just reuse any existing clothing/hair from other systems and refit them using blender:

    Here's a link to some videos to get you started;

    https://www.youtube.com/channel/UCjIhCVu3eN5qLAX7H9Uo6jg/videos







     
    lorddanger and BackwoodsGaming like this.
  13. chaza_li

    chaza_li

    Joined:
    Jan 8, 2018
    Posts:
    29
    Hi there, I am having a bit of a problem with trying to save my UMA DNA data for my character and to be used for later on in the other scenes.

    I tried a few different solutions, neither worked:

    1. Saving the instance of UMA data to a DontDestroyOnLoad object, but as soon as the DNA data's original holder is being destroyed.

    2. Saving all the values of the DNA into the DontDestroyOnLoad object to reuse, but setting values with
    umaDNA.SetValue(index, float value)
    to the UMA DNA throught did not change the DNA values (I am currently using a UMADnaHumanoid, made the race to HumanFemaleDCS)

    3. Directly changing the values of the UMADnaHumanoid in the script itself, but it seems that its not helping either.

    Can I please get a correct way of saving the DNA data of my character and re-using them in later scenes ?

    Thanks!
     
  14. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Are you using a DynamicCharacterAvatar? If so, there are several ways to do this. The simplest way is to save your DCA to a string with GetCurrentRecipe(false); Then when you need him somewhere else, you can load him using LoadFromRecipeString(theString); This is probably the most flexible way.

    edit:

    In addition, there is a second way that is a bit more complicated. Basically, you use the DoSave() function to save the character to a file in a folder (for example resources/savegame), Then you can set the character file name in the Avatar, and he will automatically load. Managing this can be painful with multiple saves, etc - I recommend the other way.
     
    Last edited: Jan 29, 2018
  15. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    UMA 2.7 RC0 is now available:

    https://github.com/umasteeringgroup/UMA/releases/tag/v2.7-RC

    In addition to all the Beta goodies (The bone builder, the Mesh hiding (poke-through solution), etc) the following is also new:

    New Documentation
    Performance enhancements
    Added ability to use AnimationOverrideController
    Added hotkeys
    Added UI Helpers to show type and index status
    Added ponytail with physics example
    Fixed compatibility issues with Unity 2017.2, 2017.3
    Lots of additional fixes

    Please give it a go and let us know if you find anything!
     
    tequyla and hopeful like this.
  16. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Does it Support UWP Build?
    Sorry I am always asking but it is very important for me :)

    Thanks a lot for the update Jaimi and the other helpers!
     
  17. chaza_li

    chaza_li

    Joined:
    Jan 8, 2018
    Posts:
    29
    Thanks Jaimi, I am currently using the Dynamic Avatar instead of DCA, as I learned to create characters from script from Secret Anoraks older videos, and also I realized that it wasn't possible for me to add a DCA component to the gameobject (perhaps i'm wrong, though). Is there a way of doing so using the dynamic avatar ?
     
  18. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Yeah, but I don't recall the exact steps. You'll need to serialize the recipe to a umatextrecipe - I think there is sample code - look at the source to the menu item "Save selected avatars text". You should be able to programatically create a DCA though. Simplest way is to use a prefab, generate a copy - there's sample code for that as well in Samplecode.cs.
     
  19. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    No, 2.7 doesn't include that yet. It's on the roadmap for 2.8. I made a pass at it, but it was too large of a project to fit in, and we needed to get 2.7 out so that it works under 2017.3.
     
  20. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Thanks for the info Jaimi.
    I am looking Forward for 2.8 (I am using 2017.3).
    Will do an update and testing then :)
     
  21. Chrisad

    Chrisad

    Joined:
    Mar 12, 2013
    Posts:
    55
    Hello everyone,
    Does UMA support consoles (Switch, Ps4 and Xbox one) ? I didnt see any information about it.
     
  22. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    It should, but I can't verify it. - the only thing that it doesn't currently support (that I know of) is UWP because of some issues with .Net core that we are going to address in 2.8. I don't know about the xbox one, if it uses .Net core, there could be an issue there.
     
  23. Chrisad

    Chrisad

    Joined:
    Mar 12, 2013
    Posts:
    55

    Thank you for the quick response! Does UMA have a list of games made with it ? Maybe someone already use it on consoles.
     
  24. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Not that I know of - I've seen a few games on Steam (Realms of Arkania: Star Trail* comes to mind), but haven't really noticed any big names.

    *They're still in dev, I think. They need better lighting, and should switch to the SSS skins.
     
  25. markashburner

    markashburner

    Joined:
    Aug 14, 2015
    Posts:
    212
    Hi Jaimi or anyone.

    Would it be possible to integrate UMA with this hair tool package?

    https://assetstore.unity.com/packages/tools/physics/hair-tool-66094

    Hair tool is a plugin for creating animated hair and cloth.

    Physics are implemented with a custom engine based on Verlet integration, and executed on GPU (Compute Shader). You can configure elasticy, gravity, drag, and curveness in editor. Sphere Colliders and Swept Spheres can be added to bones so it interacts with body a realistically. Unity WindZone component is supported.
     
  26. Chrisad

    Chrisad

    Joined:
    Mar 12, 2013
    Posts:
    55
    - I use Unity 2017 and UMA 2.7 -

    I made a test on PS4, using the "UMA Core Demo - Crowd Recipes" scene. I just played the scene on the PS4, and get 60fps with no drops and no artifacts.
    On Switch, on handheld mode, with the same scene, I got 30fps with no drops but I got some bugs on some materials.

    Here a screen of the switch version :
    UMA on Switch.jpg

    Do you have any ideas about the source of the bug?
    I will make a test on Xbox One soon and post my results here :)
     
  27. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I am guessing a developer is not going to want to integrate his $75 tool within UMA, which is a free asset.

    However, there is no reason why you cannot make the hair with the tools, fit it to the UMA and then use it to make a wardrobe slot, unless there is an issue with the physics if you do that.

    Sounds rather heavy to me for just hair though.
     
  28. markashburner

    markashburner

    Joined:
    Aug 14, 2015
    Posts:
    212
    yeah I know, I just wanted to know if it was possible to do? I will have to toy around with it.
     
    Teila likes this.
  29. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Wow, not sure. Looks like something is wrong with the atlas shader and the overlays. Can you dump the atlas textures out for one of the UMA's? Maybe they're too high-res, running out of texture memory, or something weird like that.

    You also might go into the generator, and increase the scale factor, to make it generate smaller textures. I really have no clue how the switch does things. :(
     
  30. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You should be able to manually add the hair to the UMA by making it a child of the "HeadAdjust" bone. You would need to manage it though - remove it when you put on a hood, etc, as the wardrobe system wouldn't know about it.
     
    hopeful and Teila like this.
  31. Firlefanz73

    Firlefanz73

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

    do you have a PS4 account and a PS4 development System?
    I thought to build for PS4 you need to be able to build for UWP? Or was that just the XBox One?
     
  32. Chrisad

    Chrisad

    Joined:
    Mar 12, 2013
    Posts:
    55
    No need of UWP to build for PS4. UWP is use if you want target Windows Store.

    I made a test on Xbox One using Unity 5.6 and UMA 2.7. The target is Xbox One (no UWP).

    The scene "UMA Core Demo - Crowd Recipes" works.

    The only problem for me is the Switch version. I will investigate on it later.
     
  33. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,685
    Could we make a "hair tool" slot that then becomes part of wardrobe?
     
  34. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Thanks for the update, like firlefanz73, I always assumed it needed UWP, glad to hear it works!
     
  35. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I haven't tried it, but in theory you should be able to create one of those "slot scripts" that manage it for you (kind of like the collider slots). Might need some finagling to get it to work out, though.
     
    hopeful likes this.
  36. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    368
    I've been watching his hair and cloth assets, too. Might be worthwhile to make a bare minimum UMA DCS project and send it to him and work with him on integration, since he's the one getting the money. I'd love to see a UMA with that hair and that dress working well.
     
  37. cwmanley

    cwmanley

    Joined:
    Aug 8, 2013
    Posts:
    205
    Hi,

    I think the Hair Tool developer is open to uma support, he mentions uma in his release notes.

    I am working on hair tool uma integration that I am planing to share.

    The integration requires a scalp slot to be a separate renderer and it Instantiates a hair prefab when a compatible renderer and wardrobe item is active.

    I use a custom GeometryProviderBase to handle uma's blend-shape baking.

    Here is WIP example of using uma's blend-shape baking.



    I really like the hair tool so far, but I have not had time to work on anything but the technical stuff.
     
  38. markashburner

    markashburner

    Joined:
    Aug 14, 2015
    Posts:
    212
    Hi

    I am trying to make my own custom slider from script.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UMA;
    4. using UMA.CharacterSystem;
    5. using UnityEngine;
    6.  
    7. public class UMAFiddler : MonoBehaviour {
    8.  
    9.     private DynamicCharacterAvatar avatar;
    10.  
    11.     private Dictionary<string, DnaSetter> dna;
    12.  
    13.     [Range(0.43f, 0.53f)]
    14.     public float Height = 0.5f;
    15.  
    16.     // Use this for initialization
    17.     void Start () {
    18.  
    19.         avatar = GetComponent<DynamicCharacterAvatar>();
    20.        
    21.     }
    22.    
    23.     // Update is called once per frame
    24.     void Update () {
    25.  
    26.         if (Input.GetKeyDown(KeyCode.Alpha1))
    27.         {
    28.             avatar.SetSlot("Chest", "MaleHoodie_Recipe");
    29.             avatar.BuildCharacter();
    30.         }
    31.  
    32.         if (Input.GetKeyDown(KeyCode.Alpha0))
    33.         {
    34.             avatar.ClearSlot("Chest");
    35.             avatar.BuildCharacter();
    36.         }
    37.  
    38.        
    39.             if(dna == null)
    40.            {
    41.                 dna = avatar.GetDNA();                      
    42.                 dna["height"].Set(Height);
    43.                 avatar.BuildCharacter();
    44.             }
    45.            
    46.         }
    47.  
    48.            
    49.  
    50.     }
    Basically I have custom script attached to my DynamicCharacterAvatar that has a slider for the height. But when I set the height to the Height float, I run into an exception?

    Can someone please explain how I get the Height dna to work with a slider?

    Thanks :)
     
  39. SecretAnorak

    SecretAnorak

    Joined:
    Mar 19, 2014
    Posts:
    177
    Couple of things wrong there. Have a look at this version:

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UMA;
    4. using UMA.CharacterSystem;
    5. using UnityEngine;
    6.  
    7. public class UMAFiddler : MonoBehaviour
    8. {
    9.     public DynamicCharacterAvatar avatar;
    10.     public Dictionary<string, DnaSetter> dna;
    11.  
    12.     [Range(0.43f, 0.53f)]
    13.     public float Height = 0.5f;
    14.     private float oldHeight = 0.5f;
    15.  
    16.     // Use this for initialization
    17.     void Start()
    18.     {
    19.         avatar = GetComponent<DynamicCharacterAvatar>();
    20.     }
    21.  
    22.     // Update is called once per frame
    23.     void Update()
    24.     {
    25.  
    26.         if (Input.GetKeyDown(KeyCode.Alpha1))
    27.         {
    28.             avatar.SetSlot("Chest", "MaleHoodie_Recipe");
    29.             avatar.BuildCharacter();
    30.         }
    31.  
    32.         if (Input.GetKeyDown(KeyCode.Alpha0))
    33.         {
    34.             avatar.ClearSlot("Chest");
    35.             avatar.BuildCharacter();
    36.         }
    37.        
    38.         if(Height != oldHeight)
    39.         {
    40.             if (dna == null)
    41.                 dna = avatar.GetDNA();
    42.             dna["height"].Set(Height);
    43.             avatar.BuildCharacter();
    44.             oldHeight = Height;
    45.         }
    46.     }
    47. }
    48.  
    49.  
    Simplest, but not the best way to do things. In the next episode we're going to look at building a GUI to alter our UMA. These are the first steps toward a character creator. We'll look at the correct way to detect if your DNA is ready and wait for UMA to finish before we mess with it.

    Hope that helps.

    ;)
     
    Last edited: Feb 2, 2018
  40. markashburner

    markashburner

    Joined:
    Aug 14, 2015
    Posts:
    212
    Hey SecretAnorak :D

    Yeah I tried that but it didn't seem to work, I also tried:

    Code (CSharp):
    1. if (dna == null)
    2.         {
    3.             dna = avatar.GetDNA();
    4.  
    5.             if (Height != dna["height"].Value)
    6.             {
    7.                 dna["height"].Set(Height);
    8.                 avatar.BuildCharacter();
    9.             }
    10.          
    11.          
    12.         }
    Which didn't work either...sorry I am not the best coder.

    If you can help me out, it would be much appreciated!

    Also I need to become a patreon of yours, it's well overdue.
     
  41. SecretAnorak

    SecretAnorak

    Joined:
    Mar 19, 2014
    Posts:
    177
    Edited my last post after you replied sorry... Scroll up ;)
     
  42. markashburner

    markashburner

    Joined:
    Aug 14, 2015
    Posts:
    212
    Yes awesome! That works!

    I have already developed my own character creator from your extremely helpful tutorials on UMA 2. Now that these sliders work, it will be very easy for me to integrate UMA DCS with my character creator. Thanks SecretAnorak! :D
     
    hopeful and SecretAnorak like this.
  43. Buka

    Buka

    Joined:
    Feb 22, 2013
    Posts:
    48
    Hi everyone, I've managed to fix some of my problems with UMA and things are going in some great direction, now I am in a state where I have to load saved UMA into the game, Networking stuff we did in our own way so I won't bother with that, however I have to load UMA character properly, well it actually loads the way it is saved but when I want to equip some armor or some other wardrobe recipe to UMA it always loads default stuff and applies wardrobe recipe, I guess I am doing something wrong with loading, here is what I do:
    I have saved string of character using this method:

    UMATextRecipe asset = ScriptableObject.CreateInstance<UMATextRecipe>();
    asset.Save(avatar.umaData.umaRecipe, avatar.context);
    string savedAvatar = asset.recipeString;
    Debug.Log("Saved avatar string is " + savedAvatar);
    return savedAvatar;

    Then when network game loads and everything is ready to create character I create Avatar, then do next:

    Avatar = GetComponentInChildren<DynamicCharacterAvatar>();
    UMADynamicAvatar dynamicAvatar = Avatar.gameObject.AddComponent<UMADynamicAvatar>();
    Avatar.BuildCharacter(true);
    Avatar.ForceUpdate(true, true, true);
    dynamicAvatar.Initialize();
    dynamicAvatar.umaGenerator = FindObjectOfType<UMAGenerator>();
    var asset = ScriptableObject.CreateInstance<UMATextRecipe>();
    asset.recipeString = playerInfo.umaAvatarData;
    dynamicAvatar.Load(asset);
    Avatar.UpdateUMA();

    As you can see above I have many methods that force character creation and displaying things, many of them I added just to note that I've tried multiple combinations but it is always the same so I just included them here so you can explain to me what I don't need :) What I tried as well is to just use DynamicCharacterAvatar and use this:

    avatar.LoadFromRecipeString(info.umaAvatarData);
    avatar.UpdateUMA();

    but that also did similar things where I load my character and when equip something it goes completely naked without hair as well so I am
    Anyways if I do as above described and use Load function from UMADynamicAvatar, character loads perfectly into the game, then if I try to equip some of my own wardrobe recipes using this:

    Avatar.SetSlot(here is put my wardrobe recipe, tried both from library and from public field) :
    Avatar.BuildCharacter(true);
    Avatar.ForceUpdate(true, true, true);

    Yes armor appear when equipped, however avatar just returns to original setup with those basic undies, basic hair and his color also get reset, all of his base stuff is reset except for DNA, they remain the same. Not sure what to do so I request some help again :) If I doing something wrong, can you help and tell me what I am doing wrong?

    Thanks a lot, cheers @Jaimi or @SecretAnorak and thanks to everyone else, I hope we solve this quick :) !!!
     

    Attached Files:

  44. markashburner

    markashburner

    Joined:
    Aug 14, 2015
    Posts:
    212
    Hi SecretAnorak

    I am hoping you will be able to help me get the slider on the component UMAFiddler script to match the Slider I have on UI? Basically I have my script going like this, I have a game object as a child under the prefab UMA_DCS with all my UI and sliders.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UMA;
    4. using UMA.CharacterSystem;
    5. using UnityEngine;
    6. public class UMAFiddler : MonoBehaviour
    7. {
    8.     public DynamicCharacterAvatar avatar;
    9.     public Dictionary<string, DnaSetter> dna;
    10. public CharacterCustomization characterCustomization;
    11.     [Range(0.43f, 0.53f)]
    12.     public float Height = 0.5f;
    13.     private float oldHeight = 0.5f;
    14.     // Use this for initialization
    15.    
    16. void Start()
    17.     {
    18.  
    19. GameObject umaDCSConfig = GameObject.Find("UMA_DCS");
    20.         avatar = GetComponent<DynamicCharacterAvatar>();
    21.  
    22. characterCustomization = umaDCSConfig.GetComponentInChildren<CharacterCustomization>();
    23.  
    24.     }
    25.     // Update is called once per frame
    26.     void Update()
    27.     {
    28.         if (Input.GetKeyDown(KeyCode.Alpha1))
    29.         {
    30.             avatar.SetSlot("Chest", "MaleHoodie_Recipe");
    31.             avatar.BuildCharacter();
    32.         }
    33.         if (Input.GetKeyDown(KeyCode.Alpha0))
    34.         {
    35.             avatar.ClearSlot("Chest");
    36.             avatar.BuildCharacter();
    37.         }
    38.      
    39.         if(Height != oldHeight)
    40.         {
    41.             if (dna == null)
    42.                 dna = avatar.GetDNA();
    43.             dna["height"].Set(Height);
    44.             avatar.BuildCharacter();
    45.             oldHeight = Height;
    46.         }
    47. if (characterCustomization == true){
    48.  
    49. Height = characterCustomization.MHeightSlider.value;
    50. }
    51.  
    52. else if (!characterCustomization)
    53.             {
    54.  
    55.                 Debug.Log("no character customization found");
    56.             }
    57.  
    58.     }
    However when I convert the Height dna slider to the UI height slider, I run into an exception which says:
    KeyNotFoundException: The given key was not present in the dictionary.

    Would someone be able to help me?

    Thanks :)
     
  45. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    The problem seems to be that you are saving the DCA as an "old style" UMA character recipe. Instead, save him using:

    string savedAvatar = Avatar.GetCurrentRecipe(false);

    Then load him with LoadFromRecipeString(savedAvatar);
    then just rebuild him using BuildCharacter()

    Also, seems you are using the base class UMADynamicAvatar for something. That shouldn't be needed.

    That should work - if you have issues, let me know.

     
    Last edited: Feb 3, 2018
    hopeful likes this.
  46. markashburner

    markashburner

    Joined:
    Aug 14, 2015
    Posts:
    212
    Ok I managed to get it working with the UI slider, it works perfectly fine..however, it still throws an exception for some reason? Even though it works?

    What I am trying to do is get the slider from UMAFiddler component to equal my UI slider.

    Here is the script so far....

    Code (CSharp):
    1. public class UMAFiddler : MonoBehaviour
    2.     {
    3.  
    4.         private DynamicCharacterAvatar avatar;
    5.         private Dictionary<string, DnaSetter> dna;
    6.         public CharacterCustomization characterCustomization;
    7.  
    8.         [Range(0.43f, 0.53f)]
    9.         public float Height = 0.5f;
    10.         private float oldHeight = 0.5f;
    11.  
    12. void Start()
    13.         {
    14.  
    15.             GameObject umaDCSConfig = GameObject.Find("UMA_DCS");
    16.             avatar = GetComponent<DynamicCharacterAvatar>();
    17.  
    18.             characterCustomization = umaDCSConfig.GetComponentInChildren<CharacterCustomization>();
    19.  
    20.         }
    21.  
    22. void Update()
    23.         {
    24. if (characterCustomization.MHeightSlider.value != Height)
    25.             {
    26.                 dna = avatar.GetDNA();
    27.                 dna["height"].Set(characterCustomization.MHeightSlider.value);
    28.                 avatar.BuildCharacter();
    29.                 Height = characterCustomization.MHeightSlider.value;
    30.             }
    31.  
    32.   }
    33.  
    34. }
    And it works except that it keeps throwing this error for some reason and I just want to get rid of it. This is what it says in the console:

    KeyNotFoundException: The given key was not present in the dictionary.
    System.Collections.Generic.Dictionary`2[System.String,UMA.CharacterSystem.DnaSetter].get_Item (System.String key) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150)
    CrazyMinnow.SALSA.UMA.UMAFiddler.Update () (at Assets/_Scripts/UMAFiddler.cs:164)

    Can someone explain to me what it's all about? Thanks.
     
  47. Buka

    Buka

    Joined:
    Feb 22, 2013
    Posts:
    48
    Thanks @Jaimi that worked and did the trick, apparently I was using old methods for saving / loading, now my character can equip / unequip items and works great. Thanks milion times :)
     
    Jaimi likes this.
  48. EdWaters

    EdWaters

    Joined:
    Mar 20, 2017
    Posts:
    7
    Hello everyone, I'm working on a 1st century historical 3rd person game that will involve around 50 historically known individuals as NPCs (not all on screen at the same time) along with various randomly generated background NPCs that will probably number in the hundreds, with maybe a maximum of 30 on screen at a time. I feel confident that UMA will make this possible with advantages that other system lack.

    I'm using Blender to make clothes and using the videos made by Secret Anorak and Wigifer as a guide to UMA side of things. Many thanks to them! I have a question: When making clothing that will be layered over by other clothing items, what is the best way to prevent the lower layers from poking through the outer layers? These inner clothes will generally have folds and take up some space around the person and could be worn alone or with various outer layers. I'm guessing that I need to make a standalone version of inner layers, then versions flattened in the areas under, say, a short sleeve overcoat, another version flattened also in the arms for a long sleeved overcoat, etc. Am I on the right track? Suggestions?
     
    hopeful and Jaimi like this.
  49. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    There are several strategies for this. If the clothing is completely obscured, then simply suppress it using the recipe options. The way you mention is also a possible way to do it, but would require more artwork.
    Another way, introduced in UMA 2.7, is to use the "mesh hide asset". With this, you define what specific polygons (of other clothing) are hidden when an article is worn.
    To do this, you go into the mesh hide editor, and load the clothing that needs to have polygons hidden, and define the hidden areas using a painting tool. This asset is then included on the recipe that has the asset that hides them. Here's an older video that shoes the process - the UI has changed somewhat since then, but the process is the same:

     
  50. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,685
    You might be able to get some of your minor cloth folding and layering effects from height maps. This could reduce some sources of poke-through.

    And yes, many thanks to all who work on improving UMA, and those who provide written and video user guides! :)