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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    141
    Is it possible that the scene "DynamicDNAConverterControllerDemo" is defective? I only have a version with a fresh UMA installation.

    When I click on the "Change Race" button, I get the following error:

    NullReferenceException: Object reference not set to an instance of an object.
    UMA.CharacterSystem.Examples.TestCustomizerDD.SetUpRacesDropdown (System.String selected) (at Assets/UMA/Examples/DynamicCharacterSystem Examples/Scripts/Scene2and3/TestCustomizerDD.cs:221)

    EDIT: Self problem by Scene: UMA DCS Tool - DNAConverterBehaviour Customizer

    EDIT 2:

    Problem solved. For all those who have the same problems.

    Menu "UMA" -> Dropdown "Global Library".

    In the Library, click on "Rebuild From Project" in the "File" menu.
     
    Last edited: Jun 16, 2021
    TapCrush and hopeful like this.
  2. leapp

    leapp

    Joined:
    Mar 19, 2015
    Posts:
    19
    we use UMA 2.9 in Unity 2019.4.9f1, everything is fine,
    but we upgrate Unity to 2019.4.28f, there is a error: d3d11: buffer size can not be zero
    upload_2021-6-17_10-16-29.png
    can't see uma player in game or scene view.
     

    Attached Files:

  3. leapp

    leapp

    Joined:
    Mar 19, 2015
    Posts:
    19
    sorrry, we use UMA 2.8 actually.
     
  4. sebijun

    sebijun

    Joined:
    Jun 1, 2021
    Posts:
    3
    Hello, I made a little avatar creator using UMA and I have a few questions!

    Now I wonder how I can export a created avatar to use him in any other project e.g. as the players model?
    Or better: How can I use my implemented avatar creator in an other project like an existing RPG game (a friend made one in Unity) to create the players model before playing?

    I have not yet set up a working clean UMA version, when I follow the instructions the UMA documentation provides I´m missing the UI and scripts I made. So I´m guessing the clean UMA project is just the base to start implementing my avatar creator, right?

    Kind regards sebjiun
     
    Last edited: Jun 17, 2021
  5. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Can you post the callstack?
     
  6. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Simplest thing is for the app to have UMA and all the slots/textures/etc installed. And then just save an "AvatarDefinition" and his app can load that.

    If you don't want to have UMA installed, You can generate a prefab from the created player using the "Prefab maker", and import that and all it's dependencies (Don't turn on runtime DNA in the settings, that needs UMA installed). If it needs to be done at runtime, you would need to build some sort of asset bundle based solution.
     
  7. sebijun

    sebijun

    Joined:
    Jun 1, 2021
    Posts:
    3
    Thank you for the fast reply!
    The Prefab maker solution sounds good, is there a way I can access the Prefab maker via code? For example when the Avatar Creator App is running and I'm finished creating an avatar, then I can press a "Create Avatar Prefab" Button in the UI which creates and saves a Prefab of the avatar automatically into a specific folder?

    With "AvatarDefinition" you mean saving the avatar into a txt or asset file, right ?
     
  8. leapp

    leapp

    Joined:
    Mar 19, 2015
    Posts:
    19
    d3d11: failed to create buffer (target 0x1 mode 3 size 0) [0x80070057]
    d3d11: buffer size can not be zero
    UnityEngine.StackTraceUtility:ExtractStackTrace ()
    UnityEditor.EditorGUIUtility:RenderPlayModeViewCamerasInternal (UnityEngine.RenderTexture,int,UnityEngine.Vector2,bool,bool)
    UnityEditor.PlayModeView:RenderView (UnityEngine.Vector2,bool)
    UnityEditor.GameView:OnGUI ()
    System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
    System.Reflection.MethodBase:Invoke (object,object[])
    UnityEditor.HostView:Invoke (string,object)
    UnityEditor.HostView:Invoke (string)
    UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect,UnityEngine.Rect)
    UnityEditor.DockArea:DrawView (UnityEngine.Rect,UnityEngine.Rect)
    UnityEditor.DockArea:OldOnGUI ()
    UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
    UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
    UnityEngine.UIElements.IMGUIContainer:DoIMGUIRepaint ()
    UnityEngine.UIElements.UIR.RenderChainCommand:ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams,bool,single,System.Exception&)
    UnityEngine.UIElements.UIR.UIRenderDevice:EvaluateChain (UnityEngine.UIElements.UIR.RenderChainCommand,UnityEngine.Rect,UnityEngine.Matrix4x4,UnityEngine.UIElements.PanelClearFlags,UnityEngine.Texture,UnityEngine.Texture,UnityEngine.Texture,single,Unity.Collections.NativeArray`1<UnityEngine.UIElements.UIR.Transform3x4>,Unity.Collections.NativeArray`1<UnityEngine.Vector4>,System.Exception&)
    UnityEngine.UIElements.UIR.UIRenderDevice:DrawChain (UnityEngine.UIElements.UIR.RenderChainCommand,UnityEngine.Rect,UnityEngine.Matrix4x4,UnityEngine.UIElements.PanelClearFlags,UnityEngine.Texture,UnityEngine.Texture,UnityEngine.Texture,single,Unity.Collections.NativeArray`1<UnityEngine.UIElements.UIR.Transform3x4>,Unity.Collections.NativeArray`1<UnityEngine.Vector4>,System.Exception&)
    UnityEngine.UIElements.UIR.RenderChain:Render (UnityEngine.Rect,UnityEngine.Matrix4x4,UnityEngine.UIElements.PanelClearFlags)
    UnityEngine.UIElements.UIRRepaintUpdater:DrawChain (UnityEngine.Rect,UnityEngine.Matrix4x4)
    UnityEngine.UIElements.UIRRepaintUpdater:Update ()
    UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase)
    UnityEngine.UIElements.Panel:UpdateForRepaint ()
    UnityEngine.UIElements.Panel:Repaint (UnityEngine.Event)
    UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
    UnityEngine.UIElements.UIElementsUtility:processEvent (int,intptr)
    UnityEngine.GUIUtility:processEvent (int,intptr)
     
  9. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Nothing really stands out to me. I don't see this in the current UMA, so it's either something in your models, or some coding issue that has since been fixed.

    The only thing I can suggest is "Try the latest UMA version".

    Jaimi

     
  10. customphase

    customphase

    Joined:
    Aug 19, 2012
    Posts:
    243
    @Jaimi Can i get a reply regarding this please? It prevents me from working cause it keeps messing up prefabs.
     
  11. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
  12. customphase

    customphase

    Joined:
    Aug 19, 2012
    Posts:
    243
    I did add it. It doesnt unpack prefabs anymore, but it just keeps adding colliders/joints/rigidbodies/twist scripts/UMADatas to the prefab and occasionally it gives the error (that ive attached screenshot of) and then stops working at all. I explained that in the message body.
     
    Last edited: Jun 19, 2021
  13. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    141
    Hi!

    One question, is it actually still necessary to change the bone structure to Root|Global|Position?

    My problem is that I have a purchased model and can change the bone structure, but then the animations no longer work.
     
  14. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Well, I can see why the UMAData is being generated. At the top of the Start function in the DynamicCharacterAvatar, add this bit of code:
    Code (csharp):
    1.  
    2.             if (!Application.isPlaying)
    3.             {
    4.                 if (!editorTimeGeneration)
    5.                     return;
    6.             }
    7.  
    But as to why your prefab is being modified with all those other items by Unity, I have no idea - I am unable to duplicate it. It seems like some sort of Unity bug.
     
    customphase likes this.
  15. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    It is still required, though we are working on adding support for alternate bone setups.
     
    Kojote and hopeful like this.
  16. customphase

    customphase

    Joined:
    Aug 19, 2012
    Posts:
    243
    Thanks! I added this fix and after testing a few times it didnt happen any more. I suspect that UMAData being added is the reason why it happened. Anyway, I'll test more and report later.
     
  17. sebijun

    sebijun

    Joined:
    Jun 1, 2021
    Posts:
    3
    Hallo may I ask again.

    Is there a way I can access the Prefab Maker via code, is there an API? I would like to make a "Create Prefab" Button and when it gets pressed a prefab will be generated automatically?

    Thank you in advance and kind regards
    sebijun
     
  18. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    UMAAvatarLoadSaveMenuItems.ConvertToNonUMA(baseObject.gameObject, baseObject, folder, UnswizzleNormalMaps, CharacterName,AddStandaloneDNA);


    Take a look at the UmaPrefabSaverWindow in UMAAvatarLoadSaveMenuItem.cs for an example how to use this. This only works in the editor.
     
  19. Nosfera

    Nosfera

    Joined:
    Sep 26, 2014
    Posts:
    12
    Hello, I am finally learning UMA features and implementing them in a personal project.
    I would like to know if it is possible to a DNA skeleton also deform wardrobe recipes, for example, a Male Character with a simple fit T-Shirt that has bones on his chest, so I can scale those bones to push women breast out as I change the character gender, maintaining the same model/texture/wardrobe recipe of the initial the T-Shirt
    How can I achieve that?

    Thank you very much!
     
  20. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
    Hi the short answer to whether it is possible is "yes". But with a very big "but". So brace yourself :)

    Here goes;

    First of all, UMA is a framework that you can use with its base models (the term is "race" for every separate avatar created from a different 3D model) or other custom races available. The more advanced way is to go with your own custom race, where you have/create your own 3d model and make it a UMA avatar.

    The base models in the UMA have a male race and a female race. This is true for any other UMA race available that I know of (doesn't mean it has to be, but there is a reason to it). This implies the male and female are separate 3d models so you most likely have to create separate content for them. (So separate races don't morph to one another. Your case is not possible with separate male/female races)

    So to achieve what you say, you would have to create a 3D model that can morph from one gender to the other. You may do this with bone transformations (position, rotation, scale for each bone) with a proper bone structure (armature) that has lots of additional "adjustment bones". (But this is very hard, if not impossible, to create something that goes from male to female with just bones. That is probably why there is not a uni gender race available.)

    The second way is to use blendshapes (UMA supports them too). So your 3D model has the blendshape to go from male to female (maybe other morphs too like fat, muscle etc.). This is arguably more 3d modelling work to create the blendshapes.

    There are ups and downs of each approach:
    1. With just bone morphs the good thing is you rig your model once, and any content you create for it is ready to morph with it as soon as you rig the clothing to the same armature (skeleton). The downside is it is harder to create a morph with just bones as realistic as a blendshape would be. The second downside is, in Unity (and probably any other game) when you morphed with bones vertex normals stay as they are. For example, if you make the belly fat it still looks as if it is flat from front (There are workarounds for this but very tedious work to create the setup. Check Jane & John Race for an example. Jane & John is bones only, no blendshapes races. And as a disclaimer, I am the creator of them :) ).

    2. With the blendshapes you are able to create more detailed morphs. And you don't have the vertex normal issue because blendshape data has the normal change information with it. Of course, it has its own downsides. Every blendshape the 3d model has means you'll have a version of the same (whole) mesh at runtime, so having 50 blendshapes will have 50 times that mesh in memory at runtime (at least that is what I heard and read. I don't have much experience using the blendshapes). The second thing is, blendshapes would be required on every content such as clothing you create. So you'll have to create/transfer (with some 3d modelling tool) every blendshape on the body to every piece of clothing before making an UMA item.

    I am sorry if it is too detailed or too complicated, but there is no simple answer to what you are asking.

    To recap:
    1. There is no "out of the box" ready race that does what you're asking.
    2. It is theoretically possible to create a custom race that does it. But it is a lot of very technical work that requires 3d modelling skills.
    3. There are multiple ways to create the custom race, just bone morphs or blendshapes (or hybrid) is a design decision that you would have to make. Both having its ups and downs.
     
    hopeful likes this.
  21. doukisan

    doukisan

    Joined:
    Nov 26, 2015
    Posts:
    15
    Hi! Is it possible to remove an item from the Skinned Mesh Combiner? I'd like a slot to stay separate to use a shader effect in it, exclusivelly.
    As far as I know I can only do that if I have a separate skinned mesh renderer to add a new material to it... Is that the right concept?

    Thank you!
     
  22. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
    Yes you can create a renderer asset from the UMA menu and assign it to the slot you want. That will make it a separate mesh at runtime.
     
  23. doukisan

    doukisan

    Joined:
    Nov 26, 2015
    Posts:
    15
    Thank you! I think that will do!

    But in case I need to do it dynamically, would it be possible to set it by code? Like when equipping a boot slot, I'd only need to make it separate if I wanted to apply the effect to the boot, otherwise I'd want it to be merged
     
    Last edited: Jun 27, 2021
  24. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
    I am not sure if that is possible.
     
  25. Nosfera

    Nosfera

    Joined:
    Sep 26, 2014
    Posts:
    12

    Thank you for your time and your answer, dude!
    I've already created a base race with a bone structure and DNA sliders that morph very well into both genders. I may not have explained well that what I couldn't achieve was those morph to be applied into wardrobes, like chest or pants.
     
  26. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
    If you have skinned the wardrobe items to the same armature, and if you have blendshapes applied to the wardrobe items the same way then it should work. What's not working for you exactly?
     
  27. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    This would be pretty complicated. You are best to just set the UMAMaterial to "No atlas", and then find and adjust the material at runtime.
     
  28. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    I think the proper answer here is that when you want the boot to change, regenerate the character with the new boot. Regenerating is fast.
     
  29. arteria

    arteria

    Joined:
    May 31, 2007
    Posts:
    2,190


    Sunday GiveAway

    Since UMA's conception, this forum and developers have always been very supportive of Arteria3d UMA Costumes and helped shape their development.
    From time to time we offer giveaways in appreciation, and today is one of those days again

    Users can select one 'single' UMA Costume from the Arteria3d UMA Collection for Free.
    Simply visit the link below, choose your costume, then email orders@arteria3d.co.uk with your selection, of which you will receive a link free of charge


    Arteria3d UMA Costumes - Visit the link below
    https://arteria3d.myshopify.com/collections/uma
     
    Alic and Jaimi like this.
  30. overbuilt

    overbuilt

    Joined:
    Jan 3, 2014
    Posts:
    14
  31. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
  32. overbuilt

    overbuilt

    Joined:
    Jan 3, 2014
    Posts:
    14
    Oh, thank you !
     
  33. Nosfera

    Nosfera

    Joined:
    Sep 26, 2014
    Posts:
    12
    The BaseRace has the same armature as the shirt Wardrobe, but the deformation is looking kind weird. I'm not using blendshapes because I don't want to make blendshapes for every single wardrobe in the project and still have to configure then or even implement a system to do it all with a single slider. I need to achieve the wardrobe deformation with the same armature of the body.
     
  34. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Be sure you have the skinweights set to at least 4 in all quality settings.
     
    umutozkan likes this.
  35. SUUNE

    SUUNE

    Joined:
    Mar 10, 2019
    Posts:
    65
    Hello.
    I try to make UMA as realistic as possible but I stuble upon a problem... I made highpoly hair and everything works ok but when I try to add highpoly clothing then I get errors... maybe I did somthing wrong but my only guess is that UMA have problem when there is too many high poly meshes.
    Clothing without hair works, hair without clothing works but when I add both then I gets those errors. Please, help. :(
     

    Attached Files:

  36. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    If you want to use very high poly models, you need to turn on "32 bit buffers" in the UMA preferences.
     
    hopeful likes this.
  37. SUUNE

    SUUNE

    Joined:
    Mar 10, 2019
    Posts:
    65
    Already figured it out... WTF? Why its set on 16bit buffer? Even phones can handle 32bits... I acutally think there is no device on market that have to use 16bit... Its nice to be able to set it like that but imho it should be other way - it should be ON and you can disable it if you want to optimize for very old android devices...
     
  38. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    386
    You're misunderstanding,
    https://docs.unity3d.com/ScriptReference/Mesh-indexFormat.html
     
    hopeful likes this.
  39. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    16bit buffers use 1/2 the RAM and transfer to video RAM twice as fast. Probably doesn't matter as much since the release of uma 2.12 though.
     
    Last edited: Jul 1, 2021
  40. ChickenHero

    ChickenHero

    Joined:
    Jul 18, 2016
    Posts:
    79
    Is there anyone who can answer my question?
     
  41. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    There is no API to set it from a slider or script. It's possible to adjust it by looking in the recipe after the recipe is constructed (there is an event for that) and adjust the rotation. Note: transforms don't work on base overlays, only on overlays that are on top of other overlays (example: a tattoo on top of skin). Be careful, because it's easy to transform the overlay off the atlassed location of the base overlay if you are not careful.
     
    ChickenHero likes this.
  42. arteria

    arteria

    Joined:
    May 31, 2007
    Posts:
    2,190
    As part of Arteria's 17th upcoming Birthday, im pleased this weekend to offer the following UMA costume for free.

    Simply visit the product page via the link below and use the link to download.



    Visit the page below to download

    https://arteria3d.myshopify.com/products/battle-wizard
     
    Alic, Gervais54 and Jaimi like this.
  43. ChickenHero

    ChickenHero

    Joined:
    Jul 18, 2016
    Posts:
    79
    I have two questions.
    1) I'm trying to change the bone scale with the values of multiple sliders, but the values are not as expected.
    For example, if I want to change the CheekBone from 0.8x to 1.4x with the BuccalFat slider and 0.9x to 1.4x with the CheekWidth slider, how do I set it in the Skelton DNA Converter?

    2) Currently, since the above settings do not reach the expected values, we are processing to change the Bone Scale separately from the Skelton DNA Converter after CharacterUpdated is completed.
    However, I can see the moment when the size changes due to changing the Scale after CharacterUpdated.
    Are there any events that can be received before Character Updated after updating the DNA?
     
  44. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    1
    The min/max on the values are not the start/end values -- they are what the value is capped at.
    You'll need to design your DNA so that the multiple gives you the value you need.

    CharacterUpdated is the closest to what you are wanting.
     
  45. ChickenHero

    ChickenHero

    Joined:
    Jul 18, 2016
    Posts:
    79
    How do you design DNA?
    Do you mean DNARangeAsset?
     
  46. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    No, that's used only for UI stuff and is optional. I'm talking about when you create dna with the skeletaldnaconverter, where you tie the DNA to the bone, and specify how the bone is morphed. SecretAnorak has some videos that explain in more detail how to set these up.
     
  47. ChickenHero

    ChickenHero

    Joined:
    Jul 18, 2016
    Posts:
    79
    Thank you, I will try.
     
  48. nasirs

    nasirs

    Joined:
    Dec 5, 2019
    Posts:
    11
    Hi, so I got male and female races done, also got overlays to work fine. Now I have been struggling for the last few days with Hair and wardrobe items. I keep getting this error in the console:
    Mesh.SetBoneWeights() failed: The size of the bonesPerVertex argument must match the size of Mesh.vertices (262144) or zero but was 264096.

    I am using 32bit buffers which solved the problem last time I had this. Also, all UV is within 0..1. I tired numerous combinations by changing blender export settings, different items of clothing. Even tried with new UMA materials. Nothing seems to work. The UMA avatar either disappears completely or falls to the ground without generating the overlay.

    I really need your help. Could it be due to Blender export settings? I had managed to get clothing work as wardrobe items. Just cant figure out why hair and other items won't work.
     
  49. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    So there is a hardcoded set of arrays used during the build to avoid garbage generation. You can increase the size of those by changing the constant in UMAMeshData.cs:

    const int MAX_VERTEX_COUNT = 262144;
     
    hopeful likes this.
  50. nasirs

    nasirs

    Joined:
    Dec 5, 2019
    Posts:
    11
    Thanks, that helped
     
    hopeful likes this.