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:
    4,891
    Alright! I thought you were already on 2.9 for some reason. That is usually the first thing I recommend.
     
  2. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    698
    Thanks for your help!! UMA is the best!!
     
  3. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    698
    Ok new problem. When I create a new project and build UMA 2.9 and run it on Android its fast.

    When I import UMA 2.9 I to my project and then run the same scene on android, its back to taking 60 seconds again!!!

    The only difference I can see isthe size of the 2 builds. My project is really large almost 270 Megs APK file.

    Maybe UMA is searching for assets and having a big APK file makes it take longer to find what its looking for?

    I can't believe I'm back to square one.

    Anybody have ideas why it's taking 60 seconds to create the first avatar when imported into my project, but when run in a new project UMA takes just 5 or 10 seconds to create the first avatar?

    I building the simple setup scene that comes with UMA 2.9.
     
    Last edited: Oct 25, 2019
  4. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    698
    I found this function in a lot of places in UMA

    AssetDatabase.FindAssets(....)

    Does this mean its searching thru all the assets in the whole project at runtime? maybe this is why its slow becuase i have a lot of assets?

    I did a test, counted the number of assets in my project, and counted the number of assets in a new project with just UMA in it.

    The code used to count the number of assets in the project i used was this

    Code (CSharp):
    1.  
    2.         string[] results;
    3.  
    4.             results = UnityEditor.AssetDatabase.FindAssets("");
    5.             Debug.Log("ASSET SEARCH RESULT COUNT=" + results.Length);
    6.  
    The UMA project alone contains 3238 objects in the asset database ta runtime, and takes 10 seconds to start.

    My project contains 18116 objects, takes 60 seconds to start.

    So i think this is a reason why its slow, it depends on the number of assets in your project since UMA is searching thru all objects using the function AssetDatabase.FindAssets(....)

    Maybe a speed up is possible if UMA only searched in the UMA folder instead of the whole project?
     
    Last edited: Oct 26, 2019
  5. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    The AssetDatabase is only available in the editor. It's not accessed in a build. The library is stored in memory, and the assets are looked up in a dictionary. It only tracks the items in the library itself.
    I'm guessing that Unity is loading all of your resources, and that is taking the time.
     
  6. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    698
    I have a log in screen before the UMA screen, the log in screen appears instantly, only the UMA scene takes 60 seconds to appear. Wouldnt Unity already load all the resources from the login screen?
     
    Last edited: Oct 26, 2019
  7. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    698
    I got UMA load time down to 10 seconds, now all i need to do is make the UMA textures the smallest size possible.

    Anybody can suggest the best way to do this? Which compression algorithm, format, Quality, and size is best to reduce the UMA footprint in the project to the minimum size?

    Thanks
     
  8. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    The "Crunched" versions are supposed to be the smallest, but they're lossy. Try "RGBA Crunched ETC2". You'll likely have to experiment to find the best tradeoff between size and quality. There's a page in the doc here that explains (some of) the formats:

    https://docs.unity3d.com/Manual/class-TextureImporterOverride.html

    You'll probably want to leave the resize algorithm set to Mitchell.
     
    hopeful likes this.
  9. igrus

    igrus

    Joined:
    Aug 29, 2014
    Posts:
    2
    Hi I have problem TAT.
    knees is too small.
    I want to adjust knees size. I tried adjust "lower weight" and "lower muscle".
    but I couldn't make the results I wanted. I just want to adjust knees.
    any idea? Or is there any expedient?

    Thank you for reading!
     
  10. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    There are no built-in bones to adjust the knees by themselves. To do this would require going into a modeller, and adding bones, and rerigging the knees. It's possible, and not too hard if you are an artist, but will also have the downside of breaking compatibility with other wardrobe items (since they won't know about the new bones).

    Probably the easiest thing to do would be to go into blender, and adjust the source model, and create a new legs slot with knobby knees. You could add that as a wardrobe item, and hide it when you put pants on (etc).
     
  11. KarmaTheAlligator

    KarmaTheAlligator

    Joined:
    Oct 16, 2015
    Posts:
    11
    Hello, quick question: I've been working with an old version of UMA (over a year old, not even sure of the version number), and have lots of models imported already. How difficult would a transition to the newest version be, keeping in mind I cannot re-import everything due to time constraints( but need to keep everything)? Is it feasible?
     
  12. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    The newer versions are easier to upgrade to. But honestly, without knowing more about your project and what you've modified, I can't really tell. In theory, you should be able to copy out all the added stuff from the Content folder, delete the uma folder, reimport, move it all back, and add everything to the libraries again.
     
  13. KarmaTheAlligator

    KarmaTheAlligator

    Joined:
    Oct 16, 2015
    Posts:
    11
    Cheers for the speedy reply. I'll have to check with the programmer, see how much he changed in the inner workings, because I honestly have no idea: I just make and import the models.
     
  14. Yerkisk

    Yerkisk

    Joined:
    Jul 28, 2015
    Posts:
    14
    Just updated to 2.9.1 a few days ago, but I'm noticing that the 3 beards included in the examples (MaleBeard1, 2 and 3) are showing over the left ear instead of over the mouth...Running the Simple Scene also does that when you try to equip the beards (they are named Devilish Goatee, Bums Beard and Manly Beard in the UI). The other beards that we have all show correctly on the avatar.

    All of them, including the ones showing on the wrong spot, are using the Beard slot and I see no differences in their settings in one project with 2.9.1 and the other one 2.9.0

    Any idea what could be causing that?

    Using Unity 2019.1.3f1 and compiling for Android.

    Thanks,
     
  15. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    My guess would be that changing the build to android forced those(and the face texture) to be square, so the rectangles on the overlay no longer matches up. Simplest thing to do is go into the wardrobe recipe, and update the rects on the beard so they appear in the correct spot, and are the correct size.

    Getting the correct rect will not be fun. You'll need to find the resolutions that they've been resized to, and then go into photoshop or something, and overlay them to find the correct spot.

    The rects are measured from the bottom left corners (not the top right).
     
  16. moria15

    moria15

    Joined:
    Feb 25, 2011
    Posts:
    395
    OK brand new to this UMA, but it's looking very interesting. My initial question is I have a character and the Idle anim is great, but the run anim makes my char look very bandy legged... are there any better anims for the chars as delivered or alternative setups that could improve this at all?
     
  17. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,962
    UMA is just a framework for generating custom characters, in both edit and runtime. Some default model art is provided, but you don't have to use it. Likewise, it is expected you will add the animations that you want to use in your game. The default animations in the UMA kit are ones provided by Unity for demos.
     
  18. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    Yes, actually. The existing T-Pose is not very mecanim friendly, and results in a kind of duck-walk because of the leg pose.
    We have shipped mecanim-friendly t-poses, and you can use those instead. We didn't make them the default because we didn't want to break everyone who had already worked around the issue.
    To use the mecanim friendly t-poses, find the racedata for the male and female human races (Type "t:racedata" in the project search box to find them easily). Then in the tpose field, use the select button to find the correct mecanim friendly tpose.
     
    hopeful likes this.
  19. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,962
    Just wanted to say I knew @Jaimi would provide the most accurate info on the t-poses. :)
     
    Jaimi likes this.
  20. moria15

    moria15

    Joined:
    Feb 25, 2011
    Posts:
    395
    Awesome ty:) works a treat.. now to get really into it :)
    M
     
  21. TheMightyHades

    TheMightyHades

    Joined:
    Oct 4, 2019
    Posts:
    1
    Can someone please explain to me why my UMA menu has disappeared. Its worked fine on this project until I started up Unity just now.
    Also how do i recover it...?
     
  22. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    The menu is added when the domain is reloaded. You probably have a compile error in your project. Fix it and the domain should reload and menu appear.
     
    TheMightyHades likes this.
  23. Yerkisk

    Yerkisk

    Joined:
    Jul 28, 2015
    Posts:
    14
    I'm having a LOT of issues trying to get the new version to work on Android. Not sure if it's related to the latest version or if something is terribly wrong with our project, but what used to work just got a lot worst.

    Unity (version 2019.1.3f1) is set to compile for Android. When running on the editor, the result is what is shown on the left side of the image. After building and running on an Android device, the result is what we see on the right.



    It seems like even BuildCharacter(true) isn't working on Android or something close to that.

    We use a slider to change the DNA :

    Code (CSharp):
    1. DNASlider.onValueChanged.AddListener(delegate { SetDNA(); });
    Code (CSharp):
    1. private void SetDNA()
    2.     {
    3.         dnaSetter.Set(DNASlider.value);
    4.  
    5.         Avatar.BuildCharacter(true);
    6.         Avatar.ForceUpdate(true, true, true);
    7.     }
    And even after calling BuildCharacter, we see a lot of glitches with the DNA not 'smoothing' itself, as shown with this image (This was just by setting the Forehead Position DNA to 0.8 and then calling BuildCharacter(true) and ForceUpdate(true, true, true)):



    Hope you can help us figure out how to remediate to this.

    Thanks,
     
  24. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    #1 - It's missing the normal map. This is probably because when you set up the template material, you didn't add default textures to the channels you will use, so the shader compiler didn't create a variant for it. When you create your own materials, and you use a shader that has optional slots (ie - makes variants), then you need to prefill them so Unity will build the appropriate shader and include it.

    #2 - If you rebuild a character, the dnasetter can become invalid. You need to get the DNASetter before you modify it.

    #3 - Make sure you are using a quality setting that has 4 bone weights per vertex for the default models.

    Also, just noticed this. But the version without the normal map below bears a remarkable resemblance to a younger Bill Clinton.

     
  25. Yerkisk

    Yerkisk

    Joined:
    Jul 28, 2015
    Posts:
    14
    #1 : But we're using the basic avatar in the Getting Started folder, nothing custom about it. We did reduce some texture's max size, so we'll reimport all textures and test again to be sure. The only noticeable change is that we're using HumanMaleDCS instead of HumanMale as a race. We'll look into the shaders as well, as we know we had to change a few things there months ago to reduce the build time on Android, but it was working fine in the previous version of uma so we don't quite see what could have changed.

    #2 : We're getting the DNASetter like this (PrepareDNASetter is called on the OnValueChanged of the dropdownlist where we select the DNA bone to modify) :

    Code (CSharp):
    1.  
    2. public void PrepareDNASetter()
    3.     {
    4.         Dictionary<string, DnaSetter> allDNA = Avatar.GetDNA();
    5.  
    6.         DNASlider.onValueChanged.RemoveAllListeners();
    7.  
    8.         if (allDNA.TryGetValue(DNACategoryDropdown.options[DNACategoryDropdown.value].text, out dnaSetter))
    9.         {
    10.             DNASlider.value = dnaSetter.Value;
    11.  
    12.             DNASlider.onValueChanged.AddListener(delegate { SetDNA(); });
    13.         }
    14.     }
    15.  
    Are you saying that we need to call this every single time after we use BuildCharacter?

    #3 : Where would we see that? As we're using the default avatar in the Getting Started folder, we never had to modify any of that.

    Thanks for your help.
     
  26. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    #1 - Look at your material. You probably changed to mobile shaders, and forgot to set it up. It's just the way Unity works. It's missing the normal map.

    #2 - You should pass "dnaSetter" to your delegate, and not rely on a global value for it. I have no clue what that global value is pointing to when the delegate is actually called later.

    #3 - its in your project settings, quality settings. Under Blend Weights. It should be set to 4 bones. You'll need to make sure this is the case for all quality levels.



     
  27. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    828
    Has anyone integrated UMA into Invector Shooter controller? I know the is the DK version but I am looking for straight UMA 2.9 to Invector.
     
  28. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    SickaGamer likes this.
  29. Yerkisk

    Yerkisk

    Joined:
    Jul 28, 2015
    Posts:
    14
    Thanks, that did fix our issues. For some reasons the game returned to a default of Low Quality and as such it was not using the normal maps. We've also fixed all qualities to be 4 bones, fixing any future issues.

    Thanks!
     
    Jaimi likes this.
  30. MarkFitzpatrick

    MarkFitzpatrick

    Joined:
    Feb 8, 2019
    Posts:
    23
    Hey Jaimi! Question for you. All our characters slots are lighting differently. Its like its not stitched together as one entire model. So the clothes light differently than the body, the body lights differently then the head.

    Second Question: When I hit play, UMA doesn't show the high quality texture. Normal map doesn't show, or the correct roughness. I actually have to open up the UMA Reader and open the material at runtime and then it actually pops the high quality material on.

    Thank you Jaimi.
     
  31. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    1. Make sure your normal maps are marked as normal maps in the editor. If this is already the case, make sure any shared colors are set on the recipes with the same names ("Skin", "skin" will be different, etc).

    2. This is caused by Unity not knowing about the shader variant at compile time. When you create your own materials, and assign them to UMAMaterials, you have to prefill any textures you are going to use with a dummy texture. This will cause Unity to compile the correct shader variant for that material.
     
    hopeful likes this.
  32. MarkFitzpatrick

    MarkFitzpatrick

    Joined:
    Feb 8, 2019
    Posts:
    23
    When you say "Prefill any texture" Where do I prefill them at? I'm already putting the texture in the texture slot of the material I created. I'm also putting them into the overlay as well. Is there another location I have to put these textures?

    Thank you!
     
  33. katasteel

    katasteel

    Joined:
    Nov 21, 2014
    Posts:
    182
    Hey guys quick question.
    How can I use a recipe to add an overlay to an existing slot?

    I want to be able to add/remove something like stubble to face.
     
  34. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    Look at the included beard samples. Basically, you just add the head slot again (pick it from the dropdown so you're sure you got the correct one), and apply only the stubble to it. The merge process will detect the head is already there, and add the new stubble on top of all of the existing overlays.
     
  35. katasteel

    katasteel

    Joined:
    Nov 21, 2014
    Posts:
    182
    It works. Thanks for the help!
     
    Jaimi likes this.
  36. Baylamon

    Baylamon

    Joined:
    May 16, 2019
    Posts:
    11
    I want to build an overlay, that takes the normal texture into consideration but ignores diffuse as well as metall.
    2019-11-14 14_38_21.jpg
    Let's say the green and below the blue and yellow is a basic overlay with plain fabric. (overlay1)

    The blue part shall use the material and coloring of the basic plain overlay but take the normal map into consideration.(overlay 2) That way I can combine different structures with a number of basic models.

    The yellow part shall use diffuse, normal and metall full. (overlay 3)

    So far a structure with overlay 1 and 3 is simple. For applying an overlay like 2 I experimented with cutout but had no success. At the end, I had the buttons only, everything else was transparent.
    The current workaround is to have a normal map of overlay 2 that covers the full range of overlay 1. But it does not allow to apply 2 different structures to one basic overlay.and requires for different basic overlays seperate structured overlays.
     
  37. tgienger

    tgienger

    Joined:
    Jul 18, 2013
    Posts:
    36
    Hello there! I have started a brand new HDRP project using unity 2019.3 beta. I installed UMA 2 from the asset store (2.9 I believe) and have been trying to upgrade to hdrp. To start with I upgraded all project materials using edit -> render pipeline -> upgrade project materials. Then as I tried loading I discovered the naming issues, so I renamed _BumpMap to _NormalMap, this was self explanatory, but not quite so self explanatory to me is _MetallicGlossMap. I Assumed it was suppose to be _SpecularColorMap and the character at least generates, but with issues.

    The problem I'm having now as seen in this image is it's loading a default "not set" texture. Need some guidance as to where to go next. Thanks :)
     
  38. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    On the overlay there is an "alpha mask" field. You can supply a texture in the Alpha Mask field, and it will use the alpha from that texture instead of the alpha in the bitmap. You can also supply a smaller texture, and just set the "rect" field to the position in the larger texture.
     
  39. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    If I recall correctly, I think that _MainTex was renamed to _BaseMap.
     
  40. tgienger

    tgienger

    Joined:
    Jul 18, 2013
    Posts:
    36
    upload_2019-11-14_15-48-40.png

    getting closer. Eye browse and lashes are missing transparency, maybe some base color in the lashes? The only option for base color was _BaseColorMap btw.
     
  41. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    I don't have much experience with the HDRP (I've been using the LWRP).
    But, does the lit shader have an option to set transparency? They would generally use "fade" transparency, but I do not know how to set that in the HDRP shader.
    Have you seen Kenamis work for the HDRP?

    https://github.com/kenamis/UMAHumanHD
     
    tgienger likes this.
  42. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    342
    Hello there,
    Been away from developing using Unity for a bit and am back to it again and am wondering about getting the stable development branch in place rather than the Unity store version.
    In looking through the wiki I noticed a link for the branch, but no instructions on how to implement it. Do I just replace the existing assets folder with what's in the development branch, or is it more complicated than that? Also, I seem to remember reading a read me about being about to keep it up to date automagically, is that possible, and if so how?
    PS Amazing new features, glad you are still still very active in UMA; its very exciting to get started with it again.

    Thanks in advance,
    Boysenberry
     
  43. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    Currently, the dev branch and the Asset Store are the same (Version 2.9).
    I'm working on Addressables, but they won't make the dev branch for a few weeks. So feel free to pull the Unity store version. It's no longer possible to update UMA through the help box automatically, sorry.
     
  44. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    342
    Thanks for the quick reply. For future reference, if I do want to update to the dev branch at a later date when the two aren't in sync anymore, do I just copy the contents of whats in Assets/UMA to a new project or replace the existing UMA folder with it in existing projects to update?
     
  45. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    You can simply delete the assets/UMA folder and copy the new one in. You'll need to rebuild the global library.

     
    boysenberry likes this.
  46. Baylamon

    Baylamon

    Joined:
    May 16, 2019
    Posts:
    11
    MeshHideAssets disappear on restart from recipe

    I'm looking for a way to make changes on recipes persistent.

    I apply my MeshHideAssets via code
    Code (CSharp):
    1. public List<UMA.MeshHideAsset> meshHides;
    2. public List<UMA.UMATextRecipe> recipes;
    3.  
    4. ...
    5.  
    6. foreach (UMATextRecipe recipe in recipes)
    7. {
    8.     foreach (MeshHideAsset meshHide in meshHides)
    9.     {
    10.         recipe.MeshHideAssets.Add(meshHide);
    11.     }
    12. }
    Code simplified for this question!

    It works fine and I have the meshHideAssets in my recipes available. They take effect too.
    But once I restart my Unity project the MeshHideAssets in the recipe are gone.

    Applying them manually the MeshHiudeAssets are persistent.

    And yes
    • I saved the project
    • run a UMA Library repair
    • add the recipe to the library agian
    When testing I found the + Button on the MeshHideAsset list doesn't work properly as well. The last added asset disappears on project restart. If I change the list size number, the added assets are persistent.
    .
     
  47. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    If you make changes to assets in code, you have to tell unity the assets are dirty and force the asset database to save them. See EditirUtility.SetDirty() and AssetDatabase.SaveAssets(). Note that these are editor only functions.

     
    Baylamon likes this.
  48. Baylamon

    Baylamon

    Joined:
    May 16, 2019
    Posts:
    11
    Thank you! This is the solution.
     
    hopeful and Jaimi like this.
  49. CWatsonT2

    CWatsonT2

    Joined:
    Jan 9, 2019
    Posts:
    25
    I've got a strange problem with the uma dna not loading on the oculus quest. It works fine in my editor but when I build to the device the dna get ignored. The clothing and colors work on the quest but the dna changes don't. Any ideas why this would happen?
     
  50. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,891
    Are you getting any errors in the console? There was an issue in 2.8, where dynamicDNA could throw an error at runtime, that was fixed in 2.9.