Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    It's a well known Mecanim bug, but I'm surprised you can't fix it with the expression player. Do you have "Override Mecanim Jaw" turned on?
     
    andrew210 likes this.
  2. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241


    The range for jawOpen Close I extended to see if that would work but no such luck, as soon as I go to rig the model (the bit of race creation where we extract T Pose for UMA), Unity opens the mouth of the character from there it seems. I'm a little confused!
     
  3. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Hmm, well it could be a few things. It could be the Mecanim bug isn't being correctly accounted for, the bug is that the mouth is animated based on MouthClosed rather than mouth open, so if you import an animation with no jaw it defaults to 0 and 0 means gaping mouth. It could be that there's a problem with your T-Pose. this seems like the most likely to me based on your latest post. If you know you plan on using the Expression Player you could adjust the T-Pose so the mouth is always closed, the expression layer has its own limits. It could be that the expression player doesn't like that your skeleton is different. I don't think this is the issue because all those movements are relative, so it shouldn't matter if the bone fault position has changed.
     
  4. wiseman_2

    wiseman_2

    Joined:
    Dec 11, 2013
    Posts:
    66
    Working on some eye overlays... right now I'm just messing around, getting the feel of it...
    I'll have to put these up somewhere if anyone wants them.
    ..

    still have to work out pbr...only worked with it a little , so these are still using legacy
     
  5. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Thank you @ecurtz ! I went back to rigging and forced the mouth shut there and extracted the TPose info again and now all is well in the world. Trying to guess at what I was altering with all this going on and no obvious way to turn the green lines off was fun though.

     
  6. wiseman_2

    wiseman_2

    Joined:
    Dec 11, 2013
    Posts:
    66
    Last edited: Feb 5, 2016
  7. Femidko

    Femidko

    Joined:
    Aug 4, 2013
    Posts:
    57
    Good afternoon!
    After reviewing all the tutorials and reading this thread, I have not found the answer to the question: "How to create a new race in UMA 2?". Forgive me for my newbie question. Help me find the answer. Thank you.
     
  8. Ashamen

    Ashamen

    Joined:
    Oct 8, 2013
    Posts:
    20
    Ok I created a new rig for my model based off of the UMA Female rig - minus all the facial/ear bones for now. To test that this works or not I only made the unified version and tried to load her as a new race using only 1 slot. She imports into unity just fine, UVs looking ok and all. I matched her rigging to that of the UMA Female inside the configure rig window. Worked my way through all the errors for creating a new race and forgetting to change files names and data types. So now when she loads through UMA I still get an invisible person except for her finger nails...Oh, and she loads under the ground, possibly upside down but I can't be certain as she is 99% invisible. Any clues on what I am doing wrong or what I need to check on to fix this?
     
  9. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    I think the idea with learning UMA is that a person should begin by authoring a simple piece of clothing, or some such thing (it could be hair, or whatever), for the built-in UMA figures, in order to get a thorough understanding of the workflow. You need to get a fair number of steps exactly right. It is easy to go wrong, and when that happens you need to figure out what has to be fixed.

    So newcomers are encouraged to start with something relatively easy, like making a simple addition to the built-in UMAs - including slot and overlay, and getting it all to appear in a scene - before attempting to create a new UMA body. Get yourself familiar with all the parts of the system, and then you should have a much better perspective on how to use UMA with a new race model.
     
  10. Femidko

    Femidko

    Joined:
    Aug 4, 2013
    Posts:
    57
    Thank you for your reply. However, if I do not understand something in the UMA concept or in the tutorials, I would just as well asked. But, I asked, how do create a new race in UMA 2 (Because I did not find any tutorials or user guide). How to create a new race in UMA 1 it is clear to me.
     
  11. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    What is the difference in UMA2 that is causing you a problem? I think the two systems are very similar ... maybe identical when it comes to race creation.
     
  12. Ashamen

    Ashamen

    Joined:
    Oct 8, 2013
    Posts:
    20


    I have figured out some of my issues that no one has decided to comment on. This issue, I don't even know where to begin looking to fix it. on the left is my character, right the UMA female generated through the SecretAnoark tutorials. They both have the same locomotions and identical bone hierarchy, though for mine i had to recreate it. What are some possible reasons for this behavior in my model?
     
  13. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    I don't know. If someone more experienced with this knows and is available, I'm sure they'd comment.

    Usually errors with UMA involve very simple things, like forgetting to set the scale or rotation of the model correctly. One simple error can result in some very strange results.

    Also, if you go back through this thread (yes, it is long), you will find that people keep making a lot of the same errors.
     
  14. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    The most common cause of mangled skeletons is that you didn't finalize/bake your transforms before exporting from your 3d software. These models will display correctly in Unity, but when UMA tries to build the new skeleton it can't reconcile the bone transform in the data it has access to with what Mecanim requires.
     
  15. Ashamen

    Ashamen

    Joined:
    Oct 8, 2013
    Posts:
    20
    Alright, that makes sense because I put the locomotions on my unified and seperated models outside of the UMA system and the worked correctly. The problem is, I have no clue how to fix such an issue. I did my work in 3ds max, any clues or pointers on how to go about baking the info that UMA needs into the bones?
     
  16. Femidko

    Femidko

    Joined:
    Aug 4, 2013
    Posts:
    57
    The UMA 1 race setting created using prefab UMAData. Now UMAData has an error "Data do not loaded"
     
  17. Ashamen

    Ashamen

    Joined:
    Oct 8, 2013
    Posts:
    20
    From my understanding you no longer need to worry about that as it will be filled/generated at run time
     
    hopeful likes this.
  18. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    So question!

    I have an overlay on a body armor (it is with transparent shader - open down the middle, so the chest is visible). When i add another overlay (also with the same transparent shader).

    When i only have the one overlay it works fine, when I add the second overlay the first dissapears. I am guessing it has something to do with rendereing transparent material on top of transparent material.

    Is this just a "no go" or can it be made to work?

    I should say that when i change materials to none transparet it works fine (though now I have a bit white spot where my transparency was supposed to be :p)
     
  19. joaopaul

    joaopaul

    Joined:
    Feb 1, 2016
    Posts:
    39
    Hello everyone... new user of uma here. Can someone tell me how's the performace on mobile of the characters created with UMA?
    I'm working on a project that requires at most one model in the screen at once but it should be able to run fairly well in mobile.
     
  20. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    From what I have seen it is not a problem with one or even a few characters, but my experience is limeted to a few tests on mobile :)
     
  21. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    Like your name, from Wheel of time I assume? ;)
     
  22. Femidko

    Femidko

    Joined:
    Aug 4, 2013
    Posts:
    57
    Yes, but in all the tutorials used race. That is all still need to somehow create a race asset, for example, if the nonhuman-type skeleton, another set of slots, etc. Or not?
     
  23. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    I know this info is out there but someone could save me a bunch of time to confirm something.

    I want to change overlays at runtime. So is the process basically just change the overlay in code and set the avatar/uma data as dirty? Is there anything else major I'm missing?
     
  24. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    I think that is the basics yes. Here is one of SecretAnorak's videos on the subject:
     
  25. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Not sure if this helps anyone who is making a new race, but it was stated earlier in the thread that:

    The absolute minimum requirements for an UMA 2 race are:
    • A RaceData asset containing:
      • The T-Pose asset extracted from your configured Mecanim avatar.
      • A DNAConverterBehavior (and, if you aren't using existing DNA, then DNA matching the converter).
    • One or more SlotData assets (these require OverlayData assets to be visible, but those can be preexisting ones for testing).
     
    Femidko likes this.
  26. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    Just to reiterate my question in case it got lost in the recent activity, any ideas?

     
  27. Femidko

    Femidko

    Joined:
    Aug 4, 2013
    Posts:
    57
    Thank you so much. Can you suggest any yet? What should I do if I use legacy animation (do not use mecanim)?
     
  28. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    I'm curious to know what the answer is too. :)

    I wouldn't be surprised if you need to run some tests on your own to figure it out. If you do that, please let us know. I've been with this thread since the beginning and I'm pretty sure this has never come up before.
     
    Ramsdal likes this.
  29. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    I've never created a race, so this is out of my realm of experience. But if you are looking for info on the switch over to UMA 2 and how things changed from UMA 1, I think that happened around August 2015 (when UMA first began using PBR). So you can probably find a lot of people asking similar questions in this thread around that time.

    Also, I know very little about using legacy animation with UMA. So far as I know, the whole system is set up around mecanim humanoid and generic.
     
  30. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    I tracked down my problem. It was just due to my lack of knowledge about UMA :)

    I found out that the material (default transparent material) was set to channel type tinted texture, and no atlas. Hence my overlays ended up overwriting each other since there was no atlassing. Once I changed the material all was good, now i have grunge on top of my transparent overlay.

    So the reason why this might not have come up before might be because the problem did not exist :D
     
    hopeful likes this.
  31. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    So been playing around with uma some more and the api is completely frustrating. Not that it's difficult it's just there is no sane way for content creators to make stuff that isn't a complete pain to integrate.

    I think what's needed is standard slot/overlay names. Exposing the underlying array indexes as the slots is really what I think is most wrong about the api. It's exposing implementation details and it's not following the rule of make the general case easy while still allowing for advanced customization.

    For example, with standards for this you would have a basis for saying this overlay of mine is going to override the following standard overlays. Which means it's then trivial to create an uma from third party overlays. You could have a scriptable object that defines an 'overlay set'. Which has overlays and defines which standard overlays it overrides. In code you can now simply say load these overlay sets to customize an uma at runtime. Or just drop them onto an avatar and it just works. Because there is some logic there to figure it all out.

    To allow for advanced customization just base the standard slots/overlays on a template. So people can still customize it if they want, but for 90% of us 100 lines of code turns into more like 5 or 6.

    While you can just implement this yourself, it's really not useful and in some cases harmful until uma adopts something like this itself. Otherwise you just end up with multiple competing solutions that make it even more difficult to consume content from different content vendors.

    I would even contribute most of the code to this if I knew it would be put in place. It's really not difficult and it's a fairly thin abstraction over what is there now.
     
  32. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I thought much the same thing. So, I created a library to do much of what you are talking about. It adds "wardrobe slots" at a higher level. These slots contain recipes, which can have UMA slots and/or overlays (any number of them). It also adds the ability to recolor parts of the overlays based on shared colors. If you're interested, I've uploaded the code here:

    http://forum.unity3d.com/threads/uma-character-system.371051/





     
    hopeful likes this.
  33. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Very nice will have to check that out. Really need something like this in uma core. I think uma still has some real potential it just needs some of these finishing touches. I run some large open source stuff of my own and I know documentation is the last thing I like to do, but really almost all open source projects have more then nothing!
     
  34. Ashamen

    Ashamen

    Joined:
    Oct 8, 2013
    Posts:
    20
    Still having the issue where my generated character from my own race is lying on its back doing a funky yoga pose, all with the default locomotion mecanim animator applied. I really do not know what is going on, and looking back in this thread someone said they had the same issue and couldn't figure it out but reimporting the content seemed to fix the issue. Well this did not help me.

    So, with the test scene running I swapped out the generated Avatar for the Unified one that was working on the Unified test mesh outside of UMA and my character started working, though on her back. From the looks of it her Y up was no Z up. This wasn't done by me but during the TPose creation from what I can tell. Why it is happening I really don't know. Obviously I either did something wrong in the rigging process or mecanim avatar set up, problem is I have not been able to find anything regarding this issue in this thread or doing a google search. So, again I ask here, does anyone know what is going on?
     
  35. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    I'm not good at diagnosing these problems. But are you sure you're exporting out of Blender (or whatever) using the proper orientation for Unity?
     
  36. Ashamen

    Ashamen

    Joined:
    Oct 8, 2013
    Posts:
    20
    no i am not sure (also using 3ds max) but if i am not exporting correctly, how is it that the fbx files, after setting up the avatar, work correctly dropping directly into the scene vs UMA generating my character?

    Edit: while picking up kids I realized one of the differences between the FBX being used by UMA and just being dropped into a Scene - UMA makes use of the Global/Position bones, so I might just have an issue with one of those bones and their orientation. Will check into that when i get a chance.
     
    Last edited: Feb 10, 2016
    hopeful likes this.
  37. silentneedle

    silentneedle

    Joined:
    Mar 14, 2013
    Posts:
    280
    I'm currently trying to removing an instantiated slot. In SecretAnoraks examples (great job btw.) he just sets the slot to null and calls the dirty method.

    Unfortunately that doesn't work for me, only if I hit the "update slots" button in the editor, is there anything else to consider?

    Next question:

    Code (CSharp):
    1. // Create a new game object and add UMA componenets to it
    2.         GameObject GO = new GameObject("MyUMA");
    3.         umaDynamicAvatar = GO.AddComponent<UMADynamicAvatar>();  
    4.        
    5.         // Initialise Avatar and grab a reference to it's data component
    6.         umaDynamicAvatar.Initialize();
    7.         umaData = umaDynamicAvatar.umaData;
    8.         umaData.OnCharacterCreated += CharacterCreatedCallback;
    9.        
    10.         // Attach our generator
    11.         umaDynamicAvatar.umaGenerator = generator;
    12.         umaData.umaGenerator = generator;
    13.        
    14.         // Set up slot Array
    15.         umaData.umaRecipe.slotDataList = new SlotData[numberOfSlots];
    16.        
    17.         // Set up our Morph references
    18.         umaDna = new UMADnaHumanoid();
    19.         umaTutorialDNA = new UMADnaTutorial();
    20.         umaData.umaRecipe.AddDna(umaDna);
    21.         umaData.umaRecipe.AddDna(umaTutorialDNA);
    22.        
    23.        
    24.         // >>> This is where the fun will happen <<<
    25.         CreateMale();
    26.        
    27.         umaDynamicAvatar.animationController = animController;
    28.        
    29.         // Generate our UMA
    30.         umaDynamicAvatar.UpdateNewRace();
    This is the initialization code of Anorak. I'm getting with the same code a null reference at "// Set up slot Array" because umaData.umaRecipe isn't initialized. It works fine when I initialize umaRecipe. But I would like to know why this is working in Anoraks tutorial.
     
  38. Ashamen

    Ashamen

    Joined:
    Oct 8, 2013
    Posts:
    20
    Both the Position and Global bones were rotated, reset them back to 0, exported back out to unity. Went through all the steps to create the avatar, extract the TPose, make sure the race prefab had the new/updated model - still have a funky yoga pose character with no change - no even a position change... still at a lose as to what the position/global bones are doing once brought into UMA.
     
  39. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Did you by chance scale it when exporting?
     
  40. Ashamen

    Ashamen

    Joined:
    Oct 8, 2013
    Posts:
    20
    That I did not do. I originally couldn't see my UMA character at all when first doing this because I used the UMA Female rig scaled up, UMA did not like that. This is my own rig, with same naming as UMA Female for all bones/adjusts, but created at my models scale. When exported to FBX it is at a 1:1 ratio left in centimeters. The only thing I can think of in relation to scale is that the import settings show file scale at 0.01 but scale factor at 1. I don't know if that has anything to do with it.
     
  41. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Are you using 3dsmax? To make things work when I was playing with this, I had to set the system units to "meters", and then told the fbx exporter not to scale.
     
    hopeful likes this.
  42. Ashamen

    Ashamen

    Joined:
    Oct 8, 2013
    Posts:
    20
    ok i will give that a try
     
  43. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    I am not a 3d artist myself, but secret anorak made a tut about this as well (where he also mentions the metrics). If I recall it is also 3ds max he uses. Perhaps it can be of some help, there is at least four episodes:
     
  44. Ashamen

    Ashamen

    Joined:
    Oct 8, 2013
    Posts:
    20
    Issue resolved! :D

    First I'd like to say thanks to all who attempted to help me. Though it wasn't the answer to my issue, it did help me work through my problem and learn UMA better.

    Changing 3ds Max to Meters then exporting did not help me, UMA used the new units internally and messed my generated characters scale, she was HUGE. As for SecretAnorak's videos, I haven't fully watched them but for the snippets I did, led me to my answer.

    So, for anyone that is getting a generated UMA character, using your own Race and your own rig, the answer, at least for me, was in the bones not directly associated with any errors or questions in the forum. Global and Position are the parents of your Hips. That part is obvious when looking at the hierarchy of any UMA character. The problem ended up being that there is a bone labeled UMA_Female_Rig or close enough, that Global is parented to. When I worked through my scaled up version of the UMA rig, that bone somehow disappeared, or I deleted it without thinking. As such, when I created my own rig I never made its equivalent. Apparently UMA needs this bone, named whatever you want it to be, but at the top of the hierarchy, then Global, Position, then on to your actual rig. Hope this helps anyone else in the future, and maybe someone with wiki skills can make a bone rigging FAQ or something like that to house this info.
     
    Pomelo874 and hopeful like this.
  45. Arakon

    Arakon

    Joined:
    Mar 8, 2014
    Posts:
    23
    Currently, would UMA support a non-humanoid race?
    I've been trying to get this to work with a wolf, and though I have had some success (have one slot, where bones can be adjusted and affect the model properly), I'm having some issues with animations not working, possible due to them being legacy animations, and having no T Pose.

    After some research, I'm thinking of arrange it to be humanoid enough to fake it. is there a way around this, or is humanoid a base assumption?

    thanks

    UPDATE: I'm having better luck now that I switch to mecanim, and renamed some of the initial bones. it's still not quite right, but I don't think it's related to t-pose anymore. Will lack of a t-pose cause me problems going forward though?
     
    Last edited: Feb 13, 2016
  46. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    UMA has been demonstrated using animal models before. But I believe you need to use generic mecanim for animation.
     
  47. DirtyHippy

    DirtyHippy

    Joined:
    Jul 17, 2012
    Posts:
    224
    As a word of advice, I would definitely avoid using UMA for stuff like this. While the results can be varied and more interesting, generating the UMAs dynamically at run-time isn't fast, even with the new optimizations they put in (which were great). It still allocs a ton of memory. I can spawn in 10 randomly generated NPCs without UMA in less than a millisecond (off a pool), but spawning NPCs using randomly generated bodies / equipment takes significantly longer (a small part for the randomization, and a much larger piece being the UMA overlay generation + DNA).

    For wolves, unless you are doing something where the focus are wolves (like from an animal's perspective), simply providing a few different materials for randomly generated wolves + varying the scale a bit is all people would ever really notice or frankly really care about. It simplifies your pipeline significantly and reduces the engineering cost.
     
    hopeful likes this.
  48. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Hello together,

    I added some various stuff to my Project last weeks, but I think I did not Change anything on my uma part.

    Now when starting I get the follwing exceptions:


    UnityEngine.Camera:Render()Invalid AABB aabb
    UnityEngine.Camera:Render()
    UMA.WorkerCoroutine:Work() (at Assets/Standard Assets/UMA/Core/Scripts/WorkerCoroutine.cs:35)UMA.WorkerCoroutine:Work() (at Assets/Standard Assets/UMA/Core/Scripts/WorkerCoroutine.cs:65)UMA.<workerMethod>c__Iterator0:MoveNext() (at Assets/Standard Assets/UMA/Core/Scripts/TextureProcessPROCoroutine.cs:89)
    UMA.UMAGeneratorBuiltin:Update() (at Assets/Standard Assets/UMA/Core/Scripts/UMAGeneratorBuiltin.cs:73)UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/Standard Assets/UMA/Core/Scripts/UMAGeneratorBuiltin.cs:143)UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/Standard Assets/UMA/Core/Scripts/UMAGeneratorBuiltin.cs:110)UMA.WorkerCoroutine:Work() (at Assets/Standard Assets/UMA/Core/Scripts/WorkerCoroutine.cs:35)UMA.WorkerCoroutine:Work() (at Assets/Standard Assets/UMA/Core/Scripts/WorkerCoroutine.cs:65)UMA.<workerMethod>c__Iterator0:MoveNext() (at Assets/Standard Assets/UMA/Core/Scripts/TextureProcessPROCoroutine.cs:89)UnityEngine.Camera:Render()Invalid AABB aabb


    UnityEngine.Camera:Render()aabb.IsFinite()
    UnityEngine.Camera:Render()
    UMA.<workerMethod>c__Iterator0:MoveNext() (at Assets/Standard Assets/UMA/Core/Scripts/TextureProcessPROCoroutine.cs:89)

    Any ideas where those are coming from and what I can check or Change to get rid of those?
    In the game the Player and the npcs look okay so far I can see...

    Thanks!
     
  49. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    You should probably mention your Unity version, and if you are using the UMA2 from the store or a different version (like the one for the UMA Character System).
     
  50. Arakon

    Arakon

    Joined:
    Mar 8, 2014
    Posts:
    23
    Thanks, I see your points. Simplification is always good where possible when it comes to optimizations. The focus will definitely be on the wolves for this, so I think UMA will be a good fit. The overlays will definitely be useful, but I think changing meshes will add the extra needed flare. I don't plan on having more than 5 or 10 on the screen at a given time, so I'm not concerned about memory or generation. It would probably be possible to hit my intent with a different approach, but I think I would end up with several similar structures and similar processing, so I see this also as a good way to get to know the insides of UMA better. :)
     
    hopeful likes this.