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

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. S2_Yoni

    S2_Yoni

    Joined:
    Nov 23, 2021
    Posts:
    5
    Good day @Jaimi
    We are having a small problem with our custom material and the UMA.
    As you can see in the image the head is gets transparent at the spots where the hair is being rendered.
    We know what the problem is but we want to know if we can change that by changing a setting in UMA.
    What we are searching for it a way to let the hair use the Alpha channel that is being used by the face texture instead of the one that is projected on top.

    Thanks in advance
    upload_2022-3-2_14-4-5.png
     
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    You can apply a separate alpha map on the overlay itself. If not, UMA will combine textures based on the alpha map of the first texture.
    But it seems like your material is transparent. Maybe just changing that would fix issue? The alpha will still be used for compositing.
     
  3. bubbabruce

    bubbabruce

    Joined:
    May 23, 2014
    Posts:
    16
    I am having a problem with UMA and animations. I load a UMA prefab and sometimes I get the character animating correctly and sometimes I don't. I have seen it animated perfectly from the same prefab but most of the time it does not. Sometimes the hands do not bend and sometimes it gets even stranger. This is a picture of two characters from the same prefab with the same animator playing the same animation. I assign the tints, appearance and clothing at runtime after the character is loaded so that is why they look different even though they are from the same prefab. The one on the left is playing the animation but the hands are wrong. The one on the right is frozen.

    Is there some way to get consistent results? Why would this happen? Is there any way to fix it?

    Kevin



    upload_2022-3-5_10-43-12.png
     
  4. bubbabruce

    bubbabruce

    Joined:
    May 23, 2014
    Posts:
    16
    A correction. The character on the right is playing a different animation but still with the flat hands. So the issue is really sometimes the hands are flat and sometimes they are correct according to the animation.
     
  5. bubbabruce

    bubbabruce

    Joined:
    May 23, 2014
    Posts:
    16
    more information. I am using HumanFemaleDCS race.
     
  6. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    Remove the expression player, or disable the hand override on it.
     
  7. OMGTOASTER

    OMGTOASTER

    Joined:
    Nov 3, 2014
    Posts:
    24
    Hi @Jaimi ! I have a question using addressables. My project currently has slots and overlays as well as textures that are shared at varying amounts. When using the generate optimized groups option, most of them end up in the shared items group or groups get generated with only one slot inside. Would the correct solution then be to manually organize my groups, then rebuild the global library?

    Additionally, some of the included hair recipes can no longer validate after building. They throw errors on the slot material, claiming that the "_MainTex" and "_BumpMap" properties do not exist. Slots and materials that I have created work fine, however.
     
    Last edited: Mar 6, 2022
  8. bubbabruce

    bubbabruce

    Joined:
    May 23, 2014
    Posts:
    16
    Thanks for the quick response. If I remove or disable the expression player it does indeed fix it but I lose that functionality. Turning the hand override on or off makes no difference though, the hands are still straight. My versions are UMA 2(v2.12) and Salsa(v2.5.4) and OneClick UMA DCS (v2.5.1)

    upload_2022-3-6_15-12-56.png
    This is paused but even unpaused it does not change.

    Kevin
     
  9. joihnsonlee

    joihnsonlee

    Joined:
    Nov 21, 2013
    Posts:
    14
    hi do you have a discord channel?
     
  10. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,021
    @Jaimi I see an issue when I use the LOD avatar. The mesh is all deformed as if it's using a far away LOD:

    upload_2022-3-7_9-2-26.png

    Using Latest UMA and Unity 2020.3.26f1.
     
  11. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    Check the LOD Distance on the component. This can happen if it is set very low.
     
  12. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
  13. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    I've not actually seen that behavior. Somehow the override is set internally. If you adjust the hand gestures, do they take effect?
     
  14. bubbabruce

    bubbabruce

    Joined:
    May 23, 2014
    Posts:
    16
    The hand gestures do take effect but if there are no hand gestures then the hands are flat like the pic above. If I turn off override mecanim hands they are still flat as if I had no hand gestures when it was on.

    upload_2022-3-8_22-38-40.png
     
  15. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    That's bizarre. Are you using the very latest from the asset store? Try to replace your expression player source files with these...
     

    Attached Files:

  16. bubbabruce

    bubbabruce

    Joined:
    May 23, 2014
    Posts:
    16
    I tried these but it did not make a difference. I did write a hack that fixes the hands while allowing all the other non-hand gestures and blinking to work though.

    I added this to each inner loop in ValidateBoneHashes in UMAExpressionSet and that fixed the issue.


    Code (CSharp):
    1.                            
    2. if (bone.bone.Contains("Finger"))
    3. {
    4.     continue;
    5. }
    6.  
     
  17. OMGTOASTER

    OMGTOASTER

    Joined:
    Nov 3, 2014
    Posts:
    24
    Hello @Jaimi ! Concerning addressables, my project has slots and overlays as well as textures that are shared. When using the generate optimized groups option, some end up in the shared items group while some groups get generated with only one slot inside. Should I manually organize my groups, then rebuild the global library?
     
  18. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    I would use the "Generate Single Group" options instead of the Optimized. In theory, the optimized version will generate the least number of asset bundles. But I've found in practice, that matters actually very little.
     
  19. OMGTOASTER

    OMGTOASTER

    Joined:
    Nov 3, 2014
    Posts:
    24
    But if I wanted to remotely host some wardrobe assets to be delivered as needed? I'm still familiarizing myself with addressables so my understanding may be wrong.
     
  20. Femidko

    Femidko

    Joined:
    Aug 4, 2013
    Posts:
    57
    Good afternoon!
    There is a wardrobe recipe (for example, a shirt) containing several additional slots (wooden buttons, iron rivets, various collars) - these are child slots (wardrobe recipes) of the main slot (wardrobe recipe). I want to show some child slots and hide others. Is it possible from code and how? I didn't find how to do it... Thank you
     
  21. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    Typically you would do this by creating separate recipes that only included the slots that you wanted.
    But if you want to do it from code, this would require you to modify the recipe. You can do this in the OnRecipeUpdated event. Then you would scan through the slotdatalist in the umadata.umarecipe, and remove the items you don't want to be built.
     
    Femidko likes this.
  22. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    You would update your catalog, and then download the new catalog. You would import the new recipes, and (assuming everything was labelled right), the new slots/overlays/textures for those recipes would be downloaded as needed.
     
  23. OMGTOASTER

    OMGTOASTER

    Joined:
    Nov 3, 2014
    Posts:
    24
    This is still achieved with the single group?
     
  24. Alluxu

    Alluxu

    Joined:
    Oct 20, 2020
    Posts:
    4
    Jaimi, what could be wrong?

    My materials have correct shader when on editor. But when I press play: Everything goes pink, and also they have the default shader for some reason...

    Yes I have tried to upgrade them to URP via UMA:s UI and also via the unitys UI.
     
  25. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    148
    Hi, it's probably a bit cheeky to ask, because I don't use UMA in my current project, but I strugle with visible transitions between separated meshes (body parts). I use DAZ characters and separate meshes in Blender to standalone objects through Python script. Same thing as Secret Anorak does in video tutorial below (mentioning UMA will deal with that and original full-body mesh should not be deleted because of that).

    I guess that UMA copies normals from original mesh to all newly created to smooth all transitions. However when I do it with my editor script everything is fine till I open Unity again and hard edges are back for some reason. FBX Import Settings should be set correctly, Blendshapes and Normals are not set to Calculate (enclosed picture).

    I could run script to copy normals runtime after spawning my character however it takes around 10 seconds, making it unusable. But maybe there is a way to copy it much faster or to prevent Unity from "forgetting" copied normals when reopened...?

    Code to copy normals from original full-body mesh to it's parts:
    Code (CSharp):
    1. for (int i = 0; i < thisVertices.Length; i++)
    2. {
    3.     for (int j = 0; j < otherVertices.Length; j++)
    4.     {                    
    5.         float distanceBetweenVertices = Vector3.Distance(thisVerticesWorldCoord[i], otherVerticesWorldCoord[j]);
    6.  
    7.         if (distanceBetweenVertices <= DistanceThreshold)
    8.         {                        
    9.             thisNormals[i] = otherNormals[j];
    10.             overlapFound = true;
    11.         }
    12.     }
    13. }
    14. if (overlapFound)
    15.     thismesh.normals = thisNormals;

     

    Attached Files:

  26. giving_up_unity

    giving_up_unity

    Joined:
    Sep 17, 2016
    Posts:
    235
    hello, amazing work on this asset

    please, im looking at the DynamicDNAConverterControllerDemo, and its great help, but where exactly might I find the code that handles the blending of the three normal maps for human male body?

    I did find the atlas and HumanMaleDNAConverterController data asset but im not seeing where exactly those normal maps are blended or modified in.
     
  27. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    I don't really know. My first guess is you used the final build option which stripes materials, but don't have the materials in the library. It also might be you forgot to,rebuild your bundles after fixing the materials.
     
  28. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    Most likely you forgot to mark your objects dirty, and did not save them using assetDatabase.SaveAssets()
     
  29. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    Those are done using overlays and shared colors. There is color DNA modifying the colors of the albedo texture, and the alpha of a second normal map in an overlay.
     
    giving_up_unity likes this.
  30. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    148
    Thanks for this suggestion, unfortunately after reopening Unity normals are still reverted, like before.
     
  31. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    No idea. The behavior you describe is the same behavior as if the item were modified in memory, but the assets were not saved. Since it's not UMA related, I really have no clue what is going on.
     
    Alic likes this.
  32. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    148
    I probably solved it by duplicating FBX meshes and calculating normals on these. Thanks for your help, it pointed me to the right direction.
     
    Jaimi likes this.
  33. dukezack

    dukezack

    Joined:
    Mar 18, 2022
    Posts:
    1
    hello, I am working on uma but I have a problem i don't know why it comes like this. when I change the character to different its really well please chan anyone help. below is the attached result.
     

    Attached Files:

  34. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    On the dynamiccharacteravatar component, make sure rebuild skeleton is checked. This has to be enabled when you change races that have incompatible rigs.
     
  35. TyI3orG

    TyI3orG

    Joined:
    Mar 22, 2021
    Posts:
    15
    Hi, I am having an issue where my Uma is looking strange after I switch genders during runtime. When I start the game the uma looks fine but once I change gender (doesnt matter if uma starts as female or male) the opposite genders face appears like the pictures attached. I do not have any uma addons like uma lod or any of that so I'm not sure what the cause is. The UMA is being edited by setting the recipe from a recipe string but like I said that works fine on load, its just when I switch genders that I get the weird mouth. The dummy UMA I use to show current edits when using my character creator works as well, only the UMA the player uses as a body is messed up.
     

    Attached Files:

  36. Centripetal

    Centripetal

    Joined:
    May 31, 2013
    Posts:
    96
    I exported "UMA Blender Male Unified.blend" to FBX (both at 1 and 100 scale). When I try to import this into Unity and scale it to the correct scale and then try to create a slot from it, it says, "This slot size is very small. It's import scale may be incorrect." If I make it larger, it will be HUGE in Unity. If ignore this error and try to use it, the adjust bones are scaled to sticks.
     
  37. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    I've seen this one time before, but not sure what is happening. First thing to do is to make sure "Rebuild skeleton" is checked if you are going to switch races. Also make sure your quality settings are set to allow unlimited bone weights. Otherwise, not really sure what is happening.
     
  38. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    Please follow the export parameters as specified in the "UMA Content Creation" pdf. As well, make sure you have "use space transform" checked (if available) and scaling is set to "Fbx All".
     
  39. OMGTOASTER

    OMGTOASTER

    Joined:
    Nov 3, 2014
    Posts:
    24
    Hi @Jaimi

    Is there an event for when a wardrobe is loaded? Especially with addressables it does take some time before it appears.
     
  40. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    RecipeUpdated is called after the recipe is created, and after the slots are loaded from addressables. At this point, you can modify the umaData.umaRecipe, as the character has not yet been built. But everything is ready to build.


    CharacterUpdated is called after the character has completed building and is ready to display.
     
  41. Alluxu

    Alluxu

    Joined:
    Oct 20, 2020
    Posts:
    4
    Yeah well, I saw in some youtube comments, that i should use addressables, and I have had this bug ever since. Did I do it wrong?

    Do you know what is adressables?
     
  42. LootlabGames

    LootlabGames

    Joined:
    Nov 21, 2014
    Posts:
    334
    Hey Jaimi,

    Has this issue ever been fixed?
    I just updated Unity to 2021 and this error is filling up my logs.
    I use both UMA and addressables.
     
  43. anagashi_zzz

    anagashi_zzz

    Joined:
    Mar 7, 2019
    Posts:
    6
    Greeting,
    I'm new in UMA and I am trying to integrate UMA with Face Mocap.
    And I using this Plugins as my starting point.

    But seem like is not working as intended. managed to move and rotate my head around but not the face.

    If anyone got experiences or ideas on how to work with this, please do let me know.
    Much appreciated for reading this and helping me on this.
     
  44. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    There was a fix posted earlier here. Basically, have to force the shader to copy:

    Put this right before the line that is erroring in the code (in UMAGeneratorPro.cs):

    res.material.shader = umaMaterial.material.shader;

    it should look like this:

    Code (csharp):
    1.  
    2.             var res = new UMAData.GeneratedMaterial();
    3.             res.rendererAsset = renderer;
    4.             res.umaMaterial = umaMaterial;
    5.             res.material = UnityEngine.Object.Instantiate(umaMaterial.material) as Material;
    6.             res.material.name = umaMaterial.material.name;
    7. #if UNITY_WEBGL
    8.             res.material.shader = Shader.Find(res.material.shader.name);
    9. #else
    10.             res.material.shader = umaMaterial.material.shader;
    11. #endif            
    12.             res.material.CopyPropertiesFromMaterial(umaMaterial.material);
    13.             atlassedMaterials.Add(res);
    14.             generatedMaterials.Add(res);
    15.  
     
    hopeful likes this.
  45. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    How does that modify the face? If it needs blendshapes, you'll need the expression player and the Blendshape emulator (see earlier in this thread).
     
  46. LootlabGames

    LootlabGames

    Joined:
    Nov 21, 2014
    Posts:
    334
    That fixed it. Thanks!
     
    Jaimi likes this.
  47. Jeff_JungPyo

    Jeff_JungPyo

    Joined:
    Jan 20, 2022
    Posts:
    4
    Is there an effective way to fbx(or obj, gltf) export my modified UMA? (including texture and matrial information)
    When using unity's fbx exporter, the scale is different.
    For example, if you export a height of 165 cm to fbx, an avatar of 200 cm is included.

    - Is there a way to not change scale when exporting fbx?
    - Is there a way to export as obj + mtl + texture?
     
  48. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,177
    I've been able to get it to mostly work by using the prefab maker, and then converting that to an FBX. But also Unlogick's FBX exporter also worked well with UMA's, but I haven't tried it in some time.
     
  49. Jeff_JungPyo

    Jeff_JungPyo

    Joined:
    Jan 20, 2022
    Posts:
    4
    Unlogick's FBX expoter works well. Thinks!
     
    Jaimi likes this.
  50. angelf51

    angelf51

    Joined:
    Feb 2, 2022
    Posts:
    1
    hi do you have updated