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:
    8
    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!
     
  2. doarp

    doarp

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

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    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.
  4. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    doarp likes this.
  5. ikermozos

    ikermozos

    Joined:
    Dec 5, 2019
    Posts:
    8
    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.
  6. Harekelas

    Harekelas

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

    DankP3

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

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    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.
     
  9. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    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
  10. arteria

    arteria

    Joined:
    May 31, 2007
    Posts:
    2,189
    Jaimi likes this.
  11. 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.
     
  12. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    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
     
  13. sichus

    sichus

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

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    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?

     
  15. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    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.
  16. Jaimi

    Jaimi

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

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    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?
     
  18. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    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.
     
  19. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    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
  20. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    704
    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
     
  21. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    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?

     
  22. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    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.
  23. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    Yes, use the blendshape baking feature.
     
  24. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    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?
     
  25. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    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?
     
  26. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    704
    Yes, it works in normal mode.
     
  27. 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 ?
     
  28. DankP3

    DankP3

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

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    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.
  30. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    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
  31. kraaazy

    kraaazy

    Joined:
    Dec 31, 2015
    Posts:
    20
  32. 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
     
  33. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    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).
     
  34. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    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?
     
  35. DankP3

    DankP3

    Joined:
    Jul 17, 2017
    Posts:
    93
    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.
     
  36. 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.
     
  37. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    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.
  38. 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.
     
  39. DankP3

    DankP3

    Joined:
    Jul 17, 2017
    Posts:
    93
    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.
     
  40. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    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?
     
  41. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I will contact you via IM with my rates.
     
  42. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    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
     
  43. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    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
  44. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684


    :D
     
    Jaimi likes this.
  45. LootlabGames

    LootlabGames

    Joined:
    Nov 21, 2014
    Posts:
    343
    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
     
  46. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    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.

     
  47. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    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).

     
  48. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    I'll un-atlas the skin textures then
     
  49. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Finally got this right, need to set the Global and Position bones to be facing upwards, I used to set them facing forward following the Daz to Uma tutorials. Now it's all fixed, thanks!
     
    hopeful and Jaimi like this.
  50. sichus

    sichus

    Joined:
    Oct 13, 2017
    Posts:
    3

    Now without touching anything I have another message in the consle, this time different.

    SkinnedMeshRenderer: Trying to set a mesh ("") that is unfit for use with SkinnedMeshRenderer. Most likely it doesn't have Skin information and/or is only assigned to the renderer during runtime, in which case Unity isn't aware of its use with SkinnedMeshRenderer. Mark the mesh as Readable or assign it to the renderer in the Editor before building.
    UnityEngine.SkinnedMeshRenderer:set_sharedMesh(Mesh)
    UMA.UMADefaultMeshCombiner:MakeRenderer(Int32, Transform, UMARendererAsset) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMADefaultMeshCombiner.cs:130)
    UMA.UMADefaultMeshCombiner:EnsureUMADataSetup(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMADefaultMeshCombiner.cs:104)
    UMA.UMADefaultMeshCombiner:UpdateUMAMesh(Boolean, UMAData, Int32) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMADefaultMeshCombiner.cs:157)
    UMA.UMAGeneratorBuiltin:UpdateUMAMesh(Boolean) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:321)
    UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:252)
    UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:291)
    UMA.UMAGeneratorBuiltin:Work() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:148)
    UMA.UMAGeneratorBuiltin:Update() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:101)