Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. ikermozos

    ikermozos

    Joined:
    Dec 5, 2019
    Posts:
    4
    *** UPDATE ***

    It does look like updating a mesh with no shapes to a mesh with shapes dragging it to the SkinnedMeshRenderers rectangle in an existing slot could be the cause of this issue. By creating a new slot using a garment with shapes everything seems to work.
     
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,955
    I'll add a note to check for that, thanks.
     
  3. ikermozos

    ikermozos

    Joined:
    Dec 5, 2019
    Posts:
    4
    Hey, Jaimi,

    Thanks for your quick answer. Sadly, it seems it does not work in all cases, and the vertex data is getting corrupted on this newly-generated slot too. I'll be looking into it. I'll write it here if I find anything new.

    Thanks again!
     
  4. doarp

    doarp

    Joined:
    Sep 24, 2019
    Posts:
    127
    Why is it deprecated on the asset store?
    Sorry in advance, I did t read through the 190 pages of the thread.
     
  5. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,955
    Make sure you have turned off "GPU skinning" in the player settings. This seems to break every other release or so in Unity.
     
    hopeful likes this.
  6. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,955
    doarp likes this.
  7. ikermozos

    ikermozos

    Joined:
    Dec 5, 2019
    Posts:
    4
    This solved the issue indeed! I read in other messages it caused problems in Unity 2018, but also read it was solved. Thanks a lot for looking into this, and for pointing out the exact place to turn this option off!
     
    hopeful likes this.
  8. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    Ok, regenerated all the slots, now the issue is solved! Thank you very much!
     
    hopeful likes this.
  9. DankP3

    DankP3

    Joined:
    Jul 17, 2017
    Posts:
    79
    @ikermozos, what version of unity are you using. Allegedly this is fixed in 2019.2, but I havent checked yet?
     
  10. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    I've met a strange issue with clothing:
    upload_2019-12-15_17-18-15.png
    Left is the raw mesh, the brief and the character are separatedly imported into unity but they both skinned to the same skeleton. And used the same humanoid avatar in the rig import settings. They can follow animations corretly with the character with raw meshes but UMA generated mesh made the brief clipped into the character.
    upload_2019-12-15_17-23-28.png
    And if you look at the generated brief mesh, it's like they got tilted a bit from the corret rotation.

    upload_2019-12-15_17-26-29.png
    And there is another issue: the generated texture atlas also got some color bias than the original texture.

    The texture was corretly generated when there are four 4096 textures combined into one 4096 texture, but the underwear slot hid the character's genital slot so there remained three skin textures to be combined into the atlas. And the color got wrong in this case.
     
  11. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    upload_2019-12-15_17-29-55.png
    Three textures combined, left part of the texture got darker and the right part of the texture got brighter.
    upload_2019-12-15_17-31-14.png
    When there are four textures combined together, the color is correct on the model:
    upload_2019-12-15_17-45-15.png

    And I found that all textures used on UMA generated character are one-fourth sized than the original texture, can I set them to be the same size?
     
    Last edited: Dec 15, 2019
  12. arteria

    arteria

    Joined:
    May 31, 2007
    Posts:
    2,094
    Jaimi likes this.
  13. sichus

    sichus

    Joined:
    Oct 13, 2017
    Posts:
    3
    hi, i just discover UMA, and have a basic problem when i start. I see the grey body shape of the avatar but when I am on player mode he does not appear. My camera is well watching at him and I got the 2018.4 version of Unity.
    Here is the message that I got when I press play:

    NullReferenceException: Object reference not set to an instance of an object
    UMA.CharacterSystem.DynamicCharacterAvatar+<BuildFromComponentSettingsCO>d__84.MoveNext () (at Assets/UMA/Core/Extensions/DynamicCharacterSystem/Scripts/DynamicCharacterAvatar.cs:535)
    UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
    UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    UMA.CharacterSystem.DynamicCharacterAvatar:Start() (at Assets/UMA/Core/Extensions/DynamicCharacterSystem/Scripts/DynamicCharacterAvatar.cs:385)

    Sorry if the question was already asked and thank you for your help.
     
  14. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    Have you put the UMA_DCS prefab into the scene? It seems you don't have an instance of DynamicAssetLoader and the DCS prefab will provide this class:
    upload_2019-12-15_21-15-14.png
    You'll find this prefab in the GettingStarted folder under UMA folder upload_2019-12-15_21-16-3.png
     
  15. sichus

    sichus

    Joined:
    Oct 13, 2017
    Posts:
    3
    I have it on the scene yes
     
  16. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,955
    Are you sure your quality settings have the bone weights set to 4, and that you haven't weighted the vertexes to more than 4 bones? And that you "applied" all of the transforms before exporting from your Modeller?

     
  17. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,955
    The UMAGenerator has an "Initial Scale Factor" that is set to 2 by default. If you do not want your textures scaled by default, you should set this to 1.

     
    hopeful likes this.
  18. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,955
    It can't find the DynamicAssetLoader in the scene. It's usually a child of the UMA_DCS object.
     
  19. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    I used exported Daz clothes to blender with a new skeleton. That may be the cause of this rotation offset, I reimported the brief into the origin character's blender file, and transfered the clothes mesh to the character's rig then reimported it into unity again, and it fits the character correctly.
    But I also ran into another issue: When I add certain combination of clothes on the UMA model, this error occurs when building the mesh:
    upload_2019-12-16_11-8-50.png

    And the character looks like this:
    upload_2019-12-16_11-9-15.png

    Adding the bikini top or bottom separately does not have this issue, and combine the bikini parts with other clothes also does not have this issue (for example, a bikini bottom with a t-shirt on top). Any ideas what may caused this?
     
  20. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,955
    Your bikini is high poly count, so this overruns the 64k index limit.

    Your options are: 1. Reduce polycount as much as possible while mainting visual quality and deformation. (always a good idea).
    2. Make the bikini parts use "no atlas" materials. (it's a setting on the material). This causes more draw calls of course.

    Generally, You'd want your cloth and skin to use different materials so the skin is displayed at maximum quality also (and use sub-surface scattering). This would require additional work and textures.
     
  21. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    Thanks for the suggestion, I'll definitely reduce the clothes polycount when using them into my game.

    And any ideas about the color bias on generated textures? It seems when the final texture has empty (black) areas, the color on the mesh will shift. I can only use non-atlas materials for the skin right now, for when there are less or more than 4 textures combined together, the body parts of the character will shift.

    And I found that when there are around 100 blendshapes in the mesh, it'll take quite some time to regenerate the mesh with them every time I change some clothes on the character. Is there any optimization options to this apart from largely reducing the blendshapes count?
     
    Last edited: Dec 16, 2019
  22. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    618
    Hi, Jaimi,
    2019.3 release is around the corner and I tested the "Fast Enter-to-Play-Mode" and this is what I get.
    I would appreciate for your help.
    Thanks.
    upload_2019-12-17_4-21-17.png
     
  23. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,955
    My first guess on this would be that the texture references were lost in the overlays. Is it working if you don't use the fast enter mode?

     
  24. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,955
    I've just recently seen this, and it had to do with there being an embedded alpha channel on some of the albedo textures. If you don't want it to use the embedded alpha (which would look bad for the first layer), you can supply your own alpha mask texture on the overlay (with a full alpha channel, 1,1,1,1)
     
    Harekelas likes this.
  25. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    340
    Yes, use the blendshape baking feature.
     
  26. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    Thank you for this info! I'll remove all alpha channel in albedo. I'm using the preIntegrated skin shader for my race's skin. And the glossness is a separated texture. Should be very easy to edit the textures, but I'm not quite sure what you mean about the layers, are they shader layers or texture channels? And how do I supply a full alpha channel for the textures?
     
  27. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    Thanks for the info. But I don't get any results searching on UMA wiki with blendshape baking. How do I bake them? What's the standard workflow?
     
  28. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    618
    Yes, it works in normal mode.
     
  29. hilmiaraz

    hilmiaraz

    Joined:
    Nov 28, 2018
    Posts:
    2
    Hello everyone,
    I hope i did not repeat a question.
    My issue is when I import UMA 2 from assetstore and run the gameobject(with Dynamic Character Avatar/HumanMaleDCS) generated human is only pink. How can i fix it ?
     
  30. DankP3

    DankP3

    Joined:
    Jul 17, 2017
    Posts:
    79
    You are using scriptable render pipelines? In which case you will need to setup the materials.
     
  31. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    340
    You can see an example in the Blendshape demo scene.

    Basically, you just submit a call to;
    Code (csharp):
    1.  
    2.         /// <summary>
    3.         /// Adds a named blendshape to be combined or baked to the UMA.
    4.         /// </summary>
    5.         /// <param name="name">string name of the blendshape.</param>
    6.         /// <param name="bake">bool whether to bake the blendshape or not.</param>
    7.         /// <param name="rebuild">Set to true to rebuild the UMA after after baking.  Use false to control when to rebuild to submit other changes.</param>
    8.         public void SetBlendShapeData(string name, bool bake, bool rebuild = false)
    9.  
    then during rebuilding, blendshapes set to baked = true, will use the baking code path instead of the regular blendshape codepath.
     
    Harekelas likes this.
  32. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    So I actually don't need to check the import blendshapes on the dynamic character, just set them when I need to change values on them and rebuild the mesh, right? And by this way, does it mean I don't need to set up blendshape DNAs but build my own UI system to directy change blendshape data when anything is changed?

    Edit: I checked the blendshape example scene. Is it that I only load all blend shapes in character creating interface and record down the value of each morph the player has changed. Then bake all blendshapes into the model since they'll not be able to change the character's face in runtime, so it can save a lot rebuild time when clothes are changed etc?
     
    Last edited: Dec 18, 2019
  33. krehzzzy

    krehzzzy

    Joined:
    Dec 31, 2015
    Posts:
    9
  34. hilmiaraz

    hilmiaraz

    Joined:
    Nov 28, 2018
    Posts:
    2
    Yes I use HDRP. If you asked that? But I don't know how can I turn gameobject(DynamicCharacterAvatar/HumanMaleDCS) to its original colors other than pure pink
     
  35. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    340
    The "Load Blendshapes" checkbox on the dynamic character avatar? You will still need that. That's turns on using the blendshape feature for UMA, either normal blendshapes or the baking.

    You'll still need the dna too. It uses the dna value to know which value of the blendshape to bake.

    You don't need to record anything. When the baking occurs it'll use the current value of the dna for the blendshape and bake with that value. Baking is best used with blendshapes that won't be changing anymore during the course of the game (though they can still change by either unbaking them or rebaking them at a new value).
     
  36. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    If I don't use UMA's save/load system, but my own system to save the player's face morph data, and all that data comes from blendshapes. Do I still need DNAs? If I don't use the dna to morph the character, how do I use the baking feature?
     
  37. DankP3

    DankP3

    Joined:
    Jul 17, 2017
    Posts:
    79
    You will need to setup the materials to use HDRP shaders and use these on the slots. Somewhere in this forum is a link to a git of, I think, kenamis who has done this already so you can just import.
     
  38. dvnelson72

    dvnelson72

    Joined:
    Oct 22, 2017
    Posts:
    2
    I have a question about how I import an UNrigged FBX so I can create wardrobe. I've watched Secret Anoark's channel, and it is pretty straight forward when grabbing elements from a rigged entity.

    But, let's say I have a hat model. I go through the same process, but it is not associated with the bones, so it isn't available as a skinned mesh in unity. If I do it again, but parent the hat to the head bone, along with creating an armatur modifier, I have the same problem.

    Do I need to create a rigged body separately with the hat attached, then go through secret anoark's process?

    I think this should be a pretty simple task.
     
  39. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,955
    The hat has to deform to the head, so if you are using any of the example or commercial UMA races, it will need to be rigged, and a slot made.

    Now, you could get an 80% solution, by position ing the hat, scaling it to fit, and making it a child of the headadjust bone. But, it won't be a wardrobe item, so you would have to special case the code everywhere, and it will add extra drawcalls.

    It's much simpler to rig it in Blender and make a slot. Once you learn this, the process generally takes about 5 minutes.

     
    hopeful likes this.
  40. dvnelson72

    dvnelson72

    Joined:
    Oct 22, 2017
    Posts:
    2

    :) any chance you want to do some freelance work? It would probably be more efficient from a time/$ perspective than learning the process.

    I licensed three items that need to be rigged, slots created with wardrobe recipes. I have FBX and other formats for a helmet, elbow pads, and gloves. The elbow pads need to deform with the elbow bend. The gloves with the fingers. etc.
     
  41. DankP3

    DankP3

    Joined:
    Jul 17, 2017
    Posts:
    79
    Did you see the UMA 201 part 4 video, pretty sure that's the one thay shows you how to transfer bone weights from your UMA to your clothes and associate to an armature in blender. Making slots in unity is then pretty simple.
     
  42. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    Got another issue: why would the bounding box of the skinned mesh renderer is rotated 90 degrees in front of the actual mesh? This will make the character be culled when the camera focusing on her face.
    upload_2019-12-20_1-34-15.png

    Anything I got wrong?
     
  43. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,955
    I will contact you via IM with my rates.
     
  44. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,955
    Typically this will happen to the model itself, due to not having the global/position hierarchy setup correctly. Take a look at the example races in the content pack to see what the system likes best:

    https://github.com/umasteeringgroup/content-pack
     
  45. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    I tried to deleted all alpha channels in the albedo textures, but the combined texture still shifted color:
    upload_2019-12-20_1-50-17.png
    upload_2019-12-20_1-50-53.png

    I think this has to do with the black part of the texture, and maybe it's the shader that I use for the skin cannot use textures with pure black parts in it.
    I tried to use the standard specular shader for the combined textures, the color does not shift.

    I'm using pre-integrated skin shader for the skin BTW

    Edit: Just checked the UMA default character in blender. I'm pretty sure I've set my character the same settings:
    upload_2019-12-20_2-1-26.png
    No rotation or scale. And the output settings are all the same as Arnorak taught in his videos.
    But when my character got generated, I noticed that there is one frame the character is rotated 90 degrees falling on the ground, then the next frame he/she got snaped to the bones and stand.
     
    Last edited: Dec 19, 2019
  46. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,009


    :D
     
    Jaimi likes this.
  47. katasteel

    katasteel

    Joined:
    Nov 21, 2014
    Posts:
    189
    Any idea why this would happen?
    upload_2019-12-19_15-28-45.png
    The mesh looks fine.
    upload_2019-12-19_15-29-17.png
     
  48. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,955
    It really looks like your export parameters are wrong, or your mesh doesn't have all the rotations applied.

    If you fit your mesh to the UMA, make sure you have used the Blender 2.8 specific blends and fit to those models (they are rotated differently). As well, the Blender 2.8 settings are different because it uses a different exporter. Be sure to use the Blender 2.8 settings as specified in the "Content Creation" pdf in the UMA folder.

     
  49. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,955
    Since the colors don't shift when using the standard shader, I can only imagine that there is some difference - like it loads some values out of the alpha channel that has been stripped out. We have had some luck using the "FFS" ("Fast fake skin") shader, and the LUX LWRP shaders for skin (The lux shader requires modification to put one of the channels in a different texture).

     
  50. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    778
    I'll un-atlas the skin textures then
     
unityunity