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. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,629
    We're going to need a LOT more votes!

    But so glad to see garbage reductions. :)
     
  2. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    In my opinion this would actually be a reasonable time to check out the Unity5Purge branch if you were interested in seeing the performance improvements. We're starting to wind down on the major code updates at this point. As always, plan on running into issues in the development branch and don't attempt to switch the project you plan on shipping in 3 weeks.
     
  3. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Tried out the unity5purge branch. Biggest issue I ran into was core changes to the api and member variable visibility that broke third party stuff.

    One thing I haven't dug into that I'm not sure what's going on is my existing characters that I load from serialized uma data are now sideways, and a lot smaller.
     
  4. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    UMAGeneratorBuiltin.HandleDirtyUpdate is getting called with a null value while using umazingcc. Assuming this should never happen by looking at the code.
     
  5. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    I take that back the characters are not smaller.

    What's up with that box they are now in though? That messes up the capsule collider radius so you have to explicitly set it now.
     
  6. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    While purge is nearing a reasonable stable spot, it's still been through heavy flux for a few days. So there are bound to be smaller issues like the ones you've found with third party components and stuff. It would be helpful if you could list which visibility changes that have affected your code. We strive to produce as few code breaking changes as possible, setting up obsolete warnings before we actually delete anything.

    Latest thing is that we're changing the SlotData to no longer be a ScriptableObject, instead it references a SlotDataAsset which is the asset. This allows SlotData to be properly garbage collected and makes it easier to work with UMA. (Technically you needed to call Destroy on every SlotData and OverlayData in your character, which I doubt anyone did.)
    This is a huge change, so it's very fortunate we can bundle it with the rest of the UMA2 changes.

    We now have the DeathToScriptableObjects branch where the memory profiler flatlines while continously spawning and destroying characters. Open the crowd scene, find the crowd and set the StressTest = true to see continual madness...
     
  7. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,629
    This sounds like a good future demo. :)
     
  8. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    The changes I saw that broke stuff made perfect sense as far as what it was changed to.

    Major one was umadata in umarecipe is now protected and has an api for access. two of the third party assets I use reference that directly.

    The OnCharacterUpdated changes break stuff. Could be myself and others were using it wrong to start with, kind of looks that way now on a closer look, but the behavior did change so you have to set it earlier now.

    Performance is looking better and better.
     
  9. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Stuck in a sanity test for this, but we'll have to go back to the 1.22 code and see what the old behavior would have been.

    That's probably just the gizmo for DynamicCharacters, since people were complaining about the giant labels getting in the way. Where/how are you attaching the capsule collider? There's a really convenient way to do that in the Unity5Purge branch using a recipe. (Or if you don't want to use that, you can also now get the correct width and radius directly from the umaData.)
     
    Last edited: Mar 16, 2015
  10. jaaaaaaan

    jaaaaaaan

    Joined:
    Nov 22, 2013
    Posts:
    10
    Thanks for your work!

    So what if I make a project from scratch, using the Unity5Purge branch? Say, I import Fernando's HumanHighPoly from the Asset Store, I only have the old (broken) Female_High_XXX_Slot.asset with the SlotData scriptable object (which cannot be found).

    Neither "UMA|Optimize Slot Meshes" nor "UMA|Find Missing References" will create a SlotDataAsset-style .asset for me (unless I'm doing it wrong).
     
  11. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640

    EDIT: Oops! Ignore the below if you aren't in the DeathToScriptableObjects branch! Those changes haven't been made in Unity5Purge, the data types are still the same as they were before in that branch.


    This part is still a work in progress - the code was only finished about 10 hours ago. Other things to try:
    • Throw away the high poly slots and reimport them, run "UMA|Find Missing References" BEFORE you look at any of the new slots in the editor.
    • Manually assign the new classes in the Editor on the assets it doesn't recognize (i.e. old SlotData is now SlotDataAsset).
    • Last resort - import the slots and then throw away the Library folder for the project
    Pretty sure one of those will do it, and we'll try to make the final version as smooth as possible for updates.
     
    Last edited: Mar 16, 2015
  12. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    SlotDataAsset only exists in the DeathToScriptableObjects branch. It was late at night and we felt it was such a radical change that needed futher testing before we considered it truly done. As Eli mentioned there are numerous pitfalls to upgrading your SlotData. And those are only the ones we know of. I would recommend you grab the DeathToScriptableObjects if you're feeling adventurous. It shows our take on UMA2, but it is bleeding edge and a "simple" task such as importing your Uma1x SlotData may take a few tries where you have to restart unity, purge the library folder and restore the asset and meta files a few times before you reach the good place. Be kind enough to share if you find additional pitfalls to the ones we mentioned! :)
     
  13. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    And actually updating the High Poly Slots into the regular UMA2 branch is a bit of a comedy of errors as well right now. The simplest thing to do is to wait for Fernando to publish a new version that will update easily.

    If you absolutely positively need to check them out in UMA2 you can (probably)...
    • Import them into a project with the asset store version of UMA.
    • Set the project to Force Text Serialization.
    • Assets | Reimport All Assets because the Asset Store import doesn't respect the Serialization settings.
    • Hope the serialization changes haven't messed up the name fields (some Unity bug, not us).
    • Copy these new text based High Poly Assets to the UMA2 project folder.
    • Run the UMA | Find Missing References script.
    • Cross fingers and toes
     
  14. jaaaaaaan

    jaaaaaaan

    Joined:
    Nov 22, 2013
    Posts:
    10
    Sorry guys, Indeed, I was using in the DeathToScriptableObjects branch when creating the new project.

    I followed ecurtz steps and it worked! In the meantime, I also did the upgrade path from master -> unity5purge -> DeathToScriptableObjects as well, which was also straightforward (I needed to make sure that I had the capsule collider/etc.).

    I have Fernando's scans and high poly now working in the 2.0/DeathToScriptableObjects, And indeed, in the end the most work was to fix the name fields :)

    Thanks again!
     
    hopeful likes this.
  15. jaaaaaaan

    jaaaaaaan

    Joined:
    Nov 22, 2013
    Posts:
    10
    Any chance that saving characters is broken in the DeathToScriptableObjects branch? I get "UMAResourceNotFoundException: OverlayLibrary: Unable to find: " (as in, unable to find [empty string]).
     
  16. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Fixed pull again...
    Added some bogus == and != operators to protect against the inspector creating default objects in those arrays.
     
  17. jaaaaaaan

    jaaaaaaan

    Joined:
    Nov 22, 2013
    Posts:
    10
    Thanks!

    To test the no-prefab :additional recepie" architechture, I tried to make a ragdoll recipie based on this: http://perttuh.blogspot.dk/2013/10/unity-mecanim-and-ragdolls.html



    It's quick and dirty, and I still need to tweak the character joints (they are pretty much unaltered after "ComponentAdd<>()").

    I'm also not sure why some are glitching so hard (I think I need to inspect the size of the colliders, which I made dependent on umaDna - some end up much too big/overlapping).
     
    Soul_Raven and hopeful like this.
  18. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Yay, looking awesome, and yes overlapping joined colliders are bad. :)
     
  19. DirtyHippy

    DirtyHippy

    Joined:
    Jul 17, 2012
    Posts:
    224
    Edit: Ignore. I was replying to an older post on a cached view of the thread.

    My guess is they are planning for a 2.x official release once all the unity-free stuff is ripped out of
    the branch and they have the new shaders in. I don't plan to update until that point.
     
  20. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,172
    Converting to the 2.X branch is pretty easy, except that the SlotName and OverlayName is replaced with what looks like random garbage.

    After looking at the text, what it actually is, is the name in ascii in hex.

    For example, the OverlayName for the "Maiden Hair" asset (from Will b) is

    4d616964656e2068616972

    Which, if you look at an ascii chart is "Maiden hair" (4d 61 69 64 65 6e 20 68 61 69 72)

    So, it shouldn't be a problem to simply read the bad text, recreate the goofed up string, and replace it.

    If I can figure out how to configure GIT to work with Monodevelop, I'll fix this tonight.
     
  21. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Awesome, I saw the garbage but didn't dig deeper... if git gives you trouble you can just send the changes to me. :)
     
  22. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,172
    Thanks - the changed file is attached.

    Jaimi
     

    Attached Files:

  23. jacobparise

    jacobparise

    Joined:
    Oct 6, 2013
    Posts:
    1
    When I open the separated models I got from Github, blender opens with a cube mesh. UMA models are no where to be found?
     
  24. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Did you check the "Outliner" panel? They are probably just in hidden layers.
     
  25. Grim_Darknight

    Grim_Darknight

    Joined:
    Nov 22, 2012
    Posts:
    6
    I can't get UMA to work at all. I have unity 5 installed and I import the base asset but when I try to run any scene i get:
    =====
    MissingMethodException: Method not found: 'UnityEngine.Component.set_active'.
    UMA.WorkerCoroutine.Work ()
    Rethrow as Exception: Exception in WorkerCoroutine: UMA.TextureProcessPROCoroutine
    UMA.WorkerCoroutine.Work ()
    UMA.WorkerCoroutine.Work ()
    UMA.UMAGeneratorBuiltin.HandleDirtyUpdate (UMA.UMAData data)
    UMA.UMAGeneratorBuiltin.OnDirtyUpdate ()
    UMA.UMAGeneratorBuiltin.Update ()
    =====
    I dont know if there are other errors but I have no idea how to clear this.
     
  26. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    The version on the Asset Store is not Unity 5 compatible without some fixes. If you're comfortable using github the "master" branch at UMA github is Unity 5 compatible and fairly stable. There will be a new official release with lots of Unity 5 improvements "soon".
     
  27. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,172
    I have compiled a DLL that works with Unity 5.0, attached to this post. Replace your UMA.DLL with this version, and it will work. It will still want to upgrade the DLL, but it will no longer fail with the set_Active error.
     

    Attached Files:

  28. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hi there!
    Here are some early results on updating UMA textures to Unity5 standard shader.



     
  29. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Awesome, thanks Jaimi, as you no doubt realized along the way it wasn't really that hard... and considering how long it's been since the Unity 5 release I admit it was a mistake to refuse to make a new release.

    However our focus is entirely on UMA 2 and we didn't want to release a new version that we had no intentions of maintaining.
     
  30. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,629
    Looking forward to it (UMA 2), ... and also to any of those side projects you've teased us with over the last year or so. :)
     
  31. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,172
    Of course, and it's looking great! I'm really impressed with the speed of the new version, too.
     
  32. GMagnetic

    GMagnetic

    Joined:
    Dec 8, 2014
    Posts:
    23
    I'm trying to detect when an area of a UMA generated character is touched (say, the head for instance), seems like there may be many ways to do this, wondering if anyone has any thoughts as to what's optimal
     
  33. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I think I would create a SlotData that doesn't have a mesh but instead have a script event that creates a rigidbody and a collider to the head.
     
  34. _alphaBeta_

    _alphaBeta_

    Joined:
    Aug 8, 2014
    Posts:
    38
    Thanks for the reply. I've moved on to r265 of UMA20 with Unity 5.0.0f4. I believe I've tested the first option by simply manipulating the ATLAS resolution to something drastic like 64 in UMAGenerator. This helped performance as expected, but I'm still getting down into the teens for FPS with 100 avatars on default UMACrowd settings with nothing else going on.

    Can you quickly walk me through the second option and how one would go about doing this? I'm a bit hazy and I'm not sure I'm accomplishing what you're suggesting in my attempts so far.

    The third option is beyond my skill set right now until I've had a chance to really trace UMA through in more detail. Pardon the ignorant questions, but I'm trying to see if UMA is a good fit for what I have in mind before putting more time in.
     
  35. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    First of all it's worth checking if the bottleneck is really memory usage, other side reducing atlas size won't be enough and might not increase performance. Take a look at the profiler to be sure fillrate or animation processing time isn't the real problem.
    Cheers
     
  36. GMagnetic

    GMagnetic

    Joined:
    Dec 8, 2014
    Posts:
    23
    Geez, sorry for the endless stream of noobie questions, but I'm having a lot of fun with UMA.

    I need to get the rigid body for a generated character.

    I can see the hierarchy is:
    GeneratedCharacter
    UMA_HumanFemale(Clone)
    Female_Unified -- the rigid body is attached to this

    How would I access this in C# code?
     
  37. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    var rigid = umaData.gameObject.GetComponent<Rigidbody>();

    Assuming you're doing it in a character completed callback or somewhere else you have the UMAData.
     
  38. GMagnetic

    GMagnetic

    Joined:
    Dec 8, 2014
    Posts:
    23
    Yeah, I tried something similar, then tried the version above, and even though umaData is not null, the returned value for rigid is null.

    In a C# inspector the gameObject rigid body value is null.

    Any thoughts appreciated, thanks.
     
  39. GMagnetic

    GMagnetic

    Joined:
    Dec 8, 2014
    Posts:
    23
    Ahhh..

    It was umaData.gameObject.GetComponentInChildren<Rigidbody>(); that did the trick, thanks again.
     
  40. GMagnetic

    GMagnetic

    Joined:
    Dec 8, 2014
    Posts:
    23
    Thanks, being a total noob I get what you're saying at a 50,000 ft level but I'm not sure how to accomplish this with the dynamic avatars, can you point me to a tutorial/code snippet/etc. to get me started ?

    Also I would like to be able to change the overall opacity of the dynamic avatar, from solid to ghostly, I think this has something to do with shaders, yes?
     
  41. Suraia

    Suraia

    Joined:
    Oct 20, 2014
    Posts:
    16
    Hey, I'm still working on trying to now add my own clothes to the female models for starters.

    I've upgraded to Unity 5(free version) and the latest Uma and I was following the instructions of the Content Creation Tutorial

    In the Scene02 - serialized It does show my pants that I tried to make but then I try and add it to another scene I get this error.

    Needless to say my pants is not showing. Can anyone help me with this please.
     
  42. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    You need to make sure any slots and overlays you are using have been added to the libraries in the scene - those are scene specific.
     
  43. Suraia

    Suraia

    Joined:
    Oct 20, 2014
    Posts:
    16
    Thanks, but they are added to the libraries. I checked like three times and tried to add them again just to be sure they are there.

    I looked a bit further now and found the problem. The error says they cannot find the slot in the library, this is because the MaterialBuilder named it Female_Pants_Slot while the slot name was Female_Pants. When I changed the slot name manually to Female_Pants_Slot it started showing up.

    Thanks^^
     
    hopeful likes this.
  44. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Not sure if this is a known issue or not. I'm on the unity5purge branch from about a week ago. In the profiler I'm seeing 100 to 150ms spikes in UMAGeneratorBuiltin.Update/GC.Collect. This is with around 40 uma characters in the scene but only around 10 in rendering view.

    On another unrelated note. I bought one of the uma skin packages from the asset store and was trying to get it working without much success. I duplicated an existing slot and overlay that comes with uma to use as a base for the skins, basically re-creating them. But the textures were just all wrong, they were there but not oriented correctly somehow, with the patterns being in the wrong places. I tried playing around with the order of the slots and overlays but never figured it out. Is there anyone who has successfully converted any of the asset store skins to work with unity5purge? If so would love some pointers. I'm looking to get an early alpha of my game out and badly need this to work.

    Chris
     
  45. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,172
    You might try the "DeathToScriptableObjects" branch if your testing performance.

    Usually this is because the texture sizes are different - try going through and changing the import settings to make sure they match the original skins.
     
  46. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Jaimi is right on both suggestions. However if you're getting serious amounts of garbage it probably isn't UMA. We did a ton of work to minimize our garbage generation and it's only about 600k per character, so there's not much more we can do until they fix the mesh setting thing here: http://feedback.unity3d.com/suggestions/allow-mesh-data-to-have-a-length. In "DeathToScriptableObjects" it isn't doing any character generation at all on the frames when the GC runs.
     
  47. DirtyHippy

    DirtyHippy

    Joined:
    Jul 17, 2012
    Posts:
    224
    So these branch names are alarming. I am using 2.x, from before you guys started the purge I believe. Everything works fine in U5. I have implemented an extensive abstraction layer on top of UMA, with many internal metadata mechanisms describing an abstraction of slots and overlays, color palettes, custom byte serialization, etc etc. At some point are you guys going to describe the changes that are being made? It sounds like there will be breaking changes, which will be super fun with the billion slots/equipment metadata I already have setup and working perfectly :). I'm all for forward progress though, and I don't mind refactoring if I get improved performance and usability. It would just be nice to know what those changes will be so I can start crying in the corner now rather than later.
     
  48. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,629
    You might try to get in on a UMA Skype group, if that's still going on, as that's probably the quickest way to find out the details of what's happening. It would also be a way to have a guiding voice, in that if you have something you'd like to add or see changed this may be a good time to put a word in.
     
  49. Urbanwarfare-Std

    Urbanwarfare-Std

    Joined:
    Jan 6, 2013
    Posts:
    33
    Bought it, tried it and it worked really well, thanks!
     
  50. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Yes, the Skype group is the best place for up to the minute information and hints, although sometimes it's slow and you have to wait for the right piece of advice.

    In very broad strokes the scarily named branches that development was done in:
    Unity5Purge: Removed all of the Unity 4 Free texture combining code and stuff that had been marked obsolete for a long time. Unity 4.6 Pro and 5+ (any version) only in UMA2.
    DeathToPrefabs: Got rid of the race prefab that was used for building the animation rig. Added new methods for attaching additional components rather than sticking them in there.
    DeathToScriptableObjects: Slots and Overlays are separated into 2 parts, the shared assets and the in memory mutable stuff.

    Throughout all of it there has been a focus on performance improvements, garbage reduction, and getting things ready to support PBR and other Unity5 features. There will be an upgrade guide, but in cases where you've made internal changes (which it sounds like you have) there will definitely be some adjustments, and Skype is the right place to consult if you're curious about specific changes.
     
    UnLogick likes this.