Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hello,

    I now have UMA the latest working pretty much OK. Just two console error message issues which do not prevent any serious problem.

    1. I have a character model with the Buffer issue being too complex a character.

    2. I have an error message if I try and use a trigger to Activate or Deactivate a UMA character as opposed to any other. This is related to the UMA Renderer.

    These are not mission critical at the moment as the levels and characters still run in gameplay....however I would like to correct them. These issues have only recently appeared in recent versions of Unity whereas the same activation of objects and UMA characters caused no errors for some years and Unity versions previously...

    Due to "Known" issues in Unity itself I have some problems updating many things as one of the Known Unity issues/bugs causes Unity to have to reimport assets when a script change is made and with Around 530 thousand items in my project folder Unity takes around two hours just to do that at which time one cant do anything while Unity is busy. I spend much of my time constantly waiting for Unity to do its thing :) until the issue if fixed by them.

    Anyway there was specifically something else I wanted to ask please? regarding the Global Library...

    My global library seems to be working OK with listed Items, however none of them seem to be selected and I wanted to ask if they should be. Thiis does not prevent the UMA charcters from displaying their recipie items as far as I can see so it does not seem to cause any issues for them...

    I am not using "Addressables" at the moment as I have enough issues all round with Unity at present to contend with and if it works then want to leave well alone on that one for the moment.

    I have attached a screen shot of the Global Library...

    UMA_Global_Library.jpg

    Thanks and Kind regards

    Peter
     
  2. chorst_genies

    chorst_genies

    Joined:
    Jun 3, 2020
    Posts:
    7
    Hello! We are encountering weird mesh normal artifacts when loading an UMA race from an addressables asset bundle.

    The race appears fine when loaded directly in the source project, but when we load it as an addressable on any platform we see artifacts.

    Couple notes:
    -UMA version 2.1.0
    -We've tried uncompressed and LZ4 bundle compression settings
    -(Shouldn't be relevant) we are generating our addressables in a separate project from the app the consumes them.
    -Only has been noticed on our races, not with any other wardrobe recipes / slots.
    -Our race has many blendshapes so perhaps this may contribute?

    I've attached these images below:
    -No artifacts when viewed in source project
    -Visible artifacts when loaded from bundles
    -FBX import settings for the race model.

    Has anyone seen this before, or have any ideas how to fix it? Thanks!

    LoadedWithAddressables.png
     

    Attached Files:

  3. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Hi Peter - the Selection is used when you want have the "utilities" panel open, and use "Apply material to selection", or when you use one of the menu items that operates on the selected items. That isn't used for anything during runtime. If you're getting an error about the buffer size, you might try to enable 32 bit buffers in the UMA preferences.
     
  4. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I have not seen that before. It appears to be vertex normals, just from a quick look. Is it possible that the slot was fixed, but the bundles were not rebuilt? At edit time, it will use the slot from the project. But at runtime, it will load the slot from the bundles. I personally mess this up a lot. (lol).
     
  5. chorst_genies

    chorst_genies

    Joined:
    Jun 3, 2020
    Posts:
    7
    I definitely rebuilt the bundles because I had to change the profiles to test locally. I haven't tried running "Addressables>Build>Clean Build>All" yet though, I'll check that now.

    Oddly enough our previous races don't have this issue, it seems to be only the new race. I don't see any differences in the generated slots or source fbx import settings between the versions.
     
  6. LootlabGames

    LootlabGames

    Joined:
    Nov 21, 2014
    Posts:
    343
    Is there a way to have a recipe overwrite an overlay?

    Example:
    I have a torso that uses Overlay Body1 by default.
    But when I use Face2 I want the torso to use Overlay Body2.
     
    Last edited: Feb 11, 2021
  7. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Yes. If you want to overwrite an overlay, include the slot the overlay is on in the new recipe, and put the new overlay on it. The duplicate slot will be removed during the build, and the overlay will be added on the top of the overlay list for the slot.
     
  8. LootlabGames

    LootlabGames

    Joined:
    Nov 21, 2014
    Posts:
    343
    Ok So when I look at the slots after "Face2" overrides it it looks like this:

    upload_2021-2-11_9-59-35.png

    The first overlay is from the Overlay Body1 and the second one is from the Face2.
    Should both show like that?
     
  9. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Yes, the overlays stack in order.
     
  10. VR_Junkie

    VR_Junkie

    Joined:
    Nov 26, 2016
    Posts:
    77
    Hello, I am referencing some UMA bones in a script but they keep getting rebuilt whenever I change UMA clothes. This is causing my script to lose reference to those bones. I have rebuild skeleton unclicked. Am I misunderstanding the use of that button? Please advise
     
  11. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Editor time generation is on, and rebuild skeleton is off? I'm not seeing this. Are you on 2.11.6 or an earlier version?
     
  12. VR_Junkie

    VR_Junkie

    Joined:
    Nov 26, 2016
    Posts:
    77
  13. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Oh - I see. It doesn't do it at startup or in game, but the editor code is doing it. I'll fix it and get it into 2.11.7
     
  14. VR_Junkie

    VR_Junkie

    Joined:
    Nov 26, 2016
    Posts:
    77
    And to clarify, yes. Editor time generation is on and rebuild skeleton is off
     
  15. VR_Junkie

    VR_Junkie

    Joined:
    Nov 26, 2016
    Posts:
    77
    Ohh gotcha, thanks
     
  16. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Actually the change is pretty simple if you don't want to wait. In DynamicCharacterAvatarEditor.cs, In CleanupGeneratedData, pass false to thisDCA.Hide():

    Code (CSharp):
    1.             void CleanupGeneratedData()
    2.             {
    3.                 if (Application.isPlaying)
    4.                     return;
    5.                 List<GameObject> Cleaners = GetRenderers(thisDCA.gameObject);
    6.                 thisDCA.Hide(false);
    7.                 foreach (GameObject go in Cleaners)
    8.                 {
    9.                     DestroyImmediate(go);
    10.                 }
    11.                 DestroyImmediate(thisDCA.umaData);
    12.                 thisDCA.umaData = null;
    13.                 thisDCA.ClearSlots();
    14.             }
    Note that this will cause the system to mess up at edit time if you change races, and "rebuild skeleton" is off, and the race has an incompatible rig. (it will also mess up at runtime if you do that)
     
  17. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Well, that *should* have worked, but doesn't seem to be for me. I will keep looking at it.

    Edit: It actually does work, I tested the wrong project. Lol.
     
    hopeful likes this.
  18. VR_Junkie

    VR_Junkie

    Joined:
    Nov 26, 2016
    Posts:
    77
    Awesome, thanks for the quick fix!
     
  19. VR_Junkie

    VR_Junkie

    Joined:
    Nov 26, 2016
    Posts:
    77
    I have another question regarding in game switching of clothes. When I try to clearslot, it doesn't remove the clothes from the requested slot during runtime. While in editor I am able to go into the prefab and change slot items through customization tab. I know for a fact that the slot name and recipe name are correct.
    Example code I am using to switch:
    umaAvatar.ClearSlot("Legs");
    umaAvatar.SetSlot("Legs", "RecipeName2");
    Please advice
     
  20. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    A slot can only contain one wardrobe item. ClearSlot() will clear that item, so the slot contains nothing. SetSlot will replace an item in a slot, or add it if nothing is there. In order for that change to be visible, you need to rebuild the character -- BuildCharacter(false);
     
  21. VR_Junkie

    VR_Junkie

    Joined:
    Nov 26, 2016
    Posts:
    77
    Hello, sorry I left that part out of the example code I gave you but I am building the character after I switch slots. I am using UMA clothes from Arteria 3d and have rebuilt the global library to add them. I can change them through code fine on my first scene but once I switch scenes is when it breaks.
    Note: When I switch slots the recipe string changes to accomodate the switch but for some reason the build doesnt show the change (I tried doing BuildRecipeFromString as well as BuildCharacter)
    Note: The UMA has the scripts UMASimpleLOD and DCARendererManager, dont know if those affect anything

    Also is there any documentation where I can see the difference between events like CharacterUpdated and RecipeUpdated?
     
    Last edited: Feb 12, 2021
  22. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Unfortunately I haven't documented those yet.

    CharacterCreated is called after the character has been generated the first time.
    CharacterUpdated is called after every build.
    RecipeUpdated is called after the recipe has been created from the merge of all the different recipes (race/wardrobe/etc), but before it has been sent to generate.

    A common cause for this behavior is trying to build your character in an event. We guard against this, because it would cause an infinite loop. (generate -> event fires -> generate -> event fires, etc). Sometimes people think that CharacterCreated means "I have created the object, but nothing else has been done". But that's not what it means.

    When you switch scenes, do you have a UMA_GLIB in the next scene - or have you marked your UMA_GLIB from the first scene with the "Dont Destroy" flag?
     
  23. VR_Junkie

    VR_Junkie

    Joined:
    Nov 26, 2016
    Posts:
    77
    So we are using a custom event that detects when an item (which contains the slot name and item name) is equipped through my custom inventory. We wanted to rebuild the avatar every time an item is added/switched. The event is hitting and we are getting the debug call that is showing the correct slot name and item name but the avatar build isn't changing the character (despite the recipe being changed). Are you saying that is because the avatar build doesn't work in events?

    Also we are using UMA_DCS not UMA_GLIB and I have it set to DoNotDestroy. Should I switch to GLIB? I didn't really understand the difference between a DCS character and a normal character but I followed Secret Anorak's tutorial and he uses it so I just followed.
     
  24. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You should switch to UMA_GLIB. It's newer than SecretAnoraks videos. HumanMaleDCS and HumanFemaleDCS were the previous races when DCS was a separate part of UMA. You should use HumanMale and HumanFemale (or the HD versions).
    You can build in events, just not in UMA events. The UMA events are generated as part of the build process, and if you build in a UMA event, that will tell tell the system to build again, and send more events. So we guard against that -- if you call build in one of the UMA events, it will refuse to generate the character.

    Are you getting any errors? If you use the SImpleSetup scene, does it work correctly?
     
  25. VR_Junkie

    VR_Junkie

    Joined:
    Nov 26, 2016
    Posts:
    77
    I switched from UMA_DCS to UMA_GLIB and it the code immediately started working. Appreciate the help and thanks for the tips!
     
    hopeful and Jaimi like this.
  26. Vire7777

    Vire7777

    Joined:
    Mar 13, 2019
    Posts:
    37
    Hello here :)

    I implemented some UMA for my new project
    First i really want to thank you all for the AMAZING work
    Oh my god, that s sooo much and wow for letting people messing around with it

    Then i have a little question
    i implemented the random generator character (which works very well)
    But i have a small problem

    The time for my character to be generated is not null
    At the end of the generation, the character shows with cloths and bla bla bla
    That s fine
    But i can t find any event i could listen to at the end of the generation
    because the fact is, i would love my character to disappear when it s fully generated
    At the moment, i can only anticipate how long it would take to make it disappear, and that s really not safe

    So do you know where i could apply or listen or add a function for knowing my character is fully generated ? i tried to look at the code but... that s a sooo huge one. difficult to enter and understand.

    Thank you so much :)
     
  27. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You will get a "CharacterUpdated" event on the DynamicCharacterAvatar when the generation of the avatar is completed. You can add the event through the inspector under the "Character Events" dropdown.
     
  28. Vire7777

    Vire7777

    Joined:
    Mar 13, 2019
    Posts:
    37
    Thanks a lot Jaimi, sadly it seems it s not working :/
    I mean, i subscribed to the event, made a enable = false for all renderer children
    But... for some reason, it reactivates it just after

    Very strange. Like something is remaking it enable

    In fact after looking more, it seems the CharacterUpdated is not the event when the character becomes visible. I suppose there is a hidden process even after the generation. The character is here, but just he is invisible. Then he becomes visible. like this

    Creation of charac
    Character exists but is invisible
    CharacterUpdated event
    Character becomes visible

    So is there an other event for after the character becomes visible ?
    Or could you tell me where it is in the code for me to put an event ?
    i think it s something in a coroutine

    or maybe a way to generate the NPC but for him to stay invisible even if active and created ?
     
    Last edited: Feb 14, 2021
  29. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    To generate the character, but make him hidden, set "Hide = true" on the avatar. He will build, but will be hidden by default. Set Hide=False when you want to show him.
     
    hopeful likes this.
  30. Vire7777

    Vire7777

    Joined:
    Mar 13, 2019
    Posts:
    37
    It worked
    you re a genius
     
    Jaimi likes this.
  31. lobotomista

    lobotomista

    Joined:
    Jul 21, 2018
    Posts:
    39
    So I was looking at the seam removal class and it uses some rather complicated method. And was wondering if there's some way to do all that directly from blender without the need from ll that process.
    This not necessarily for UMA or unity even.
    I've been looking to make a modular characters and would preefer if they were engine agnostic. But the seams seem like a complicated problem to deal with.
     
  32. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Not that I'm aware of. Of course, when you stitched the meshes back together, you could do some seam removal simply by averaging the normals, but the speed hit might not be great also.
     
  33. acMacav

    acMacav

    Joined:
    Apr 1, 2018
    Posts:
    12
    Hello!

    I've been experimenting with UMA for a little while now and attempting to create custom clothing recipes using the various tutorials provided with the plugin and I've encountered a pretty annoying roadblock which is keeping me from successfully implementing these recipes.

    When it comes to bringing in either a blend file from Blender or exporting an FBX file of the object I want to make into a clothing recipe and going through the actual process of converting said object into a recipe, the object itself acts as if its not properly rigged to the character skeleton and as a result deforms pretty severely. Here's an example of a default UMA character with a suit top:

    The tutorials I followed were the UMA content creation tutorials by Secret Anorak which can be found here. They utilize the content creation packs found from the github repository and as far as I can tell, I've gotten every item installed properly within Unity, followed every step with regards to the tutorial that I need to, and am familiar with Blender enough to know how to go about rigging and exporting models into Unity, so I'm very confused as to what's causing this problem.

    I'm not sure if it's related to how unity is treating the imported Blend or FBX files skeletons, as I've heard that the rig needs to be set to humanoid or set up in a way that won't conflict with how UMA handles rigs themselves, but fiddling around with the rigs themselves of imported items wouldn't work either.

    I'm not sure if anyone on this thread has had a similar issue in the past, but any help or advise would be very appreciated!
     
  34. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    This is usually incorrect export parameters.
    Please review the "UMAContentCreation.pdf" in the UMA folder. This has the correct export settings. Here is the latest version.
     

    Attached Files:

    acMacav and hopeful like this.
  35. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    When you figure out where you went wrong, please mention it. No doubt someone else is going through the exact same or similar experience.
     
    acMacav likes this.
  36. acMacav

    acMacav

    Joined:
    Apr 1, 2018
    Posts:
    12
    As it turns out, it was as simple as following the updated pdf that Jaimi provided and looking through the export settings. All that needs to be done in Blender is selecting the parts of the mesh you want to export along with the rig, going to file and exporting as an FBX, and ensuring that the export parameters on the right of the window follow this:

    I then imported it into my unity project, went through the process explained above in the tutorials I provided, and the recipe above worked just fine when I placed them onto my character again!

    I do have one more question though for a different process which still relates to UMA. I imported FBX files into another bloated project that utilized UMA after testing them in my fresh UMA-only project and found that one of the recipe sets that I have didn't work. One of the sets you saw in the screenshot above was actual clothing that was rigged to the character while another set I have was duplicates of the character meshes overlapping to act as an outline for use as a recipe. Both of these sets worked in the fresh, UMA-only project while the more bloated project gave me an error with the outline set only. Whenever I would run it with the outline recipe, it would cause the entire character to become invisible and the console would throw me this specific error:

    I'm not sure if this is related to the structure of this more bloated project or if I'm missing something with regards to a material.

    I really appreciate the help so far, I had a hunch it was something very simple that was causing me issues!
     
    hopeful and Jaimi like this.
  37. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    From the error location, it looks like the older project has an older version of UMA. I recommend to upgrade it to the latest version.
     
  38. teknochaos

    teknochaos

    Joined:
    Oct 6, 2019
    Posts:
    5
    Hi, I try to add some hair slot on slot builder. But when I try to do I get some errors. Also I try to do it withhelmet but again I get the same error. Also I download models from mixamo.com for test purposes and use them without modifying. Should I modify it? If so, how? Thanks in advance.
    photo.png
     
  39. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Hi - did you fit them to the base character and rig them? They need a specific format.

    There's a whole series of videos on the steps needed. Probably best to start with UMA 200 series, and work your way through. With Blender 2.9, the export parameters have changed. Please take a look at the UMAContentCreation doc I posted just a couple of messages up for the correct parameters.

    Here's the video from the UMA 200 series that shows how to fit models to the UMA

     
    hopeful likes this.
  40. teknochaos

    teknochaos

    Joined:
    Oct 6, 2019
    Posts:
    5
    Thanks for the reply. I will check them out.
     
  41. Vire7777

    Vire7777

    Joined:
    Mar 13, 2019
    Posts:
    37
    Hello Jaimi

    me again
    I have a question
    my problem is that, when my scene has more than a 30-40 people in front of my eyes, my game is reallllly slowing down
    Do you know some good ways to improve this ? Because i would love to have 100 people walking around
     
  42. HappyGoLucky

    HappyGoLucky

    Joined:
    Jan 5, 2014
    Posts:
    5
    The characters normals are drastically changed after being built. The right are the meshes with the corresponding materials and the left the UMA character. Is there any way to fix this?
     

    Attached Files:

  43. LootlabGames

    LootlabGames

    Joined:
    Nov 21, 2014
    Posts:
    343
    When adding a wardrobe "Chest" it changes the texture for my legs.
    Here is what the legs should look like:
    upload_2021-2-24_16-11-24.png
    But when I add a chest recipe to it I get this:
    upload_2021-2-24_16-12-48.png
    Any ideas?
     
  44. LootlabGames

    LootlabGames

    Joined:
    Nov 21, 2014
    Posts:
    343
    It looks like the UV's mapping for the pockets are incorrect.
    I am working with the creator to see if he can fix it or not.
     
  45. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Yes - typically that is caused by the UV coordinates being outside the 0..1 range, causing it to go out of bounds on the atlas.
     
  46. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Did you create your own material? If so, be sure to provide a placeholder texture for every texture you will be replacing, otherwise the shader compiler doesn't know about them, so it doesn't compile in the normal maps, etc.
     
  47. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Most likely you are running low on video memory, causing the card to swap in and out. You can manage this several ways.

    1. You can tell the system to copy the render textures to regular textures on the generator. (Be aware that this causes a *stall*, and increased the generation time).
    2. You can lower the atlas size, so less Video Memory is used.
    3. You can use UMASimpleLOD which will dynamically lower the atlas size based on distance from the camera.
    4. You can "preset" some common textures in the materials, so your overlays don't generate render textures. For example, if you have an armor that is never colorized, you can create it's own material and umamaterial for it, and it will not create an atlas for it.
     
    hopeful likes this.
  48. HappyGoLucky

    HappyGoLucky

    Joined:
    Jan 5, 2014
    Posts:
    5
    I am using the Unity HDRP Lit Shader. Every materials uses the BaseColor, MaskMap, and NormalMap. Base and Mask map seem to compile fine, the normal map comes out yellow. I've included a runthrough of the process. Thank you for the help.
     

    Attached Files:

  49. PlayerDev

    PlayerDev

    Joined:
    Mar 15, 2017
    Posts:
    15
    Hi,

    I'm looking into using UMA for my game. The models and results are awesome, it's great.

    But that's also the problem: it looks a little too good for my game, IE I need models with lower poly count.

    So I was wondering if there's an easy way to change poly count within UMA using the native models? Or does UMA have options to reduce poly counts without having to export the models to Blender etc.

    Thanks
     
  50. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    The pink normal map is OK, it's caused by Unity converting the format to use the normal map.
    But it's obvious from the picture that it's not applying. If you look at the generated materials on the renderer at runtime, do all the maps appear? Does it "fix itself" when you view it in the inspector?