Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    386
    Ah thanks, I figured it out. It was because the ponytail has more than 1 submesh and the submesh count wasn't set before adding those triangles. It wasn't affecting your data at all. I'll push the fix to the dev branch on github.
     
    rjakob13, cwmanley and hopeful like this.
  2. rjakob13

    rjakob13

    Joined:
    Apr 13, 2016
    Posts:
    45
    Great! Thank you. Oh and did I mention that I love this feature?
     
  3. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    386
    Haha, awesome. You're welcome.
     
  4. almorak_wf

    almorak_wf

    Joined:
    Apr 22, 2015
    Posts:
    4
    If I want to replace the head slot in a recipe, it shows:

    AvatarBuilder 'xxxxx': Transform 'LeftEyeGlobe' for human bone 'LeftEye' not found
    AvatarBuilder 'xxxxx': Transform 'Mandible' for human bone 'Jaw' not found

    I just removed the eyes and inner mouth slot in a TextRecipe then added my custom head slot.
    I don't need the face expression. How to fix this?
     
  5. TurboNisu

    TurboNisu

    Joined:
    Oct 7, 2014
    Posts:
    2
    New version works, thanks!
     
  6. lorddanger

    lorddanger

    Joined:
    Aug 8, 2015
    Posts:
    103
    Hello,
    Are there any written Documentation for UMA for the topics like |
    Creating Race and other such things

    Where it's explained from with some example ..
     
  7. cwmanley

    cwmanley

    Joined:
    Aug 8, 2013
    Posts:
    205
    HI,

    Option A. hide the base slot instead of replacing it.

    Option B. add the missing humanoid bones.

    Option C. create a new race.
     
  8. Buka

    Buka

    Joined:
    Feb 22, 2013
    Posts:
    48
    Hi, I ran into another issue, well not with UMA directly but rather something related to UMA and I hope I can get quick help for this issue :)

    There is this image and you can see UMA character has open mouth when I play some animations I've downloaded from Mixamo. As you can see animation is not played correctly for some reason and some bones are messing head and jaw. I did try to retarget animations and none of them work, tried both avatar definitions, Create From This Model for animation or to copy from other model with same rig from Mixamo but that failed too and results are the same as you can see in that image I provided. If I try to use DudeAvatar definition I will get Error: Copied Avatar Rig Configuration mis-match.... Transform Chest for human bone Chest not found and animation still won't work right and will have mouth opened.

    Any solution how to use Mixamo animations in UMA? If I can't use them like this, can I change UMA rig and select one from Mixamo, or there is simple solution that I can't see before me?
    Or I should just ignore all of this and make some face override stuff? Not sure what to do and help is required :)

    Should I go to Blender and change mixamo rig to match UMA rig with 3 bones before hips?
    Thanks great community, cheers!!!
     

    Attached Files:

    Last edited: Jan 17, 2018
  9. cwmanley

    cwmanley

    Joined:
    Aug 8, 2013
    Posts:
    205
    If you ad the expression player component it should fix the mecanim jaw issue, or you chould use the Male_Unified_TPose_NoJaw UMA T-Pose.
     
    TeagansDad and kenamis like this.
  10. almorak_wf

    almorak_wf

    Joined:
    Apr 22, 2015
    Posts:
    4
    I would choose A / B. Can provide some step how to hide it correctly?
    After avatar built, find the bone transform and set the scale to vector3.zero. is it right?

    For B, how to process?
     
  11. cwmanley

    cwmanley

    Joined:
    Aug 8, 2013
    Posts:
    205
    No, to hide base head you simply suppress the head slot in the wardrobe recipe.

    hide slot.PNG

    For B you need to use Blender etc.

    My skinning asset's merge function might be able to do it, too. (shameless self-promotion)
     
  12. almorak_wf

    almorak_wf

    Joined:
    Apr 22, 2015
    Posts:
    4
    Would like to know, how the uma asset bundle work.
    1.In the asset bundles browser, I can see the what will be built into the bundle.
    But the bundle tags of the example assets in folders are not set (uma/...).

    2. how to load a slot from the download bundle :

    DynamicAssetLoader.Instance.LoadAssetBundle("xxx/xxx".ToLower(), "xxx", "xxx");
    ...wait download complete in update()...
    how to get the textrecipe from where....?
    Avatar.SetSlot (textrecipe);
    Avatar.ForceUpdate(true,true,true);

    3. Does it require to build the project after adding new bundle?

    cannot find an answer in wiki or outdated tutorials in youtube.
     
    Last edited: Jan 17, 2018
  13. tapawafo

    tapawafo

    Joined:
    Jul 25, 2016
    Posts:
    170
    Is there a guide on using the expression player? More specifically, using it with a custom race? I haven't been able to get it working with what I've been able to find on it.

    I've tried setting it up with the standard UMA Dynamic Avatar script as well as setting my new race as the race in the example UMADynamicCharacterAvatarWithExpressions prefab.

    Could it be bone name differences?
     
  14. cwmanley

    cwmanley

    Joined:
    Aug 8, 2013
    Posts:
    205
    The example DNA and Expression with only work with models compatible with the examples models.

    This should work with Genesis 8 models. The DNA needs some love, but it is a good start.
    UMA Dna and Expression for converted MCS 1.6/DazGen3+ models.
     
    kenamis and tapawafo like this.
  15. tapawafo

    tapawafo

    Joined:
    Jul 25, 2016
    Posts:
    170
    cwmanley likes this.
  16. Buka

    Buka

    Joined:
    Feb 22, 2013
    Posts:
    48
    Thanks for answering @cwmanley I did try expressions and can fix mouth problem but open mouth aside I noticed weird animation problems, have a look at these images and see how animation is weird on arms.

    Expressions look too heavy for from the code to run every frame and we won't need face expressions in the game, maybe some day that can come as update but not now.

    Regarding this And for other solution to use Male_Unified_TPose_NoJaw UMA T-Pose I don't see that avatar anywhere in the project as you can see in last provided image and if I use Male_UnifiedAvatar I will get same error saying Transform LowerBack for human bone Spine not found and I also want to use these animations with both female and male characters. What can I do? How did others solve this problem, not possible that only I am using Mixamo animations?
     

    Attached Files:

  17. cwmanley

    cwmanley

    Joined:
    Aug 8, 2013
    Posts:
    205
    Hi, Your Welcome


    The UMA T-Pose should be applied to the race.

    Uma TPose.PNG
     
  18. Buka

    Buka

    Joined:
    Feb 22, 2013
    Posts:
    48
    Thanks, open mouth is solved with this, what about muscle intersection and weird animations from my previous post?
     
  19. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    386
    You probably need to adjust your tpose to match the tpose in your source animations. Also, it looks like you changed or one of your animations changed the forearm adjust bone which is why you got the "muscle intersection". Usually, it's adjusted along with the arm adjust bone otherwise you'll get that jagged cut.
     
  20. unity_h75Pv7J0AlYOGw

    unity_h75Pv7J0AlYOGw

    Joined:
    Jan 8, 2018
    Posts:
    2
    Trying to create a textRecipe. It says there is no Race data. I created a race data asset to which I added a T Pose, set it to humanoid and gave it a name. If I add the race data asset to the recipe it looks fine, but if I click on some other asset and then go back to the text recipe, the race data slot is empty and it tells me that there is no race data. Is this a bug with Unity 2017.2 ?
     
  21. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Are you trying to create your own race with your own meshes? If not, I would suggest to use the existing races.

    Anyway, your racedata is disappearing because it's not been indexed. You can add it to the global library by right-clicking on it, and selecting "add to global library"
     
  22. unity_h75Pv7J0AlYOGw

    unity_h75Pv7J0AlYOGw

    Joined:
    Jan 8, 2018
    Posts:
    2
    Thank you! Yes that did it.
    Yes, we are using all of our own character meshes and using UMA primarily to allow the player to switch between them and change clothing, hair etc.
     
  23. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Great! If you get a chance, post some pictures! :)
     
    hopeful likes this.
  24. bob_the_pr_bot

    bob_the_pr_bot

    Joined:
    Aug 5, 2016
    Posts:
    15
    I have a question about some of the assets that are included under UMA_Contrib, such as MaleHoodie or FemaleLongHair. The models are stored as .asset files. What format is that, or how do I get the .fbx files?

    I can't use them in my project as is, i.e. the hoodie would require a female version. But with a bit of editing I could probably use them. (Or is that not allowed?)
     
  25. markashburner

    markashburner

    Joined:
    Aug 14, 2015
    Posts:
    212
    I am getting these exceptions from the very latest UMA from guthub, downloaded it here:
    https://github.com/umasteeringgroup/UMA/tree/develop

    These are the exceptions I am getting with this version:

    Overlay 'ProceduralShirt' doesn't have the right number of channels

    Invalid Overlay 'ProceduralShirt' on Slot 'MaleTorso'.

    UMAData: Recipe or Generator is not valid!

    Can someone help?
     
  26. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    386
    I'm guessing you're using the 2018 beta?
    Procedural Materials aren't supported in that release, so just delete those assets.
     
  27. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Those were graciously contributed by isbit games, and the source models are available on the asset store here:

    https://assetstore.unity.com/publishers/14471

    The refitted fbxes are in the uma content git here:

    https://github.com/umasteeringgroup/content-pack/tree/master/ISBIT
     
  28. bob_the_pr_bot

    bob_the_pr_bot

    Joined:
    Aug 5, 2016
    Posts:
    15
  29. markashburner

    markashburner

    Joined:
    Aug 14, 2015
    Posts:
    212
    Hey I was wondering if anyone can tell me how to generate my own UMA from script using UMA DSC.

    SecretAnarok posted some awesome tutorials on how to generate your own UMA using UMA 2. Basically his script went like this:

    Code (CSharp):
    1. public class CM_UmaBasic : MonoBehaviour
    2.     {
    3.         public string characterName = "UMA_SALSA_1";
    4.         public UMAGeneratorBase generator;
    5.         public SlotLibrary slotLibrary;
    6.         public OverlayLibrary overlayLibrary;
    7.         public RaceLibrary raceLibrary;
    8.         public RuntimeAnimatorController animController;
    9.  
    10.         public delegate void UMACreated(UMAData obj, string characterName);
    11.         public static event UMACreated OnUMACreated;
    12.  
    13.         public enum Gender { Male, Female };
    14.         public Gender gender = Gender.Male;
    15.  
    16.         private UMADynamicAvatar umaDynamicAvatar;
    17.         private UMADnaHumanoid umaDna;
    18.         private GameObject umaObj;
    19.         private int numberOfSlots = 20;
    20.  
    21.      
    22.         private void UmaData_OnCharacterCreated(UMAData obj)
    23.         {
    24.             if (OnUMACreated != null) // OnUMACreated will not be null when it has subscribers
    25.             {
    26.                 OnUMACreated(obj, characterName); // Fire the event so that subscriber can retreive the UMAData object
    27.             }
    28.         }
    29.  
    30.      
    31.         void Awake()
    32.         {
    33.             GenerateUMA();
    34.         }
    35.  
    36.  
    37.         void GenerateUMA()
    38.         {
    39.             // Assign this gameObject to umaObj, this is where additional UMA components will be added
    40.             umaObj = gameObject;
    41.             umaDynamicAvatar = umaObj.AddComponent<UMADynamicAvatar>();
    42.  
    43.             // Initialize the avatar and get the UMAData object
    44.  
    45.             umaDynamicAvatar.Initialize();
    46.  
    47.  
    48.             umaDynamicAvatar.umaData.OnCharacterCreated += UmaData_OnCharacterCreated;
    49.  
    50.             // Attach the generator to the UMADynamicAvitar
    51.             umaDynamicAvatar.umaGenerator = generator;
    52.             umaDynamicAvatar.umaData.umaGenerator = generator;
    53.  
    54.             // Setup slot array
    55.             umaDynamicAvatar.umaData.umaRecipe.slotDataList = new SlotData[numberOfSlots];
    56.  
    57.             // Setup a morph reference
    58.             umaDna = new UMADnaHumanoid();
    59.             umaDynamicAvatar.umaData.umaRecipe.AddDna(umaDna);
    60.  
    61.             // Setup the race slots and overlays
    62.             SetRace(gender);
    63.  
    64.             // Assign the animation controller to the UMADynamicAvatar
    65.             umaDynamicAvatar.animationController = animController;
    66.  
    67.             // Generator the UMA
    68.             umaDynamicAvatar.UpdateNewRace();
    69.  
    70.             // Set the parent and zero out local position and rotation
    71.             umaObj.transform.parent = this.transform;
    72.             umaObj.transform.localPosition = Vector3.zero;
    73.             umaObj.transform.localRotation = Quaternion.identity;
    74.         }
    75.  
    76.         /// <summary>
    77.         /// Setup the race slots and overlays. These parameters
    78.         /// switch based on the Gender enum selector selection.
    79.         /// </summary>
    80.         void SetRace(Gender gender)
    81.         {
    82.             var umaRecipe = umaDynamicAvatar.umaData.umaRecipe;
    83.             umaRecipe.SetRace(raceLibrary.GetRace("Human" + gender));
    84.  
    85.             InstantiateSlot(0, gender + "Eyes");
    86.             AddOverlay(0, "EyeOverlay");
    87.  
    88.             InstantiateSlot(1, gender + "InnerMouth");
    89.             AddOverlay(1, "InnerMouth");
    90.  
    91.             InstantiateSlot(2, gender + "Face");
    92.  
    93.             InstantiateSlot(3, gender + "Torso");
    94.             AddOverlay(3, gender + "Body01");
    95.  
    96.             InstantiateSlot(4, gender + "Hands");
    97.             LinkOverlay(4, 3);
    98.  
    99.             InstantiateSlot(5, gender + "Legs");
    100.             LinkOverlay(5, 3);
    101.  
    102.             InstantiateSlot(6, gender + "Feet");
    103.             LinkOverlay(6, 3);
    104.  
    105.             if (gender == Gender.Male)
    106.             {
    107.                 AddOverlay(2, gender + "Head02");
    108.                 AddOverlay(2, gender + "Hair02", new Color(0.28f, 0.22f, 0.18f));
    109.             }
    110.             else // Female
    111.             {
    112.                 AddOverlay(2, gender + "Head01");
    113.                 AddOverlay(2, gender + "ShortHair01", new Color(0.28f, 0.22f, 0.18f));
    114.             }
    115.  
    116.             AddOverlay(2, gender + "Eyebrow01", new Color(0.28f, 0.22f, 0.18f));
    117.             AddOverlay(3, gender + "Underwear01", new Color(0.1f, 0.1f, 0.1f));
    118.             AddOverlay(3, gender + "Shirt01", new Color(0.35f, 0.35f, 0.35f));
    119.         }
    120.  
    121.  
    122.         void InstantiateSlot(int slot, string slotName)
    123.         {
    124.             umaDynamicAvatar.umaData.umaRecipe.slotDataList[slot] = slotLibrary.InstantiateSlot(slotName);
    125.         }
    126.  
    127.      
    128.         void AddOverlay(int slot, string overlayName)
    129.         {
    130.             umaDynamicAvatar.umaData.umaRecipe.slotDataList[slot].AddOverlay(overlayLibrary.InstantiateOverlay(overlayName));
    131.         }
    132.  
    133.    
    134.         void AddOverlay(int slot, string overlayName, Color color)
    135.         {
    136.             umaDynamicAvatar.umaData.umaRecipe.slotDataList[slot].AddOverlay(overlayLibrary.InstantiateOverlay(overlayName, color));
    137.         }
    138.  
    139.    
    140.         void LinkOverlay(int slot, int slotToLink)
    141.         {
    142.             umaDynamicAvatar.umaData.umaRecipe.slotDataList[slot].SetOverlayList(umaDynamicAvatar.umaData.umaRecipe.slotDataList[slotToLink].GetOverlayList());
    143.         }
    144.     }
    I was wondering if anyone could tell me how I would go about generating the DynamicCharacterAvatar instead of the UMADynamicAvata from UMA 2? For instance in my original script under GenerateUMA I had umaDynamicAvatar = umaObj.AddComponent<UMADynamicAvatar>(); I tried replacing it with DynamicCharacterAvatar from the new UMA but I ran into an error. Would someone be able to give me a hint of what to do before the new tutorials? Thanks so much :)
     
  30. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Take a look at SampleCode.cs -

    The DynamicCreateClick function generates an avatar (it loads one, but you don't have to do that part).

    The RandomizeAvatar function takes an avatar and randomly sets it's slots, colors and DNA.

    Those should get you going.


     
    hopeful and BackwoodsGaming like this.
  31. Buka

    Buka

    Joined:
    Feb 22, 2013
    Posts:
    48
    Hi again, I have one quick question, how can refresh Human Male UMADNAHumanoid Ranges? If I play with sliders, they don't show exact value but only slider moves and in game avatar (runtime or not, tried both) doesn't update according to ranges, so I get the feeling that those ranges not working at all, nothing is changed when play with them. For example I want to limit height of players, don' want giants or dwarfs in the game, just normal humans, how can I do it? Should I mess with the code in HumanMaleDNAConverterBehaviour and change values there? Should I somehow refresh those slider range values? How do I recompile that script that is generated for ranges? Or what should I do?
    Thanks @Jaimi or anyone able to help :)
     
  32. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    The Ranges are a helper class that was used for the earlier demos, though I believe someone updated the Asset Bundles scene to use them. If you're basing your sliders on the DCS Simple sample code, it shouldn't be too tough to add, though - you'll just need to have a reference to the range asset on the DNASliderHandler, and modify these two sections:

    Code (CSharp):
    1.        
    2. public void Setup(DnaSetter dna, DynamicCharacterAvatar avatar)
    3.         {
    4.             DNA = dna;
    5.             Avatar = avatar;
    6.             Slider = GetComponent<Slider>();
    7.             Slider.value = dna.Value; // Modify this to set the value based on the DNA range asset
    8.         }
    9.  
    10.         public void ValueChanged(float value)
    11.         {
    12.             DNA.Set(value); // Modify the value here so it scales to the range asset.
    13.             Avatar.ForceUpdate(true);
    14.         }
     
  33. Buka

    Buka

    Joined:
    Feb 22, 2013
    Posts:
    48
    Thanks Jaimi, well I am using my own sliders but how I can modify the range? As you see in this image of ranges, if I change them, nothing changes, as you can see on image of the game, if I set slider range of height to any value, it doesn't update on character, his height slider in runtime remains the same and changes height the same way regardless of value I set in UMADNAHumanoid Ranges?
     

    Attached Files:

  34. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    The UMADnaHumanoidRanges are just a helper class to assist you with implementing ranges into your sliders - it's for you to predefine what you want the ranges to be, and then allow you to set your own sliders based on those ranges.

    I think what you're trying to do is change how the DNA affects the UMA. Is that what you are wanting? You can do this two ways:

    1) You can switch your DNA to the Humanoid DCS dna, and then edit the amount the DNA scales everything.
    2) You can tie your sliders into the range assets. To do that, you pull the range values from the range asset, and plug the min/max into your slider min/max. You'll have to update the slider value with the DNA value after the fact. This should work fine if your limits are in the 0..1 range.

    if I'm misinterpreting what you are wanting or doing, please provide more information.

     
  35. Buka

    Buka

    Joined:
    Feb 22, 2013
    Posts:
    48
    Well I want to limit ranges of certain body modifications, so player cannot be higher than 2 meters and lower than 1.6m, or limit those every value how I want but to make sure that sliders go from min to max. I did hardcode some workaround where I check values manually and set sliders min and max as desired. What I wanted is to use those Ranges but couldn't get them to work. As I change ranges nothing happens and I wasn't sure how to properly access ranges, for example there is no function that will do: GetRange(string dnaName) and then I could get min and max of values and set them to sliders.

    This solution I did works for me I have for example height, I get default value of height and then set some range value like 0.1, set max value to default + 0.1f and min to default - 0.1f, this way I get sliders go from min to max and also limiting range of height and I did it for every value :) , however it is a bit harcoding so when values are changed I will have to modify that script for pooling values again but it is not big deal anyway, works for now :)
     
  36. yusue899

    yusue899

    Joined:
    Jan 11, 2018
    Posts:
    5
    references Video:

    I just have a quick question. I drag the whole folder of the recipe to the global library or rebuild from project in UMA Global library. and I drag and any wardrobe recipe as cloth into my dynamic character avatar, and run the game nothing happens in character still nude. and there is a warning shown on the side of the wardobe recipe as below.

    upload_2018-1-25_18-42-11.png
    Do you guys know what am I missing?
     
    hopeful likes this.
  37. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Are the items marked as being in an asset bundle? If so, they won't be added to the global library, and they won't be available until you generate the asset bundles.
     
  38. yusue899

    yusue899

    Joined:
    Jan 11, 2018
    Posts:
    5
    upload_2018-1-26_10-3-55.png

    I am really appreciated your responding!
    I am using the wardrobe recipes form the reference picture directory show on top, and I did add the whole folder into global Library, the issue caused as my first post. the way to fix that issue.
    how do I mark that wardrobe recipe as asset bundles? do you mean I should create an "asset bundles" folder and move the whole wardrobe recipes into there?
     
  39. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    Im sure this has been covered at some point but i have looked through and not found exactly what im looking for, event searched for the possible topics in the search field....That being said i hope someone can help explain something that im sure is simple but im over looking.

    I am Creating a group of Sliders for my Customization screen, And while i can get buttons to work for race and sliders for height and body weight with limited values set, I cant for the life of me figure out how to change the existing skin Scriptable objects into a Slider rather than the drop downs that the examples all seem to use...the Scriptable Object that UMA is using is Human Skin using the Shared Color table script which makes it not a list where i can set my valuses with my initSlider...

    ive use vars of

    public Slider sldSkinColor;
    public int _skincolornumber = 0;
    public SharedColorTable skinColor;

    with a start function to InitSliders

    an update function with
    if (sldSkinColor.value != _skincolornumber)
    {
    _skincolornumber = (int)sldSkinColor.value;


    My initSlider looks like this
    private void InitSlider()
    {
    sldSkinColor.wholeNumbers = true;
    sldSkinColor.value = 0;
    sldSkinColor.minValue = 0;
    object count = skinColor.list;
    sldSkinColor.maxValue = skinColor.colors.Length - 1;
    }


    Im adding this to Sample code script used by UMA so that im not rewriting everything just what is needed.

    in that code i did one change to its foundation aside from the items added and that was to this section

    SharedColorTable currColors = ClothingColor;
    if (ocd.name.ToLower() == "skin")
    currColors = _skincolornumber;

    but it is refusing my _skincolornumber and giving me error of

    Error CS0029 Cannot implicitly convert type 'int' to 'UMA.SharedColorTable'


    From what i am seeing the Sldr is being found and correct values are shown in slder but not changing the colors when slid


    Any Help would be appricitated
     
  40. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Well, if you don't want asset bundles, then you shouldn't set that up. You can look in the Global Library and see if your items are in it. And if so, do you have a "build reference" for them. If not, you can add a build reference.

    But now that I think about it - I think it's more likely something isn't configured right.

    Its possible those items aren't for the race that you have defined. if so it will ignore them.
    Click on one of the wardroberecipes, and look at the races it works with (in the inspector).
    Then click on your avatar, and be sure to set your race to one that is supported.
     
  41. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    You should get a color from the color table:

    OverlayColorData newColor = skinColor[_skinColorNumber];

    And then set the color on the avatar:

    Avatar.SetColor("skin",newColor);


     
  42. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    Thanks Jaimi,

    i agree its coming form the table but when i try to use it with a slider it cant read the values preset in the table as it would with a list. every sample i have seen uses a drop down menu where i want to use a slider to change the colors,

    from what ive done before i can make a Scriptable Object list and using the number of color slots it will match that value with the slider and that makes the color but with the table it doesnt seem to work the same way

    i cant seem the get the Slider to interact with the table although i can get it to read the values now so the slider is showing the correct number of colors it doesnt react
     
  43. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    386
    I think you're asking to use a continuous spectrum of color selection, is that correct? If so, then you don't need the scriptable object or list at all, just bypass it and set the color value on the avatar directly. You'll just need to create something like an image ui with a script that on click takes the clicked on pixel color and set the value.
    Or a slider, with a start and end color value and lerp the color based on the slider value
     
  44. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    Kenamis Thanks for your help,

    Yes that may work but not sure exactly how ot do that ....

    All i want is to take a slider and using the colors available in the Color table or my own list of colors and allow a user to slide to the color he or she wants. im trying to do this using UMAs own scripts though and everything they have is using drop down, Im trying not to actually have to rewrite a builder script when most properties are listed in their own scripts i may just have to modify them slightly.

    Whatever the easiest way to accomplish this im all for it but ive never messed with Image UI in THAT WAY before so not sure what that entails
     
  45. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    386
    @Jschilz1
    ok, in that case what I would do is create a new script on your slider. It'll have a public variable for the avatar and a public variable for a Color Table and on start it'll initialize it's min value to 0 and it's max value to the length-1 of the color list in the color table, and set wholeNumbers to true. Then a public function that will be the called (you set this in the inspector) from your onValueChanged event, that will take the current slider value index into the color table list to get that color value and set the avatar skin color. Does that make sense?
     
  46. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    This is exctly how i have it set up except the ValueChanged Event, everytime ive tried it just didnt respond....


    Just looked and what im having an issue then is the part where im calling a function thqat will take the slider value and get the color...ThaT IS MY MISSING PIECE, Thanks.... now that we know what needs to be added is tha function how does that function communicate between the two items im not sure how that should be written
     
  47. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    386
    @Jschilz1 I think this shows what you're asking for
     
  48. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    Ive gone through all those videos and never saw this one thanks so much i think that will help
     
    kenamis likes this.
  49. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    I guess i cant wrap my head around it cause i created a public void
    public void ChangeColors(float newvalue)

    but all i get in the console is this
    Cannot implicitly convert type `int' to `UMA.SharedColorTable'

    no matter how i word it, I know im just overlooking something simple but driving me mad lol
     
  50. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    You can't assign an integer to a sharedcolortable. You have to do what I posted above - use the index to get the color from the table, and use SetColor to set it.
     
    Jschilz1 likes this.