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

    DirtyHippy

    Joined:
    Jul 17, 2012
    Posts:
    224
    Great. I've actually made no internal changes. I simply wrote a layer on top of the existing API. I had to work around some issues (e.g. adding an additional queuing mechanism on top of UMA's, since if you queued a change to a model that was already being processed it would get lost, stuff like that). I didn't use any of the dynamic avatar stuff, or crowd generator, or whatever else was included mainly as a way to showcase samples. I basically just wrote my own layer on top of the base API.
     
  2. mwituni

    mwituni

    Joined:
    Jan 15, 2015
    Posts:
    345
    Thanks all for the hard work.
    UMA 2 is looking good.
    How long is the piece of string left? ... ie. when is release due?

    Also ... Is there any concept of LOD built in?
    As most characters are normally at a distance, it makes sense to have LOD ... perhaps even 3 stages plus billboard.
     
  3. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,629
    @mwituni, Simple LOD - a relatively inexpensive asset - seems to work pretty good for UMA mesh decimation at runtime. UnLogick has been adding a form of texture LOD to UMA, I believe.

    I don't think you're going to get billboard, though.
     
  4. Sliceandkill

    Sliceandkill

    Joined:
    Dec 2, 2014
    Posts:
    89
    Can anyone please tell me if there is any way you can use hair with transparency? I made a mohawk but I can't get it work right in unity
     
  5. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    You need to correctly set the material sample and texture names as described here:
    UMA support thread - using custom shaders
     
  6. kreston

    kreston

    Joined:
    Sep 3, 2014
    Posts:
    7
    Hello there, i'm trying to create a new slot for male avatar. I have set everything and slot verification works. But when i'm trying to create slot through material builder i get this error :

    ArgumentNullException: Argument cannot be null.
    Parameter name: key
    System.Collections.Generic.Dictionary`2[UnityEngine.Transform,UnityEngine.Transform].TryGetValue (UnityEngine.Transform key, UnityEngine.Transform& value) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:588)
    UMA.SkinnedMeshAligner.RecursiveFindBoneInHierarchy (UnityEngine.Transform bone, UnityEngine.Transform hierarchyRoot, System.Collections.Generic.Dictionary`2 boneMap)
    UMA.SkinnedMeshAligner.RecursiveFindBoneInHierarchy (UnityEngine.Transform bone, UnityEngine.Transform hierarchyRoot, System.Collections.Generic.Dictionary`2 boneMap)
    UMA.SkinnedMeshAligner.RecursiveFindBoneInHierarchy (UnityEngine.Transform bone, UnityEngine.Transform hierarchyRoot, System.Collections.Generic.Dictionary`2 boneMap)
    UMA.SkinnedMeshAligner.RecursiveFindBoneInHierarchy (UnityEngine.Transform bone, UnityEngine.Transform hierarchyRoot, System.Collections.Generic.Dictionary`2 boneMap)
    UMA.SkinnedMeshAligner.FindBoneIndexInHierarchy (UnityEngine.Transform bone, UnityEngine.Transform hierarchyRoot, System.Collections.Generic.Dictionary`2 boneMap, System.Collections.Generic.Dictionary`2 boneIndexes)
    UMA.SkinnedMeshAligner.AlignBindPose (UnityEngine.SkinnedMeshRenderer template, UnityEngine.SkinnedMeshRenderer data)
    UMAEditor.UMATextureImporterUtil.CreateSlotData (System.String slotFolder, System.String assetFolder, System.String assetName, UnityEngine.SkinnedMeshRenderer mesh, UnityEngine.Material material, UnityEngine.SkinnedMeshRenderer prefabMesh)
    UMAEditor.UmaTexturePrepareWindow.CreateSlot_Internal ()
    UMAEditor.UmaTexturePrepareWindow.CreateSlot ()
    UMAEditor.UmaTexturePrepareWindow.OnGUI ()
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

    What might be the problem? Rigs rotation etc. Everything seems fine.

    BTW i'm using UMA 2
     
  7. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    It can't find one of your bones (or any of its parent tree) in the rig for the prefab. Did you rename the bones in your rig?
     
  8. Sliceandkill

    Sliceandkill

    Joined:
    Dec 2, 2014
    Posts:
    89
    Just had this problem earlier. There seems to be one or more problems when creating slots from fbx files exported from maya.
    To get it work, I exported the FBX from Maya, imported in 3DS max, changed absolutely nothing, then exported. Hope it helps you


    Where I can get UMA 2 btw?
     
  9. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    UMA 2 has not been officially released, but you can (always) get the current code from github at https://github.com/huika/UMA - there's various advice for getting things upgraded on page 45 of this thread, but don't try it in anything you haven't backed up. If you aren't comfortable dealing with github I'd guess a new Asset Store release will happen in the next couple weeks.
     
  10. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    If either of you has an FBX that seems correct but has this error that you're able to send me I can look into what's going wrong with the slot creation.
     
  11. Sliceandkill

    Sliceandkill

    Joined:
    Dec 2, 2014
    Posts:
    89
  12. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Thanks. The issue is what's set as the root bone in the SkinnedMeshRenderer. In the working helmet it's set to the neck bone, but in the boots it's set to "UMA_Male_Rig", which is above the "Global" bone that UMA considers the root of the hierarchy. We can probably fix this in the code pretty easily, but in the meantime if you make sure the root bone is set to something below Global it should work. Unfortunately this doesn't seem to be settable in Unity's importer, and I don't personally know how Maya or Max choose what it should be.
     
  13. Sliceandkill

    Sliceandkill

    Joined:
    Dec 2, 2014
    Posts:
    89
    Thank you. But until I find how I can choose the root bone, I will continue to re export them from Max
     
  14. kreston

    kreston

    Joined:
    Sep 3, 2014
    Posts:
    7
    I have found the same thing. When i export from blender it sets skinned mesh renderers root bone to Global
    but it should be set on Hips. And i couldn't find how to set root bone in blender when exporting :(
     
  15. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Global should be ok, as long as it isn't above Global. Is the root set to Global on the model you're having trouble with?
     
  16. kreston

    kreston

    Joined:
    Sep 3, 2014
    Posts:
    7
    Yes root is set to global and when it comes to FindBoneIndexInHierarchy (SkinnedMeshAligner.cs:33 ) method it cant find the Hierarchy i guess. A null bone is coming and code execution stops.

    I've tried with working slots and log the code to see the Hierarchy. It always starts from Hips.
     
  17. GMagnetic

    GMagnetic

    Joined:
    Dec 8, 2014
    Posts:
    23
    We're thinking of cutting over to Unity 5 and UMA 2.

    Are there particular areas that are still works in progress, with the rest relatively complete, or is the work to be done more spread out?
     
  18. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    The most incomplete/tricky part is updating your existing content for UMA2, but if you're starting from scratch that isn't as big of a problem. You should go for the most up to date branch, DeathToScriptableObjects. I haven't heard of any UMA2 specific issues, other than upgrading itself, but that doesn't guarantee something won't come up in testing that requires breaking changes. Going between different branches of UMA2 will cause trouble because asset formats changed, so if you do that be warned that you'll probably need to recreate slots and overlays each time.
     
  19. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    You cannot change the model importer prefab... but you can create a new prefab that clones the model importer one (drag to scene then drag to new prefab) and on that prefab you can set the rootbone and finally use the material builder normally. On the other hand I suppose we could fix the issue, it sound kinda trivial to test if there is a child/parent called global. :)
     
  20. Sliceandkill

    Sliceandkill

    Joined:
    Dec 2, 2014
    Posts:
    89
    Thank you!
    One more thing. I'm working on some sets of armor right now for asset store. It's a bad idea to publish them using Unity 5? Should I use a 4x version?
     
  21. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I believe the Asset store will now allow you to version your packages so that Unity 4.x sees one version and Unity 5.x sees another. That would be my advice. However if you have to choose I would definitely go for a Unity 4.x version. It is possible to upgrade UMA1x content to UMA2x, but as a publisher that is not a hazzle you wish upon your customers. On the other hand I don't believe anyone will be using UMA1x with Unity 5.
     
    FernandoRibeiro likes this.
  22. Suraia

    Suraia

    Joined:
    Oct 20, 2014
    Posts:
    16
    Hello,

    After I've finally got my slots and overlays to work I ran into my next challenge.

    I'm trying to create hair for my female model using a transparent texture, but the transparency doesn't show when I run the game. To test it out I used the serialized scene and I changed the hair of the female model.
    This is the result.


    Here also a sceenshot of the Material Builder thingie I used to make this slot and overlay.

    I hope that someone can help me and tell me how I can make the black in this picture go to transparent.

    Thanks in advance
     
  23. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    You need to make a material sample for the slot which uses the shader you want. The UMABaseShader doesn't support transparency. For example the built in FemaleEyelash slot uses the TransparentTwoSided shader.
     
  24. Suraia

    Suraia

    Joined:
    Oct 20, 2014
    Posts:
    16
    Thank you Ecurtz. I'll look into shaders then.
     
  25. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,629
    It occurs to me that if you are really needing to get billboarded UMA figures in your game, it might be possible (in a limited way) using this store asset (or some technique like it): https://www.assetstore.unity3d.com/en/#!/content/17660
     
    mwituni likes this.
  26. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    You only need billboards if you want to go above 100 chars on pc... below that lod atlas resolution is enough.
     
    hopeful likes this.
  27. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    UMA 2 - Unity 5 Physical Based Rendering

    This is a 120mb heavy duty web player that requires real hardware to run! If you're on a laptop please make sure your power cord is connected so your GPU have full juice!









    Credits
    UMA pbr textures - Fernando Ribeiro
    Chainmail pbr set - Will Barry
    Female Poor pbr set - Will Barry
    Viking pbr scene - Unity

    Special thanks to
    Eli Curtz

    Webplayer link

    Enjoy!
    Joen Joensen - UnLogick
     
  28. Sliceandkill

    Sliceandkill

    Joined:
    Dec 2, 2014
    Posts:
    89
    Looks really great!
     
  29. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,629
    It does look nice ... but two requests. One, add a FPS reading, and two, if it's not too difficult, add the facial animations.

    I don't know if it is the new shader or the lack of blinking, but the UMAs look a bit doll-like especially around the head.
     
  30. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I keep wanting to add UMA into my project but it just seems to somehow get more complicated and less documented as time goes on. Is that one little Newbie page on the wiki really the only documentation? I've grabbed the latest UMA2 build from github, and I'd like to put, say, a guy with a blue shirt in a scene. Is there an easy way to do this? I'm thinking I have to create a bunch of empty game objects and put scripts on them like UMAContext and RaceLibrary and SlotLibrary (couldn't these be prefabs?), duplicate a bunch of prefabs from different example scenes in order to get a character, duplicate the scriptable objects they're pointing to like the recipes, change the duped prefab to point to the new duped assets, clear the DNA and slots in the inspector and then add one for a blue shirt?
     
  31. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    It's true that UMA needs a few components in your scene. But aside from that it really is quite simple. I recommend opening a demo scene, select the UMA gameobject in the scene and copy it to clipboard, then open your scene and paste.

    I agree it adds to the learning curve but while we could remove this particular hurdle there is no way around the fact that a character system like uma does require some learning.
     
  32. cyby89

    cyby89

    Joined:
    Apr 30, 2014
    Posts:
    35
    This looks amazing! Thanks for everybody who made this possible.

    Do you release the LOD system? 100+ character are just awsome
    Do you haven an ETA of the new Unity5 shader?
     
  33. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    The only reason I didn't add facial animation is because I feared the overhead... I can LOD the textures, I can even filter out slots at a distance, for instance I remove the eyelashes since they require their own drawcall, I could also make sure the facial code only worked for nearby characters, but I cannot change the animation controller, and so to add facial animations I would either have to write some fancy code that allows me the change the animation controller to a non-identical one, or accept that all 120 animators used masks and layers.

    I could of course stop animators in the distance, but since the characters follow their root motion they would then be stuck out of range and never follow the path through and return. :)
     
  34. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I plan on releasing the LOD system soon, and it can handle a lot more than 100, in the webplayer it's checking LOD levels of all 100 characters each frame, but if you want truly massive numbers you can configure it to do it only once per second or similar.

    I will add a video on how to control the LOD steps. It's quite basic changing the atlas resolution and setting up slot/overlay replacement rules. I'll also release the crude path finder that I created for the demo. As you can see the avoidance system is flawed and the characters can get stuck both on the world and on each other, but it may inspire you to build a better system on top. It's not a selling point it's more of a gimmick on top.

    I believe UMA 2 is ready and we'll be making a release shortly.

    The Unity5 shader is already released! We're using the standard shader!
     
  35. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    Pics looks awesome ;) Im unable to see weblpayer though, error with compression even i have newest unitywebplayer.

    just wondering: LOD system will be part of what? UMA/Power Tool/or will be separate extension?
     
  36. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    It will both be part of the power tools, but I will also make it into a seperate extension.
     
  37. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    any estimate on price?

    btw error is probably caused by no graphic card for webplayer, actually trying to fix this but on nvdia optimus this is harder than expected
     
  38. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Looks wonderful, UnLogick! You guys did a great job and I love seeing Will's UMA outfits on the characters. Thank you so much for sharing with the community. Looking forward to the release and to your assets.
     
  39. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,629
    This is an interesting real world game developer problem. I wouldn't expect you to solve it, but if this demo is going to be used for the next year or so to show off UMA2 what you could do is include the facial animations and then have a toggle so that mode can be turned on and off. Then we can see how the FPS varies when facial animations are on / off.

    Anyway, it's just a thought. Maybe it's not all that important. I see getting UMA2 done as a muuuuuch higher priority, and the demo does a great job of showing off the basics. :)
     
  40. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    At this point it would be pretty easy to modify one of the crowd scenes if you wanted to test the performance of the facial animation stuff. The overhead shouldn't be terrible, but it is still on my list to look at optimizations for in 2.x. In the "real world" I'd probably only enable it when you were pretty close to people and just include Mecanim data to animate the head, eyes, and jaw for background characters, at least until it's further optimized.
     
    Last edited: Apr 5, 2015
  41. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I don't mind learning; I just think UMA badly needs either documentation or a more intuitive menu setup. For instance, there is a menu item for Game Object -> Other -> UMA -> Dynamic Avatar, but that doesn't really work unless you have all the requisite other game objects in there first, but none of them are in the Game Object menu, and it's not really clear which ones you need, since there's no prefab for it in the prefabs folder either. There doesn't seem to be a way to make a "new" version of any of the ScriptableObject assets either other than duplicating and existing one, adding it to something, and then clearing it, which is also weird. There should be buttons like "Create New Recipe" or "Create New Slot Item". In the Component Menu, there are two different subfolders for UMA stuff, but half of the UMA components aren't in either of those subfolder, they're in the main Components/Scripts menu.

    There are also a lot of things that are still very unclear to me even after browsing the code and the demo scenes, like how to handle something like attaching an object/component that isn't a "slot" to a particular bone in the skeleton... with a regular prefab you'd just drag it on there; I'm guessing with UMA you would need to search the generated hierarchy by name for the particular transform after generation, but then do you have to redo that any time you switch a slot? Does that cause the whole skeleton to be destroyed and regenerated?

    I don't want to sound too harsh since there do seem to be some amazing features hidden away in there and it's clear that a huge amount of work has gone into all the code, but just a small amount of documentation or in-editor presentation would go a looong way. I know doing documentation or UI sucks but there must be someone out there who's willing to put a couple of hours in.
     
  42. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Most of this stuff is in the Assets/Create submenu (assuming you're talking about UMA2).
     
  43. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    As Eli said, these are in the Project View Create submenu. :)

    In UMA2 we decided to scrap the race prefab and keep the bone transforms. This means that if you add a sword to the hand in UMA2 it will stay there. :)

    When you point a finger towards someone else, you got four fingers pointing at yourself. Thanks for volunteering. :p

    Seriously we're not a big team we only have 3 major contributors, so please don't expect us to do more than we're already doing. And don't go expecting someone else to fix this for you, only one way to get it done.
     
  44. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Well I don't want to start a fight, but I see this response repeatedly every time someone mentions the lack of support, and to me it reads like "UMA is far too complicated to document and the amount of time it would take to explain how to use it is so enormous that no one working on it is willing to even try." And that sentiment drives away all but the most die-hard of potential users. Even a few hours spent to write a paragraph or two about how to accomplish basic tasks could reap dividends for you guys, in that you'd actually have more users who don't run away in terror from the initial wall of complexity, and who would then be able to write tutorials or contribute to the code base. Maybe you could set up a documentation fund; I would pay money to get an actual doc. I don't think the current year-and-a-half long trend of just praying that someone else will write the documentation for free is going to work.
     
  45. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Everyone admits the docs are incomplete, but there are a half dozen example scenes, and hours of video, and a wiki, and a Skype group, and a 2300 post forum thread, so it isn't like there are zero resources available for learning how it works. Your specific example would probably be outside the scope of the documentation anyway, since it involves adding non UMA stuff to the character. Did you spend the 2 minutes to try it and see what happened?

    While I'd love it if the documentation was more complete I personally feel that UMA 2 is well worth the small investment of time needed to learn its quirks. Every major contributor (by which I mean the massive group of Fernando, Joen, and myself) has explained why they won't be doing serious documentation updates in the near future, but we're happy to help anyone else who wants to organize such an effort.

    In fact, people may be overestimating the complexity involved in UMA. While there's lots of code, at the core UMA boils down to having an UMAData component, giving it some DNA, adding a list of Slots to its umaRecipe, and adding the list of Overlays that build up the textures to each of those Slots. Then you set the UMAData's reference to the UMAGenerator and call UMAData.Dirty(); Everything else... UMAContext, SlotLibrary, OverlayLibrary, Crowd, RandomSet, etc. is essentially just example code to help you get started with setting up scenes, serialization, building recipes, and customizing the results.

    I've personally begun adding Intellisense style commenting to the core files, however that won't be complete prior to the release of UMA 2. That's a small step toward generating a scripting reference, which will help the coders, but less help to beginners trying to find their footing. Once again I encourage everyone who would like UMA to be great to also contribute in some way. That can be as simple as adding a few pages to the wiki or adding to my commenting effort. Like all open source projects UMA only gets better with the help of everyone. "We" aren't praying that someone else will write the documentation, because "we" don't exist, we're just the portion of us that have been donating our time and effort to the project.
     
  46. DirtyHippy

    DirtyHippy

    Joined:
    Jul 17, 2012
    Posts:
    224
    Is the animator still destroyed and rebuilt after DNA changes in the newer 2.x versions?

    I have everything working fine with the existing behaviour. It bugs me a bit though, and I was hoping Unity 5 provided a mechanism for avoiding this :)
     
  47. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    I'm afraid so. There's nothing we can do about it unless/until they provide a way to update the Mecanim avatar without recreating the animator. It does a decent job of maintaining the animation state at this point though.
     
  48. Urbanwarfare-Std

    Urbanwarfare-Std

    Joined:
    Jan 6, 2013
    Posts:
    33
    That looks reallygreat! I've been working with Will Barry for our GK models :) which I now have setup with a Ragdoll.

    I wondered what would be the best approach to start creating custom animations that will work well with my UMA generated rag dolled prefab (I used power tools to create the prefab), should I setup the standard male mesh (on which my GK is based) and use that to create the animations using rigify or is there a more preferd method or perhaps something I can download which I could then use as a starting point.

    Appreciate any advice/help in advance.
    Simon
     
  49. Urbanwarfare-Std

    Urbanwarfare-Std

    Joined:
    Jan 6, 2013
    Posts:
    33
    Regarding the documentation - is it purely a question of time (you just don't have enough in the day) or if funding could be found would you guys be able to find some time (reduce your hours at work, send your wife/girlfriend to a spa so she leaves you alone for a few days). I personally think you are just the kind of group/project that would do well on Kickstarter?

    You have a good core product, you have good material above for a good trailer video.

    You can set your goal relatively low, think of some features you could add if it does really well (pay to expand your team/perhaps unity would get involved to work with you on bugs). It's just a suggestion as the product will be finished either way but the funding would really be helping to polish and make UMA even stronger? I think most people on here using it would back you some and hopefully it would snowball (plus you could guarantee keeping UMA free to use for a bit longer?)

    Like I said just a thought?
     
  50. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    UMA is free. There are assets and utilities available on the Asset Store, including some by contributors to the core product, but none of those are required. The base core of UMA, all of the code and source art on github, are now and will stay free.
     
    FernandoRibeiro likes this.