Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. egherbaz

    egherbaz

    Joined:
    Sep 21, 2012
    Posts:
    34
    And another question xD: after the slot is created, can I delete from the project the mesh and the prefab that are created with the slot?
    Capture.PNG
     
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Yes, those are no longer needed. I've fixed this in the next release.
     
    hopeful likes this.
  3. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You are correct. But there are no plans at this time to save the atlas coordinates in the recipe. However, UMA is an open source project, and assistance is appreciated.
     
  4. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    The only way you can do what you are wanting is by including the small parts in the original texture. But then you lose the ability to colorize the individual pieces unless you are careful with alpha (and then it is very limiting).
     
  5. egherbaz

    egherbaz

    Joined:
    Sep 21, 2012
    Posts:
    34
    Well, I'll try to make it work by changing|adding code to UMA source, and if it works, i'll tell you what I did, if not i'll keep quiet ;)
     
    hopeful likes this.
  6. egherbaz

    egherbaz

    Joined:
    Sep 21, 2012
    Posts:
    34
    @Jaimi: This is what I did to make it work:
    on SlotDataAsset.cs(44): Added a bool var
    public bool useAtlasOverlay; (forgive me for the var name im really bad with that)

    on SlotData.cs(22): added bool var which returns what the asset have.
    public bool useAtlasOverlay => asset.useAtlasOverlay;

    and on UMADefaultMeshCombiner.cs(289):
    Code (CSharp):
    1.  
    2.                     // code below is for UVs remap based on rel pos in the atlas
    3.                     if (fragment.isRectShared && fragment.slotData.useAtlasOverlay)
    4.                     {
    5.                         var foundRect = fragment.overlayList.FirstOrDefault(szname=>fragment.slotData.slotName != null && szname.overlayName.Contains(fragment.slotData.slotName));
    6.                         if(null!=foundRect && foundRect.rect!=Rect.zero)
    7.                         {
    8.                             var size = foundRect.rect.size * generatedMaterial.resolutionScale;
    9.                             var offsetX = foundRect.rect.x * generatedMaterial.resolutionScale;
    10.                             var offsetY = foundRect.rect.y * generatedMaterial.resolutionScale;
    11.  
    12.                             atlasXMin += (offsetX / generatedMaterial.cropResolution.x);
    13.                             atlasXRange = size.x / generatedMaterial.cropResolution.x;
    14.  
    15.                             atlasYMin += (offsetY / generatedMaterial.cropResolution.y);
    16.                             atlasYRange = size.y / generatedMaterial.cropResolution.y;
    17.  
    18.                             Debug.Log($"size:{size} oX:{offsetX} oY:{offsetY} rangeX:{atlasXRange} rangeY:{atlasXRange} ");
    19.                         }
    20.                     }
    21.                     //end of added code
    22.  
    to use it:
    1.- UVs unwrap like I show in my other post on the 1st image not the 2nd.
    2.- the overlays that will cover empty spaces are added as usual: adding them as overlays childs of the base texture and giving the rect info as usual (nothing changed here)

    Capture.PNG

    3.- the slots that will use those overlays have to be added in the wardrobe that have the overlays. And the overlays must contain the name of the slot.
    like this:
    Capture1.PNG

    Of course that code works for my needs at this moment, I tested just the remapping part.
     
    Last edited: Jul 19, 2019
  7. Michael_Berna

    Michael_Berna

    Joined:
    Jul 5, 2019
    Posts:
    39
    Greetings fellow unity and UMA users. I am quite new to UMA and I've followed the instructions to get a character generated. I'm having some lighting/texture issues and was wondering if anybody else has run into the same issue.

    uma-glitch.PNG

    I'm using unity 2019.1.10f1, but it was also present in the previous unity release right before this one. I have the most recent UMA package as far as I can tell. I've also tried changing the scene lighting, but nothing seems to fix it. Strangely, if I get super close (almost seeing through the mesh close), it seems to get better. Additionally, this only affects skin so far. I haven't noticed any negative effects on clothing. Any guidance or tips would be greatly appreciated.
     
    Last edited: Jul 19, 2019
  8. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    Have you made sure your graphics drivers are up to date?
     
    Michael_Berna likes this.
  9. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    755
    Before I try a dead end.. ...is there any problems with attaching/mounting UMA DCA items to other UMA DCAs?

    Like making a "sword" race, and then using DCA to have customizable swords, then attaching that to a humanoid DCA's hand bone?
     
  10. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Trying to find the slot meshes that were used to create the default uma content. Started as trying to figure out why the meshes in the examples have higher vert/tri counts then the fbx. But now it looks to me like the slot meshes were just not included?
     
  11. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    UMA will not have a problem with that, however unity might have a problem with you placing one Humanoid inside another Humanoid, so be sure to set the animation type to none. (I hope that is still supported)
     
  12. Michael_Berna

    Michael_Berna

    Joined:
    Jul 5, 2019
    Posts:
    39
    That seems to be the issue. I transferred the project from my laptop (fake/embedded gpu) to my desktop that has a real nvidia gpu and it works like a charm, so I'm sure that some shader was incompatible with the basic graphics card. Thanks!
     
  13. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    They're in the content pack here:

    https://github.com/umasteeringgroup/content-pack
     
  14. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You might also have been low on texture memory. If you go back to your laptop, try turning down the "atlas size" and increasing the "Scale Factor" in the UMAGenerator.
     
  15. DeadSeraph

    DeadSeraph

    Joined:
    Sep 8, 2017
    Posts:
    97
    Hi again, Jaimi. Just looking into implementing umotion into a project that will likely be switching over to UMA. It appears as if the 2 should work together since the characters / skeletons UMA uses can be imported into umotion, and then animation clips can be exported from there, however the drawback here is that you can't actually see what your animation is doing until runtime. This is sort of the opposite of how umotion was intended to work (since one of the benefits it boasts is being able to animate and make adjustments to animations right in the scene view).

    Any ideas on a work around for this, or are there any plans to reach out to the umotion team in the future to better integrate the 2? I feel it would be beneficial to both as they are each extremely powerful tools for what they do.
     
  16. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    If you are using the included races, the FBX for both races ships with the software, and you can use that for editing animations. They are here:

    UMA\Content\UMA_Core\HumanFemale\FBX
    UMA\Content\UMA_Core\HumanMale\FBX

     
    hopeful likes this.
  17. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Hello! Does it work with latest unity?
     
  18. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    It works with the latest released version of Unity (2019.1).
     
    mattis89 likes this.
  19. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Anyone here have online experience with UMA? With all the characteristic sliders and appearal? And how it works when the player is instantiated and like made on the go? (in game)
     
  20. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I have no experience with the current multiplayer code. However, it's easy to serialize the character to a string, and reload from that - see "Saving and Loading from a string" in the documentation file.
     
    mattis89 likes this.
  21. Commandermartin

    Commandermartin

    Joined:
    Nov 8, 2014
    Posts:
    29
    Can anyone help me figure this warning out?

    [DynamicCharacterSystem] could not find MaleUnderwear in Resources or any AssetBundles. Do you need to rebuild your UMAResources Index or AssetBundles?

    I've tried to rebuild the global library twice now, and even manually adding the resource to it does not seem to solve the issue. While I'm experiencing the same problem with every custom wardrobe item I have tried, the error above is referring to the default MaleUnderwear (UMA > UMA_Examples > Human Male > Recipes > WardrobeRecipes). Also, this is not in a build of the scene/game. This error is popping up in the editor on play.
     
  22. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    If you look at the Global Library, do you see the recipe in the UMAWardrobeRecipe section?
    Are you using Asset Bundles? If so, are your recipes in a folder that is in an asset bundle? If so, did you build your asset bundles?
    If you right click on the recipe, and select "Add selected assets to global library" - does it do it?
     
  23. Commandermartin

    Commandermartin

    Joined:
    Nov 8, 2014
    Posts:
    29
    No, I do not see any entires in the UMAWardrobe section. I tried to add the recipe with right click, but still there are no entries. As for asset bundles, I am not.
     
  24. Commandermartin

    Commandermartin

    Joined:
    Nov 8, 2014
    Posts:
    29
    I've tried the rebuild from project button, repair and removing invalid items, and emptying the index, but the wardrobe recipes don't seem to get added for some reason.
     
  25. DeadSeraph

    DeadSeraph

    Joined:
    Sep 8, 2017
    Posts:
    97
    Hi guys. Digging into the expression editor today. I watched secret Anoraks tutorial on the subject, but it seems his approach to the expression editor is code based, and I'm not much of a programmer (I've tried downloading his completed script and applying it to my UMA and I'm not even able to add it to my UMA character prefab).

    I get the following error when trying to drag the script on to the character:



    Just wondering if there is any way to save an expression like you can save DNA values and just have them persist? I know when I alter the facial expressions with the slider values, they don't persist after I hit stop, and they aren't saved with my character if I save as a dynamic character avatar txt. Is this possible to do or is scripting the only way to control the expression editor?

    Really, all I want to do (at least for now) is just change the default expression of my UMA character.
     
    Last edited: Jul 25, 2019
  26. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I don't know what to tell you - I've tried it, and it seems to work fine. My guess is that it must think they are in asset bundles, as that is the only reason I know that they won't be added to the library. You might try creating a new folder in the root, and moving the items there.
     
  27. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You can manually add the UMAExpression script to your character, but you can't preset expressions as far as I can tell. It's pretty much meant to be script driven. The expression player is used by Salsa to lipsync. The expressions themselves appear to be used by Lipsync Pro without the expression player.
     
  28. DeadSeraph

    DeadSeraph

    Joined:
    Sep 8, 2017
    Posts:
    97
    Ok. Thanks for the info. I've managed to get Secret's script working, and it appears that I can change the default expression that way (sorry I'm terrible at this side of things). Or at least I hope I can. I don't know if UMA is still under development but it would be really handy to be able to save a default expression out with the DNA values right from the expression editor for a specific character.

    So:

    >push play
    >play around with the sliders in the expression editor so you can see your changes in real time
    >"ok I like that default expression"
    > UMA > Save As Dynamic Character Avatar > Done.
     
  29. Commandermartin

    Commandermartin

    Joined:
    Nov 8, 2014
    Posts:
    29
    I've been looking at the assets while I was waiting for you to respond and I just noticed that things like the default MalePants, MaleShirt, and pretty much all of them are listed as Text Recipes. MaleUnderwear is listed as a Wardrobe Recipe. All the items listed as Text Recipes seem to be in the Global Library, but I am still having the issue of them not loading in. Does this help on solving the issue?
     
  30. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    All Wardrobe Recipes are also Text Recipes - there's a flag on them that specifies which is which. This is a holdover from when DCS was a separate addon.

    Are you sure you are using the UMA_DCS prefab with the dynamic components? And all the libraries have "Dynamically add from global library" checked?
     
  31. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Another thing you might check - make sure your global library is not read-only or something weird like that. Some source control systems like to set that flag. The file is in your project assets at the following location:

    Assets\UMA\InternalDataStore\InGame\Resources\AssetIndexer.asset

    Also - what version of Unity are you using?
     
  32. Commandermartin

    Commandermartin

    Joined:
    Nov 8, 2014
    Posts:
    29
    I'll check the other things in the morning, but I'm using Unity 2018.3.6f1.
     
  33. kalizius22

    kalizius22

    Joined:
    Sep 23, 2018
    Posts:
    3
    Hi all,

    could anyone tell me why it wont save the color channels except channelMask[0] ?
     
  34. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Need more information on where/how it doesn't save them.
     
  35. kalizius22

    kalizius22

    Joined:
    Sep 23, 2018
    Posts:
    3
    im changing the UMARenderer "SkinnedMeshRenderer" material with script like

    Code (CSharp):
    1.         _TargetColor = this.transform.GetComponent<DynamicCharacterAvatar>();
    2.         _TargetColor.characterColors.GetColor("RGB", out _RGB);
    3. .......
    4.  
    5.        cachedMaterial[i].SetColor("_TeamColor0", _RGB.channelMask[0].linear);
    6.                     cachedMaterial[i].SetColor("_TeamColor1", _RGB.channelMask[1].linear);
    7.                     cachedMaterial[i].SetColor("_TeamColor2", _RGB.channelMask[2].linear);
    8. .....
    9.             _MaterialObject = GameObject.FindGameObjectWithTag("PlayerTag");
    10.             _AvatarString = _MaterialObject.transform.GetComponent<DynamicCharacterAvatar>().GetCurrentRecipe();
    11.  
    12. ....
    13.         _MaterialObject = GameObject.FindGameObjectWithTag("PlayerTag");
    14.              _MaterialObject.transform.GetComponent<DynamicCharacterAvatar>().LoadFromRecipeString(_AvatarString);
    this is only saving TeamColor0 the first channel only from channelMask[0].linear the others reset after i load with

    Code (CSharp):
    1.         _MaterialObject = GameObject.FindGameObjectWithTag("PlayerTag");
    2.              _MaterialObject.transform.GetComponent<DynamicCharacterAvatar>().LoadFromRecipeString(_AvatarString);
    i noticed its also saving the last _RGB.channelAdditiveMask[2].linear without problems somehow
     
  36. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Those 2 colors are the albedo and metallic/gloss channels in the standard UMAMaterials - which originally that was all that was used in the shared colors. But we'd changed those to use OverlayColorData, and I thought we were saving the entire OverlayColorData now, I'll look at it.


     
  37. kalizius22

    kalizius22

    Joined:
    Sep 23, 2018
    Posts:
    3
    got it working lol, hat to check Ensure Shared Colors -.-
     
  38. egherbaz

    egherbaz

    Joined:
    Sep 21, 2012
    Posts:
    34
    @Jaimi: will you add the code that I posted for the atlas rel pos in the UMA next release? because if not I will need to redo the code every time UMA version change :(
    I made another change to the UMA code for handling the axis orientation of bones:
    on UMAAvatarBase I added
    public bool ZAxisUp = true; (and added public bool ZAxisUp; on UMAData)

    then on the method Initialize() of UMAAvatarBase
    Code (CSharp):
    1. if (umaData == null)
    2.             {
    3.                 umaData = GetComponent<UMAData>();
    4.                 if (umaData == null)
    5.                 {
    6.                     umaData = gameObject.AddComponent<UMAData>();
    7. //Added
    8.                     umaData.ZAxisUp = ZAxisUp;
    9. // end added
    10.                     if (umaGenerator != null && !umaGenerator.gameObject.activeInHierarchy)
    11.                     {
    12.                         if (Debug.isDebugBuild)
    13.                         {
    14.                             Debug.LogError("Invalid UMA Generator on Avatar.", gameObject);
    15.                             Debug.LogError("UMA generators must be active scene objects!", umaGenerator.gameObject);
    16.                         }
    17.                         umaGenerator = null;
    18.                     }
    19.                 }
    20.             }
    and on UMADefaultMeshCombiner,GeometrySelector and UmaBoneBuilderWindow I replaced the lines where you adjust the localrotation of Root and Global for this:
    Code (CSharp):
    1. //eliana
    2. newRoot.transform.localRotation = umaData.ZAxisUp ? Quaternion.Euler(270f, 0, 0f) : Quaternion.Euler(0f, 0f, 0f);
    3. newGlobal.transform.localRotation = umaData.ZAxisUp ? Quaternion.Euler(90f, 90f, 0f) : Quaternion.Euler(0f, 0f, 0f);
    4.                    
    with this change, animations will work for Y-Up axis orientation bones w/o the need of rotating Root -90 on X, so we that use Maya will be happy :p
     
    Last edited: Jul 26, 2019
  39. DeadSeraph

    DeadSeraph

    Joined:
    Sep 8, 2017
    Posts:
    97
    I'm just looking at the o3n male and female models in UMA right now and I noticed that the facial hair and eyebrows aren't appearing on the character properly (They show up on the neck and underside of the chin). I don't think the author is still supporting this asset, so I'm wondering if anyone else has run into this or can't point me in the direction of a fix for it?


     
  40. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I can - but honestly, it would be much easier if you submitted a pull request here to the develop branch:

    https://github.com/umasteeringgroup/UMA

     
  41. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    This will happen if you (or someone) have resized the textures. Overlays that go over existing textures have a rectangle defined on them that specify the location in the base texture. This has to be corrected in both the overlay and in the recipes.

     
  42. DeadSeraph

    DeadSeraph

    Joined:
    Sep 8, 2017
    Posts:
    97
    I haven't touched any of the textures for either UMA or o3n. I have made a custom overlay for the UMA male but I did so by duplicating the assets and renaming them and working from there (not by changing any of the existing files).
     
  43. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Nonetheless, the problem you are seeing is due to a mismatch in the coordinates of the eyebrow overlays and the face overlay. You need to adjust the position in the overlay and the recipe.
     
  44. Commandermartin

    Commandermartin

    Joined:
    Nov 8, 2014
    Posts:
    29
    Im using Unity 2018.3.6f1. For the UMA scene components, I am using the UMA_DCS the various dynamic components. For the AssetIndexer, however, I only have a prefab of that name. Does that do the same job?
     
  45. DeadSeraph

    DeadSeraph

    Joined:
    Sep 8, 2017
    Posts:
    97
    They appear to be identical?


    Also, it seems unlikely that this would have been somehow changed for every single set of eyebrows for both the male and the female, as well as every set of facial hair.
     
    Last edited: Jul 26, 2019
  46. Commandermartin

    Commandermartin

    Joined:
    Nov 8, 2014
    Posts:
    29
    I managed to fix the issue. I just decided to redownload UMA and replace the folder that I had. Apparently, there was something wrong with the version of UMA that I had as its now working as it should. Thanks for your help Jaimi.
     
  47. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Yes - they both must be fixed. So the eyebrows fit over the face texture correctly.

    Look at the face texture. Make sure that rectangle fits so that when the eyebrows are drawn it goes in the right spot.

    Usually this is caused by somebody changing the import parameters on the textures - so if the overlay was expecting the base face texture to be 2048x2048, but the texture is forced to import at 1024x1024, or 2048x1024, you might see this sort of issue.

     
  48. DeadSeraph

    DeadSeraph

    Joined:
    Sep 8, 2017
    Posts:
    97
    And how would I go about determining the proper position then? It seems unlikely to me that every set of eyebrows for both the male and female as well as the facial hair would be improperly set for a popular asset like this that's been there for months? Also, best I can tell I seem to be the only person running into this problem.

    Would I have to set the rect to 0 on all axis? I don't see an overlay for the face (but I do see one for the head). Is there no way to determine this value visually? and if not, how do I determine what the proper value should be?

    I apologize for my ignorance in advance.

    *Edit to add:

    For reference, this is the asset: https://assetstore.unity.com/packages/3d/characters/humanoids/o3n-male-and-female-uma-races-102187
     
    Last edited: Jul 26, 2019
  49. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    755
    I bet anything it is the evil names.
    Your wardrobe recipes have a file name, which is displayed in the project view window, and an evil name, which is displayed in the inspector window.

    if you have two wardrobe recipes with the same evil names, it will not add the evil name duplicate to the global lbrary. Same with overlays. So it is a best practice to always make sure your file name and evil name match.
     
    hopeful likes this.
  50. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    755
    if you do notnhave all the correct textures for the material, it will not render. You are missing four textures.
     
    hopeful likes this.