Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. Droptrooper

    Droptrooper

    Joined:
    Sep 20, 2020
    Posts:
    4
    The .NET was set to 2.0 I've changed it to the 4.x
    This is a new empty project with only UMA imported.
    I closed Unity and restarted it with the same errors.
     
  2. Droptrooper

    Droptrooper

    Joined:
    Sep 20, 2020
    Posts:
    4
    Set the .NET to 4.X (it was 2.0 before)
    Restarted Unity with the same errors.
    This is an empty project with only UMA imported.
     
  3. FrankiePal

    FrankiePal

    Joined:
    Dec 28, 2017
    Posts:
    13
    Did you figure out what to do with this constant, to make the errors go away?
     
  4. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
  5. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You don't need to mess with that in UMA 2.10+ - you can simply go into UMA preferences and turn on "Use 32 bit meshes".
     
  6. FrankiePal

    FrankiePal

    Joined:
    Dec 28, 2017
    Posts:
    13
    Very nice solution. Although I do not know if I found the wrong one, because it is called "Use 32bit buffer" and checking it does not change my situation.
    upload_2020-9-22_16-25-5.png
     
  7. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Yeah - that is the correct one. That enables 32 bit meshes in UMA. What is your situation?
     
  8. FrankiePal

    FrankiePal

    Joined:
    Dec 28, 2017
    Posts:
    13
    Two characters are generated properly like all of them used to do, but the rest (20 i think) produce warnings and errors. They are not caused by any changes in the code, because I simply did other stuff than changing code. Especially UMA classes, which cause the problem, according to the console. Some of the errors were already in this thread and tried to fix it this way you described.
    upload_2020-9-22_16-40-57.png upload_2020-9-22_16-41-41.png upload_2020-9-22_16-42-0.png
     
  9. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    How large are your meshes? I limited the size to 256k vertexes because that honestly sounded like a ginormous amount that would never be reached.

    Anyway, if you need larger than that, you can change the constant in UMAMeshData.cs:

    #if UMA_32BITBUFFERS
    const int MAX_VERTEX_COUNT = 262144;
    #else
     
  10. FrankiePal

    FrankiePal

    Joined:
    Dec 28, 2017
    Posts:
    13
    They are not too big. I use viking clothing from arteria and the simplest versions of the free character models by Will B. And they used to work. I tried changing UMAMeshData.cs to

    #if UMA_32BITBUFFERS
    const int MAX_VERTEX_COUNT = 999999;//262144;
    #else
    const int MAX_VERTEX_COUNT = 999999;//65534;
    #endif

    but the result is exactly as before.
     
  11. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Maybe the issue is procedural - how are you creating/building your character?
     
  12. FrankiePal

    FrankiePal

    Joined:
    Dec 28, 2017
    Posts:
    13
    Well I invoke

    public GameObject GenerateRandomCharacter(GameObject prefab, Vector3 Pos, Quaternion Rot, Transform parent, Sex sex)
    {
    GameObject go;
    if (prefab)
    {
    go = GameObject.Instantiate(prefab, Pos, Rot, parent);

    RandomAvatar = go.GetComponent<DynamicCharacterAvatar>();
    Randomize(RandomAvatar, sex);
    RandomAvatar.BuildCharacter();
    return go;

    }
    else return new GameObject();
    }

    The argument "sex" is then used inside "Randomize()" to call Randomizer.GetRandomAvatar(sex),
    which i edited slightly to look like this

    public RandomAvatar GetRandomAvatar(Sex sex)
    {
    string race;
    if(sex == Sex.female)
    {
    race = "HumanFemale2";
    }
    else
    {
    race = "HumanMale2";
    }
    List<RandomAvatar> avatars = RandomAvatars.FindAll(x => x.RaceName == race);

    if (avatars.Count == 1) return avatars[0];
    if (avatars.Count == 0) return null;
    int total = 0;

    // find the total number of chances.
    foreach (RandomAvatar ra in avatars)
    {
    total += ra.Chance;
    }

    foreach (RandomAvatar ra in avatars)
    {
    int rval = UnityEngine.Random.Range(0, total);

    if (rval < ra.Chance)
    {
    return ra;
    }
    }
    return RandomAvatars[avatars.Count - 1];
    }

    All of it (edit: HAD) worked correctly and I got all of these guys happily wandering around with their race matching their "sex" variable.
     
  13. FrankiePal

    FrankiePal

    Joined:
    Dec 28, 2017
    Posts:
    13
    So I do not think it is relevant to the case. My most recent changes included adding a lot of Mesh-hiding assets. Maybe that was it?
     
  14. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I can't see anything wrong -- Now, Steve's meshes can be quite high poly, but they shouldn't be anywhere near that. If you rebuilt some meshes after generating the mesh hide assets, that might cause some problems. Or if something has gone wonky in the randomizer. You might try dumping out the slots in the UMAData Slot List, just to verify there isn't a bunch more than you expect.
     
  15. FrankiePal

    FrankiePal

    Joined:
    Dec 28, 2017
    Posts:
    13
    I dumped all of the female data from the randomizer (because I figured out it is most likely to cause the trouble, since the first two guys (edit: males) always appeared correctly) and now everything is OK.
    Except I would like to restore all of the stuff I previously had and adding the DNA in the Randomizer one-by-one was already painful enough the first time. Are you guys maybe planning to implement a feature where you can add more DNA than one at a time? upload_2020-9-23_10-16-18.png Or an option to add all of them, and then the user will manually delete the ones they do not want. Also those little sliders upload_2020-9-23_10-19-39.png could also have an ability to be mass-modified.
    Anyway, thanks for the great support!
     
  16. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    429
    Hi all,

    I'm looking for an UMA tech artist/programmer
    - I need a character creation screen for a psychology project on children's body image.

    Funds are available, let me know your rates by DM and I can explain a bit more about the project if you're interested.
     
  17. FrankiePal

    FrankiePal

    Joined:
    Dec 28, 2017
    Posts:
    13
    I have to say I really like UMA and I would like to help improve it. I do not know mush about creating such tools, but I have couple of ideas how to improve the user experience. I do not know if it is a good place for such requests but I heve already started in the previous post, so here I go:
    -adding the checkbox for the DNA to use the Gaussian function would be a good idea, since the extreme features are less likely to appear in humans.
    -in the Randomizer/Wardrobe, the ability to set the "Weighted Chance" to 0 would let the developers disable some piece of clothing from appearing, without the neccessity of searching for it the next time they want to include it. They could just set it to >0.
    -still Randomizer/Wardrobe, the ability to collapse/expand all the recipes of a given slot. The list of the recipes grows quickly so it would help.
    -while creating a HideMesh you should not only be able to see the part you are trying to hide, also the one that is doing it, because it tells you how much you have to select.
    -choosing a default Race in the Randomizer, either using one of the ones already existing in the Randomizer, remembering which one has been checked most recently by the user or letting him choose the default for this specific Randomizer. Right now it chooses the first one from the list every time I open inspector.

    If you already have some thread with requests or ideas, let me know, so I would post it there instead.
     
    TeagansDad and Jaimi like this.
  18. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    Apple dont like showing only underware, thats what i already have and they rejected it. I modified to the code to prevent removal of shirt or pants (blocked the remove button), then checked if no shirt or pants to generate another random set of clothes.
     
  19. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Wow, Apple is pretty restrictive. I wouldn't have expected that.
     
    EnriquePage91 likes this.
  20. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    So does UMA come with built in teen characters now by default?

    The built in characters look like adults, mostly teens are playing games and they dont want adult looking characters.

    Teens hate adults remember!!
     
    Last edited: Sep 23, 2020
  21. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    Thats Apple, they roll different.
     
  22. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    No, it's still the same characters. WillB has some anime characters now (and some new humans and cats also).
     
  23. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    Awesome, do you know ho i can get the WillB anime characters? Thanks

    I would recommend anime characters be the default a lot of people complain to me about it as soon as they see my game (which uses the default UMA characters), because 90% of players are teens.

    I really dont know why they complain, the characters look good to me, but what do i know.

    UMA characters certainly looks better (in my opinion) than a lot of games out there (roblox for example). But like i said, what do i know.
     
  24. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
    My o3n races 3 have an age DNA which you can lower to create teens. (only female out in UAS for free now, but male is coming out really soon)
    Asset link (Jane): https://assetstore.unity.com/packages/3d/characters/o3n-uma-race-stunner-jane-175172
    John WIP: https://www.patreon.com/posts/john-is-almost-41829458

    BTW Steeve (Arteria) is already creating for Jane I noticed :) Thanks Steeve!
     
    Jaimi likes this.
  25. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    331
    I'm currently working on a mod loading system for my game. Is there a way to update the library at runtime so that new items can be added on the fly?
     
  26. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Yes- you can use Addressables, or you can call a function to add the items in a downloaded and instantiated Asset Bundle to the library at runtime: UMAAssetIndexer.Instance.AddFromAssetBundle(AssetBundle ab);
     
    Graham-B likes this.
  27. Zante

    Zante

    Joined:
    Mar 29, 2008
    Posts:
    429
    Edit: Solved - Add the 'ClothUMARendererAsset' via the 'renderer asset' field in the slot itself.

    Anyone got an up to date guide on how to add cloth physics to UMA?

    It seems very confusing. The guide here talks about creating an UMA material and adding the cloth properties to the appropriate field but there is no such area.

    I'm using this guide: http://umadocs.secretanorak.com/doku.php?id=knowledgebase:uma_material&s[]=cloth

    ...which shows this image:



    I don't see a 'cloth properties' entry on any of my UMA materials...
     
    Last edited: Sep 27, 2020
  28. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    For a WardrobeCollection, how can I test if my current race is supported or not?

    I'm making a random outfit script, and some outfits exist only for male/female. I'd like to write my random picker in a simple loop that says "pick randomly until you found one you can actually use".
     
  29. FrankiePal

    FrankiePal

    Joined:
    Dec 28, 2017
    Posts:
    13
    if(uMAWardrobeCollection.compatibleRaces.Contains(currentRace.Name)) return true;
     
  30. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    Thanks, that doesn't work but it pointed me in the right direction:

    Code (CSharp):
    1.         RaceData currentRace = avatar.umaData.umaRecipe.GetRace();
    2.         UMAWardrobeCollection MyNewClothes;
    3.         int x = 0;
    4.         do {
    5.             MyNewClothes = WardrobeCollections[Random.Range(0, WardrobeCollections.Count)];
    6.             x++;
    7.         } while (MyNewClothes.compatibleRaces.Contains(currentRace.raceName) == false && x < 100);
    8.  
    9.         avatar.SetSlot(MyNewClothes);
    10.  
     
  31. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Have you looked at the UMARandomizer? It lets you setup races, and the random items for those races, along with colors etc.
     
  32. happu2

    happu2

    Joined:
    Jul 15, 2019
    Posts:
    3
    Build crashed with lower-end devices (UMA 2.0):
    I have used UMA's latest version in my game and I have around 200 content (clothes, hair) for the character in my game. The build is working fine with the device having RAM 2 GB or greater But build crashed on lower-end devices (1 GB RAM). Is there anything I can do for loading the content in the scene when I needed otherwise It should not be used in the scene?
     
  33. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    Yes, I've looked at the randomizers supplied with UMA. The simple ones don't cover my use case and the Mixer and Recipies are essentially chinese without proper documentation. They appear to be powerful, but I couldn't even get a simple test working and it's much faster for me to write my own code compared to fiddling for days with that to figure it out.
     
  34. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    Anybody using UMA with iOS?

    Im making an iOS app with UMA, it works on iPhone but constantly runs out of memory on iPad.

    Seems UMA is too big!
     
  35. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    This is a massive thread, so the answer is probably somewhere in the 150 pages I didn't read but...

    UMA seems to have a lot of backwards-compatible stuff that isn't needed if you start a new project. So on a completely new project:
    • use HumanMale or HumanMaleDCS ? (same for female) - and what's the difference?
    • Use UMA_DCS or UMA_GLIB and what's the difference at all?
     
  36. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    On all mobile devices (phones and tablets), you need to be careful of how much memory you are consuming. Using Addressables can help with this.
     
  37. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    In short: Use HumanMale and UMA_GLIB.

    The long story:

    HumanMale is the correct race to use for new apps. When we first released UMA 2.5, the DCS portion of UMA was an addon, and the DCS version of the races used dynamic DNA (DNA that is parameterized and can be downloaded and expanded via asset bundles), as opposed to the original code-based DNA. At one point, we moved DCS to mainstream, and made HumanMale (the default) use the new Dynamic DNA.

    UMA_GLIB is similar. Original UMA 2 had a UMA prefab with the "context" and the libraries that contained the slots, overlays, and races. So this meant that you had to have a scene with the UMA prefab in it open before you could look at UMA recipes. This caused errors when people would first open up UMA and look at recipes. In addition, these weren't easy to update. So these libraries were expanded to use Dynamic Libraries, that could use asset bundles. At the same time, we added the "global library" -- which indexed all the objects that UMA uses. This was added to the Dynamic libraries also. All the calls to get items would go through a "context", which would look in the various libraries. At this point, you have the UMA_DCS prefab - a context with dynamic versions of all the libraries.

    Then at one point, we all got together and said "This is going through a lot of work to get to everything - it looks in the scene, and then looks through asset bundles, and then queries the index." So we created a new context (the "Global Context"), and it goes straight to the index for everything. It didn't need the libraries anymore. So we created the UMA_GLIB.

    So that's the story. Use HumanMale and UMA_GLIB for 2.10+
     
    TeagansDad, Tom163 and hopeful like this.
  38. Threeyes

    Threeyes

    Joined:
    Jun 19, 2014
    Posts:
    80
    Can I Export the dynamic character into FBX format that includes lip bones? I had search the forum but no luck, thanks:)
     
  39. arteria

    arteria

    Joined:
    May 31, 2007
    Posts:
    2,189
    Today Arteria3d release a new costume in their expanding Sci Fi UMA costumes.

    The Bounty Hunter...


    The 'SciFi Bounty Hunter ' costume.

    All costume items scale and deform precisely so you can vary the size of your characters proportions

    Pack Contains:

    • 6 Slots
    • 6 Overlays
    • 6 Wardrobe Recipes
    SLOTS Included & Overlays & Wardrobe Elements for:

    • Helmet
    • Helmet Visor
    • TorsoArmour
    • Gloves
    • Leg Armour
    • Boots
    Pack can be purchased from the Arteria WebStore

    https://arteria3d.myshopify.com/collections/uma/products/scifi-bounty-hunter-for-unity-uma

    (Thankyou again to Jaimi and the UMA team for everything they do with UMA, and also allowing Arteria to post here)
     
    Last edited: Sep 29, 2020
    Zante, Jaimi and boysenberry like this.
  40. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    The only way I know to successfully export to an FBX with bones, is to use Unlogicks FBX exporter. The Unity exporter will export a rig but the bones are all twisted.
     
    Threeyes likes this.
  41. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Looks good!

     
    arteria likes this.
  42. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    331
    I used the ForearmTwistRecipe example as a base to create my own Utility Slots. They work great, but they only get added to the first dynamic character, and subsequent characters are ignored.

    I've debugged the problem and is seems that the hashesFound boolean is getting set to true while the first character is generated, then subsequent characters are not performing the hash search because they already have hashesFound set to true. It seems like they all use the same instance of the utility slot script.

    Is there a way to get around this limitation when sharing Utility Slot Recipes between multiple characters?
     
    Last edited: Sep 30, 2020
  43. girlinorbit

    girlinorbit

    Joined:
    Apr 27, 2019
    Posts:
    115
    I've created my own race, but whenever I go into play mode, the texture on the eyes doesn't show up. When I look at the UMA Renderer texture, the texture for the eyes isn't there at all. The eyes are a separate slot. How do I make the texture show up?
     
  44. Zebra-Sin

    Zebra-Sin

    Joined:
    Feb 9, 2014
    Posts:
    22
    Hello,

    I finally manage to create my new race, define the slots / overlays / textures /animations, and all works ! That part is fine.

    Now, I want to change the textures of the body or wardrobe, but I don't understand why this with maybe impossible.

    I tested this following line :
    Code (CSharp):
    1. UMACharacter.umaData.GetSlot(0).GetOverlay(new string[] { "UMA_TEST_UPDATE_BODY_Overlay" }).asset.material = MatBody;
    Where UMACharacter is my UMA Dynamic Character Avatar prefab, "UMA_TEST_UPDATE_BODY_Overlay" is the overlay I want to modify the texture, and MatBody is the new UMA Material I want to assign.
    The problem with this code, even the code works, it change the material in the editor, not only in Play Mode.
    There is a solution do accomplish this ?
    Or I need to do completely another way to change the textures ? (and only the textures, I don't want to create a new slot, except if you tell me UMA 2 is optimized and don't copy the vertex)

    Thank you.
     
  45. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    Thanks a ton to Jaimi for all those helpful answers.

    I have one more on my quest to master UMA. Is there something like an idle animation for the ExpressionPlayer? I've followed some tutorials about moods etc. - but for most NPCs all I want is a bit of movement in their faces so they don't look like they're dead. A twitch here, a short smile, etc. - no actual facial expressions or mood, just something to show on the face when there's no specific mood to show.

    Does such a thing exist? An animation or a script?
     
  46. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    hashesfound is just calculating the bone hashes from the bonename strings, it shouldn't stop it from working. UMA uses the hashes to find bones. I think something else must be happening.
     
  47. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Are you manually setting the rects on the overlays in the recipe or on the overlay itself? This can happen when you have done that, and they get resized.
    Otherwise, I'd have to think something is wrong with either the colors (ie, the mulitiply color is 0,0,0,0 or something). Check the alpha on the colors also.
     
  48. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    What you'll want to do is create a new wardrobe item. You would create a slot for the body, add the body slot, and add the new texture for the body. Then when you add that to the character, the system will see the duplicate slot and sort it out, and put the new texture in place.

     
  49. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    The expression player can enable random blinks and "saccades" (eyes looking around).

    "enableBlink" and "enableSaccade" on the expression player.
     
  50. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    331
    Okay so I was using hashesfound the wrong way. I was using it to also encompass the rest of my initialization code so that the twist bone scripts didn't have to be created every time the DNA changed, but rather just once at the beginning.

    I would like to add a new boolean to the slot script that gets set to true once the twist components have been created, and then gets ignored when the DNA is updated because the if bool is found to be true.

    The problem still remains as I mentioned before, the slot tool script instance seems to be shared across all avatars. If I set a bool value during the generation of the first character, it will remain set to true on every other subsequent character, and therefor additional characters will not receive the corresponding one time code.

    Is there a way to work around this?