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

    Plutoman

    Joined:
    May 24, 2013
    Posts:
    257
    So I just got UMA2x a couple days ago; started to play around with it. There's a rather noticeable lack of documentation on how to use the setup, and I'm hoping it could be clarified, without having to dig through the entirety of the source code. All I really want is what methods to go look at.. for example. What's the basic process.

    To start off with the basics, I'm intending to use this system for customization in a fantasy-based RPG. It's fully procedural, third person, etc - we have our environment demo set up. My partner and I are coders, programmers, not graphics designers by any means, so until we start launching more publicly, we're looking for a stand-in character setup that can work and look good, and be extendable to when we start hiring some artists.

    The catch is - the text recipes are rather confusing, and do not seem to be working. I bought the high poly meshes for UMA (and will get the scans if I can figure this out), but actually changing everything is.. messy? Do I create a character recipe? How do I edit them? How do I just get a high-poly character with the right slots? If I go to an existing character, ie, Troll, or Hugo, and try to change the slots, the entirety of the setup has errors. It will consistently duplicate all the existing overlay data on a new slot added. It seems like all the assets on the store use RandomSets - should I be examining those, instead?

    Really, all I want to do is have a basic recipe for a high poly character.. and then to be able to add some slot meshes for armor/equipment to the mix. Does this need to be set up in code? That is fine; if I can create an avatar, and link up the list of slots required. However, that list gets rather long when including overlays and etc. Fine, if needed, but hoping there is a cleaner solution. All I need is to be able to define Race, Slots, Overlays, specifically, and preferably with a list of what types of overlays are necessary for slots.

    Tldr: How do I set up a specific character for a game, with different slots and overlays? How do I go about the process of choosing which slots and overlays to apply? What scripts and methods am I accessing?
     
  2. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    As Joen mentioned on the previous page the best piece of code to look at for generating UMA characters from script is probably the UMACrowd.cs example. There are also some 3rd party UMA character creation utilities available in the Asset Store: https://www.assetstore.unity3d.com/en/#!/category/160 I haven't personally used them, but several are well reviewed.

    We're always looking for contributors, so when you get it figured out please consider adding any advice to the Getting Started page on the wiki: http://uma.unity3d.com/wiki/index.php/Newbie_Section or working on some documentation or tutorials.
     
  3. blumental

    blumental

    Joined:
    Mar 1, 2015
    Posts:
    5
    Hello, guys! Could anyone probably diagnose the following bug:
    Tshirt.PNG
    This occured after I imported from Blender a hand made T-shirt (FBX file), made a slot with it and added the following line to UMACrowd.cs:
    Code (CSharp):
    1.             umaData.umaRecipe.slotDataList[7] = slotLibrary.InstantiateSlot("MyMaleTshirt01");
    Apparently, it's my fault, but I can't track it.
     
  4. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I'm guessing you're either not using the latest version of UMA or you're using the LegacyMeshCombiner. Please grab the new version and make sure to use the DefaultMeshCombiner when using non-standard meshes.

    In UMA2 we're removed the LegacyMeshCombiner entirely as that allowed us to greatly optimize the SlotMeshes gaining unprecedented speeds!
     
    Last edited: Mar 9, 2015
    hopeful likes this.
  5. blumental

    blumental

    Joined:
    Mar 1, 2015
    Posts:
    5
    I've updated everything (Unity 5 and latest UMA from GitHub) and faced a little problem: when I'm trying to drag my MaleTshirt.fbx and drop it to a folder (say, MaleTshirt01) which I created in UMA/UMA_assets/Slots/Male, Unity doesn't automatically import that and refuses to put it there. I do that following Fernando's tutorial on YouTube (
    ).
    As far as I understand the slot creation pipeline has changed a little bit since the time the tutorial was made. So, could you advise me a tutorial/documentation which would help me to solve the following problem: given a T-shirt model in .fbx to make a slot from it and dress an avatar with the T-shirt.
     
  6. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    The save as txt and load txt is it possible to do this with code?

    Also I would actually be very happy to write a getting started with scripting with uma but quite a few of you need to watch the basic tutorials on how to do it manually first
     
  7. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hi there!
    That's what I've got so far, after testing the avatar composition at the Viking environment.
    I'll start converting all overlays based on those values, while keeping most roughness values open to further adjusts.
    I'm doing those adjusts on my free time, so it might still take a while, sorry for the delay,
    Cheers,
    Fernando R.
    PBS_Test02_ShadowReflex_Dionysus.jpg PBS_Test02_Dionysus.jpg
     
    Teila, UnLogick, John-G and 2 others like this.
  8. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    So do you plan to make some warriors and/or villagers (one variant) and spawn them in village? :p with built-in simple navmesh (basic move from one point to another or stay in place) this could make unity demo look very impressive (they already look very good but a bit dead :p) and - finally - complete, especially with viking style helmet ;) This is only suggestion of course, i could only imagine how are you busy with conversion...
     
  9. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    I'll just be able to handle the conversion itself, I've included the Viking scene shield and sword for comparison purposes, but it would be amazing having a scene crowded with UMA avatars =)
    Btw, those results are way far from "The Blacksmith" demo quality but I won't have enough time to invest on higher quality right away, of course Post FX also deliver a big difference as well. With time we might be able to improve those results even further.
     
  10. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    This one was just for fun =)

    UMA20.jpg
     
  11. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I did promise AutoLoader LOD for the UMA Power Tools. Work is progressing nicely.


    Webplayer Link - using the regular Generator, expect better performance when I'm done updating the threaded Generator.

    The LOD is two tiered...
    • Atlas Resolution Scale is reduced so far away characters will have a lot smaller atlasses.
    • Recipe Race/Slot/Overlay replacement. At a given distance certain elements can be replaced on the recipe level.
    I wonder if we need a viking village demo scene with 100 npcs. :)
     
  12. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,629
    Considering the lack of Viking clothing options, maybe it would be easier to have a demo of modern tourists visiting a mock-up of an ancient Viking village. ;)
     
    Sliceandkill likes this.
  13. sowatnow

    sowatnow

    Joined:
    Jun 12, 2014
    Posts:
    309
    Hi guys
    Has anyone tested this on mobile? If yes, how was the performance?
    I am looking to implement this into my game.

    Thanks
     
  14. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    I guess it all depends on how many UMAs you want in your scene. A few should be ok on mobile, but a lot might not work very well.
     
  15. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    Any answer
     
  16. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Yes, of course you can save and load using code. Just check the editor code for the save/load menu on how it works.
     
  17. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    You should reduce the atlas size and overlays resolution at OverlayLibrary to avoid reaching memory limit.
     
  18. GMagnetic

    GMagnetic

    Joined:
    Dec 8, 2014
    Posts:
    23
    Fernando/Joen can I use Power Tools to generate prefabs from the Dionysus/Athena/HighPoly mesh? These are featured characters so I want to retain as much resolution and detail as possible, I don't want any reduction in LOD.
     
  19. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Yes.
     
  20. sowatnow

    sowatnow

    Joined:
    Jun 12, 2014
    Posts:
    309

    Ok Cool. Thank you

    Will give it a go and see how it works.
     
  21. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Major performance boost on LOD performance! This is production quality!
    Webplayer

    As the screenshots shows I managed to double the number of characters in range going from 128(131 was misreported) and up to 258 while raising the frame rate from 30 fps to 60 fps. Also due to improvements in avatar creation it is now virtually impossible to stress the system. When moving around the finished vs dirty characters may fluctuate but it quickly recovers. Both with Power Tools and with the normal Generator.
     
    hopeful likes this.
  22. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,629
    As I WASD through the above demo I get frequent halts as I move along even though the FPS reads 60-ish. I can also crash on an "out of memory" error with more than 300 UMAs, but it happened only after many iterations and generator switches (a leak?).

    EDIT: When I keep changing generators it starts making fewer and fewer models. Probably just a demo issue, and not an UMA issue, right?
     
    Last edited: Mar 11, 2015
  23. revocelotmoky

    revocelotmoky

    Joined:
    Mar 4, 2014
    Posts:
    11
    Is this a Unity 5 ready plugin? Can I use the standard shader without problems?
     
  24. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Obviously out of memory is a problem, currently UMA has no built in checks to prevent that. I haven't seen an out of memory but I have seen drastic slow downs once the gps runs out of memory and starts swapping mid frame.

    I don't know anything about missing models, Looking at the code I have no idea how that happens, unless you press the "Cut down" button. Each More and Cut down click adjust the target number by +/-45. I have noticed however that the regular generator seems to be lingering longer during it's "Wait for it!" phase. The reason for the wait for it phase is obviously to start the LOD in a clean state to avoid the normal popping as the characters is created one by one... it's also to show how fast we can generate those 135 characters, obviously the speed slows down when we also have to render the 135 characters at a decent framerate. (It's quite intentional that the threaded framerate drops in the Wait phase, I give the generator a four times higher time budget than normal.)
     
  25. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    We're working on adding Standard Shader support. Right now you can use it just like any other shader but there is no specular/pbr textures so it doesn't really take advantage of it.
     
  26. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,172
    I'm workiing with the base UMA 2.X, and I'm really liking it. One feature that would be great is if when it ran out of space in the texture atlas, instead of auto-shrinking everything down after that, it just went ahead and created a second atlas. :) I know a lot of this can be tuned by paying attention to sizes, but sometimes it's preferable to have two smaller atlases than one large one.
     
  27. GMagnetic

    GMagnetic

    Joined:
    Dec 8, 2014
    Posts:
    23
    Hmmm... more noobness

    I got Power Tools and saved the prefab, great !

    Now I need to figure out how to upload it to Maximo, so that I can audition mocaps.

    They accept .fbx, obj, .zip (include textures).

    Any idea how to do this?

    A search seems to turn up nothing, thanks for any help, as usual.
     
  28. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    You cant upload prefabs to Maximo, my best bet would be to download their Unity tool, there i think you can preview animations on any prefab.
     
  29. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Glad you like it, I'm really impressed with the fantastic improvements we're seeing as part of the 2.x launch preparations. To have UMA casually pump out hundreds of characters is far better than I had hoped for.

    About multiple atlasses, that means multiple draw calls and that's one of the things I believe UMA should let me control. My vision of the UMA core is to keep it clean and lightweight. I certainly don't want it to make such choices as creating multiple atlasses for me, indeed I think you're better off raising the maximum atlas size. If you wanted to add such functionality it would be welcome as long as it can be enabled/disabled by a boolean. However that being said I am working on a way to control character generation so you can control which pieces are atlassed together. This could help reduce the wasted atlas space at the expense of drawcalls. It could potentially allow you to cache the atlas so that if this particular atlas appeared again it could be reused... I'm thinking mostly about stuff like military uniforms here.
     
    hopeful likes this.
  30. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Virror is quite correct, prefabs uses Unity's internal mesh format. Afaik no Unity FBX exporter plugin exists. I'm very interested in knowing if their Unity tool can be used to preview the animations.
     
  31. GMagnetic

    GMagnetic

    Joined:
    Dec 8, 2014
    Posts:
    23
    Thanks for the help, searched for a Mixamo Unity Tool on this forum, the Mixamo forum and general search, came up with nothing, any idea what the name of the tool is?
     
  32. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
  33. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,629
    If I do nothing but click the "change generator" button, the number generated (135) will stay the same but the plugin will crash on the 26th button press. (Tested twice.)

    If I move out to an edge the number visible can drop by a small but variable number, like to 130. After clicking "change generator" that number drops to something like 90, and thereafter can be in a range from 97 to 75. I suppose that probably not all of the randomly placed models are close enough to appear on camera, and that's what's happening, although if I lose models and don't regenerate, no matter where I move on the map they won't return ... so maybe that's not it after all.

    Out on the edge looking back, I can get about 31 clicks on "change generator" before a plugin crash or "out of memory" error. I suppose it takes more iterations than 26 because there are slightly fewer "visible" models ...?

    As for the halts or waits ... there can be pauses in the generation phase but are also noticeable pauses in movement as I WASD around in a generated group. I would expect the pauses during movement to be reflected in the FPS but they don't appear to be. I can't always smoothly move around in the UMA crowd at 135, but if I cut it down to 90 I can move without a hitch, albeit at the slow pace of the demo.

    While writing this up I noticed one female UMA with a foot-long something-or-other hanging from her nose, indicating some form of glitch.

     
    Last edited: Mar 11, 2015
  34. Plutoman

    Plutoman

    Joined:
    May 24, 2013
    Posts:
    257
    The UMACrowd is decent; string-matching slots and overlays works adequately. I can refactor it internally to an ID match system anyhow, later. It fits in easily enough with the current character system, without too much work.

    Basic catch was that designing an NPC by editing the recipe was no working. It was, essentially, broken in the Unity editor GUI.

    I'm still having a few issues, the overlays are not working on the high poly mesh slots well.. beards end up in the wrong places.. etc, but for the most part it works well enough to be useable.

    I would like some clearer documentation on what variables are, and what they are intended to be. Sure, contributing is nice, but I'm working on time that's already valuable. I would rather pitch forward some money to get clear documentation from someone who knows the code - preferably from the person who wrote it. Figuring out undocumented variables that nest through a dozen classes is not simple, and the time factor for that is orders of magnitude more than the person who wrote it. I started with the DynamicAvatar class, and nothing linked together in very sensible ways - that's partly a factor of the complexity of the task - but what is needed to create an avatar? What are these arrays and more for? Just small comments throughout it and some documentation for the public methods and workflow would be good.
     
  35. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    I totally understand how frustrating this is, and agree that the lack of documentations is unacceptable, but the unfortunate fact is there's nobody to fix it. Fernando has a new job, and in his extremely limited free time he's working on updating the textures for PBR. Joen and I are developers and both just donated our entire weekends on major performance improvements. Other volunteers have been working on improving the example scenes and answering questions here.

    After UMA 2 is shipping we can look into some sort of bounty or donation system to aid funding the documentation, but unless you have very deep pockets paying a programmer to write documentation instead of code (that they're doing for free) just doesn't make any sense.
     
  36. GMagnetic

    GMagnetic

    Joined:
    Dec 8, 2014
    Posts:
    23
    Thanks, that works fine for preview with fbx characters, but does not work with the Power Tools UMA characters, it will not accept a character of that type as a drop into the field, fbx types drag and drop just fine.
     
  37. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Thats to bad, good to know thats it not working though.
    UMA should play perfectly fine with all Mixamo animations though, you could download some of the free ones just to make sure.
     
  38. AlanGreyjoy

    AlanGreyjoy

    Joined:
    Jul 25, 2014
    Posts:
    192
    is there any tutorials on how to add your own characters?
     
  39. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Here we go =)
     
  40. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hey guys!

    Here are my latest results on updating UMA to work with Unity 5 standard shader.
    I've got all body textures, including my 3d scans, converted to the new standard and had been testing on different light conditions.

    I ended up testing mainly on the viking scene as it's more efficient on checking composition.

    This weekend I'll probably be able to work on the clothes and as soon as possible the resulting textures will be included at Git. Hair will be tricky and we might end focusing on LUX hair shader until unity provides something for the community.

    Cheers =)

    PBS_Test03.jpg PBS_Teste03_Day.jpg PBS_Teste03_Nightfall.jpg
     
    Teila and Paulohmm like this.
  41. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,629
    Looking good! :)

    As for using Lux, would it be just hair or hair, eyes, skin ...?
     
  42. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    I've started playing with LUX skin shader again, but I'll focus on Unity standard shader first.
    Right now I personally think Unity standard shader Metallic setup is losing too many channels (only R and A are being used) so if later I can get those unused channels to directly feed the extra LUX skin shader sss and AO, it would be great.
     
    Paulohmm and hopeful like this.
  43. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,629
    FernandoRibeiro likes this.
  44. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    I disagree with this. FYI I have an open source project of my own that's roughly 2-3 times as large as UMA, so I know what it's like. It's just a habit you have to get into, like unit testing. Long term it's better to write less code that's documented and usable, then more that no one can understand how to use. This is why projects often have requirements for docs/testing, because otherwise a lot of developers would just write code and leave it at that. None of us like writing docs. But it really doesn't take that long and the value added vs the code you would have written doesn't even compare.

    A bounty system is just fundamentally the wrong approach. It needs to be core to how the software is developed, because otherwise it just won't happen.
     
  45. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Warning to anyone on the Unity5Purge branch.

    We removed the RacePrefab as well as the SlotData run-time mesh dependency. Instead storing the mesh data in managed memory to avoid additional garbage generation.

    This means all current UMA2x SlotData must be selected in the project view when clicking the menu item "UMA|Optimize Slot Meshes". This will copy the mesh information into the SlotData. UMA1x SlotData is automatically updated when doing the "UMA|Find Missing References".
     
  46. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,629
    It's great to see that LOD issues are getting sorted with UMA.

    Do we also need a runtime ragdoll assignment function? I haven't messed around with ragdolls much yet, but my impression is that every solution involves setting up a ragdoll in the editor for a pre-made character model.
     
  47. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I think that would be a great idea... take a look at what this guy made, it should work for UMA right out of the box. And as he writes in the last part it should be possible to recover even better now that Unity gives us more control over the animator.

    http://perttuh.blogspot.dk/2013/10/unity-mecanim-and-ragdolls.html
     
    hopeful likes this.
  48. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Important request we need your help! (It's free!)
    In UMA2 we've been doing a lot of optimizations. And we managed to get spectacular speed gains. A lot of this is optimizing how UMA works, but a lot of it has also been to avoid generating garbage. Garbage is temporary memory that we discard quickly and such force the garbage collector to be run. The garbage collector typically spends 10-15ms cleaning up. This often turns into a performance spike which is super annoying.

    We're down to generating 750kb of garbage per spawned uma character. While this is less than half what UMA 1x generated it's still a lot of garbage. We learned that one simple set of API methods could help reduce the remaining garbage to a whooping 250kb of garbage. So we're talking about removing two thirds of the remaining garbage after we carefully picked through the source and did our best to optimize it.

    If you care about UMA performance please vote for this suggestion.
    http://feedback.unity3d.com/suggestions/allow-mesh-data-to-have-a-length
     
    hopeful and FernandoRibeiro like this.
  49. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    i voted with all points. this predicting garbage reduction is amazing and would be really cool when this happen. however i suggest to contact with unity staff directly and explain potential benefit to this change. You see feedback section is practically dead and Discussion section is probably better for feedback ^^. I think there is chance that they add this with runtime blendshape and contact with @Mecanim.Dev might be good start, he is relatively active in forum, however As far as i remember you are former unity staff, probably you know better who is more appropiate...
     
    FernandoRibeiro and hopeful like this.
  50. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    I'm using uma 2 from a couple weeks back, are there any performance related changes that would make it worth updating, and how stable is the current code?

    Would be nice to get some releases thrown out when you guys hit relatively stable spots along the way to an official release. If you aren't a developer you have no clue if it's a good/bad time to update.