Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. green_enigma_games

    green_enigma_games

    Joined:
    Jan 25, 2014
    Posts:
    3
    Thank you so much for the help! I now have it up and running, and it is fantastic! Can't wait to check out the other videos and really delve into this project. Phenomenal work! The fact that you are providing such an amazing asset to the community for free, says alot. Thank you!
     
  2. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    I can confirm both of these errors. They happen as soon as you import the Tutorials package into a clean UMA project. I've tried several times, starting from scratch, with the same errors coming up each time.

    @Fernando: I know you pointed green_enigma_games to the first video tutorial posted here in response to this, but I just watched it again, and there was nothing in it that addressed these errors. There seems to be a problem with the ExtraGUI.cs script that is included with the Tutorial package. While it's quite easy to just delete the script and watch the included videos without it, you should really address this issue, so that the Tutorial package works as it was intended. In case it matters, I am running Unity 4.3.2, and using the latest UMA build (1.0.10.0). Here are some screen caps of the errors:

    $Error1.PNG
    $Error2.PNG
     
    Last edited: Jan 26, 2014
  3. Malwallace12

    Malwallace12

    Joined:
    Jul 19, 2013
    Posts:
    7
    Hey, guys. I finished my GUI coding and now I would really like to add skin and hair color sliders. Has anybody already done this or does anyone have any ideas for accomplishing this? I have no idea how to go about it. I'd be very grateful for any kind of assistance. Thanks. :)

    Also, thank you for creating this wonderful asset!
     
  4. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hi there!
    I´ll test it today. It might be the case latest updates on UMA itself broke the integration with tutorial. I´ll take a look and correct it as soon as possible.
    We are defining a standard day to handle UMA updates to avoid this kind of problems, as now we have more people contributing and many changes going on.
    Cheers
     
  5. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hi there! =)
    The helper assets on AssetStore handle that, but if you wan´t to implement that yourself, I would recommend keeping track of slots and overlays indexes, so they can be changed later. Use OverlayData.SetColor() to change the color of the overlay, and update atlas calling umaData.Dirty(true,true,true);
    Cheers!
     
  6. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hi there!
    There has been a small change to Save on UMA latest version, the line generating error should now be
    asset.Save(avatar.umaData.umaRecipe, avatar.context);

    I´ll update the tutorial files right away.
    Cheers
     
  7. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hi there! Found the problem :)
    Please take a look on above posts.
    Sorry for the inconvenience!
     
  8. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225
    Looking at your facial rig, how are you handling eye lids? I see the eye brow bones but not one that opens and closes the eyes (unless I am missing something).
     
  9. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Their names are Left/Right UpperLid and LowerLid, you can see those in action here:
     
  10. qarchi21

    qarchi21

    Joined:
    Jun 29, 2013
    Posts:
    3
    how do i go about making new animations for the uma's.

    do i do it separately i.e for males and females or is there another way to do it? i have no idea o_O
    i heard something about mechanim? i have no idea what it is exactly (all animation stuff i have done is maya and legacy stuff)


    thanks
     
  11. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hi there!
    I really recommend you learning about Mechanim first... And I won´t be able to help you on that, but there are many tutorials available.
    It´s a good idea taking a look here: http://unity3d.com/learn/tutorials/projects/stealth , as it covers both mecanim/input and many other important concepts.
    Cheers
     
  12. Malwallace12

    Malwallace12

    Joined:
    Jul 19, 2013
    Posts:
    7
    Hey again. I only need UMA to generate humans, without the pig-nose or elven ears. Is there any simple way to remove those posibilities? I've tried deleting the code for those slots and overlays under the UMACrowd script and removing the slots and overlays from their respective libraries and I'm still getting characters who try to generate with those parts, which results in the error:
    UMAResourceNotFoundException: SlotLibrary: Unable to find: MaleHead_ElvenEars
    SlotLibrary.InstantiateSlot (System.String name) (at Assets/UMA/Example/Scripts/SlotLibrary.cs:78 )
    UMACrowd.DefineSlots (.CrowdRaceData race) (at Assets/UMA/Example/Scripts/UMACrowd.cs:124)
    UMACrowd.GenerateOneUMA () (at Assets/UMA/Example/Scripts/UMACrowd.cs:530)
    UMACrowd.OnGUI () (at Assets/UMA/Example/Scripts/UMACrowd.cs:76)


    What can I do to solve this? Thanks. Sorry if this is a really stupid question.
     
    Last edited: Jan 26, 2014
  13. qarchi21

    qarchi21

    Joined:
    Jun 29, 2013
    Posts:
    3
    thank very useful :) by the way what you have done is amazing, want to do the same in some way one day :D
     
  14. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hi there!
    In fact UMACrowd has been changed so it now first look for the "randomPool" elements, and if any exist, it bases on those to generate the avatars. If you change UMACrowd code but keep the randomPool sets, they will be used instead of the code.
    You can see what those elements hold at Example/RandomSets.

    You´re getting the library error because the RandomSet still asks for those ears, even if you changed base code. If you change the RandomSets or set randomPool size to zero, you should be able to correct that.
     
  15. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Thanks :)
     
  16. Malwallace12

    Malwallace12

    Joined:
    Jul 19, 2013
    Posts:
    7
    Thank you for putting up with my stupid questions, that worked perfectly. xP
     
  17. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182

    Crud...I will need to look at these too...especially the new concept of the crowdOverlayData. I have to say they is not a single comment in UMACrowdRandomSet.cs although it looks like I can wrap my current efforts in these serializable objects without too much fuss.
     
  18. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Sounds like a good idea. Does this mean you'll get the changes out to the other UMA developers on the Asset Store far enough ahead of time for them to all test and update their packages if needed? That would solve a lot of problems. It would also give them a chance to update their product descriptions to indicate that they've been tested with the latest version of UMA, eliminating some of the guesswork when users update.

    By comparison, right now, I usually wait a week after an update is released before trying it, to see if anyone has problems, and I STILL sometimes get caught, so this will be a welcome change.

    Just tried your change. Works brilliantly. Thanks!
     
    Last edited: Jan 26, 2014
  19. mikezenox

    mikezenox

    Joined:
    Oct 18, 2012
    Posts:
    55
    Sorry to spam but would anybody be able to give me some direction here?
     
  20. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Make sure the rotation matrix for the mesh on export is correct. Also, try copying a slot and setting it up manually (as in the video tutorial). That rules out using the wrong skinned renderer for bone reference in the builder.
     
  21. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    @Fernando

    After working through the weekend to set our pipeline for assets I feel I have to strengthen my request for a fix for the rotation "problem" in UMA. I would really, strongly suggest that you and the steering group address the issue in some way before UMA gets much more traction in terms of custom content.

    While I fully understand wanting to use Blender and the implications it has had on the base assets, reality is that as far as I am aware, Blender is the only app which messes up rotations in the way it does. I would guess that users of all other 3D apps will have to take extra steps to get new assets exported properly for UMA.

    In our case it quickly becomes a PItA when going back and forths to adjust weighting in relation to the base mesh when configuring the avatars. I have not yet tried setting up dummy rotations (which may help us avoid having to rotate the object twice per change/export), but regardless the incompatibility will likely be a problem for quite a few new users that are not very experienced.

    Again, no criticism at all. Merely a (firm) nudge to consider this to ensure that you have a solid base going forwards. :)
     
  22. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    I haven't tried this yet myself, so excuse me if I'm missing something here, but I've watched Lane's video on creating assets in 3ds Max a few times, and he didn't seem to have any rotation issues, either bringing the base meshes into Max, or exporting the finished assets back to Unity. I've seen a lot of posts about unit and axis conversion when importing/exporting, but Lane seems to have covered all of this in his video, and it didn't look like a big deal using his workflow. Unit and axis conversions are always an issue when importing and exporting assets from different sources, but as long as you consistently follow the proper conversion recipe, they can usually be managed. Are there still problems that he didn't address? If not, I think the developers should focus on properly documenting the correct procedures for doing this, rather than changing UMA, which could end up breaking a lot of existing assets.

    As I said, I haven't tried this yet, but am preparing to soon, so if there is still a big issue here, I'd like to know about it before I get too messed up.
     
    Last edited: Jan 27, 2014
  23. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    I have to agree i watched the 3dmax video and there seemed to be no reason to go back into blender. Can the author and fernando please confirm this workflow does not need blender?
     
  24. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    Has anyone looked at amplify large texture. Could this help uma produce higher quality textured avatars?
     
  25. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Well, I may have spoken too soon as it may well be that this is not an issue, if the material builder is used to create the slot. I have been consistently hit by the axis problem during the weekend in a predictable manner, but that was using the (presumably old) workflow of duplicating a slot and setting it up manually.

    I will know in a few minutes. :)
     
  26. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Well, using Material Builder to create the slot does solve the rotation problem but it seems to mess up the lighting on the model instead. Sigh.
    This is what happens:
    - I have a rigged and imported mesh that looks good in the scene and inspector.
    - I assign the various slots in the Material Builder and hit Create Slot.
    - The lighting on the model (both the new slot asset and the original imported asset) has now changed and is no longer working properly (it looks like a normal mapping problem).

    Granted, I did not find any good information on how to properly use the Material Builder to create a slot (the tutorials I found used the manual approach). So I may be missing something.

    I would really appreciate some insight into this. It seems hard to find a workflow without issues.
     
  27. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,524
    There is no need to go back to Blender with a 3ds max workflow but in this thread read kmvassey's posts for more info about problems that there could be with import/export.

    I have not tested without using the material builder so this may be true but there's really no reason not to use the material builder. UMA likes it more, its faster, fixes your textures, less room for error, etc..
     
  28. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    So you use the Material Builder when creating new slots? I have to check your tutorial and see if you have included it in the video. It may be that there is a setting I have missed. It does create a mesh that is properly rotated without me having to offset it manually in C4D. However, as mentioned, it throws off the normals for some reason. (Duplicating a slot and setting it up manually works well, so there is no model issue).
     
  29. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hi there!
    I´m aware of more one developer with the same problem. I´ll have time to handle that today.
    As soon I have news, I´ll update here.
    Cheers =)
     
  30. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,524
    I don't have C4D but I'll look into the normal inversion issues tonight and see if I can repro.
     
  31. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    We have the same problem both for 3dMax and C4D users, so I´ll find out what´s wrong on UMA side.
     
  32. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Thanks!
    I just watched your tutorial and other than setting the rig to legacy there seems to be no difference. I tried that as well, but it did not help.
    See the attached pics of the source model before and after using the Material Builder. It is not only the slot that gets messed up, the imported model gets messed up as well and has to be refresehed/reimported (pure FBX or converted C4D does not matter).

    Please note that the resulting model looks as if it is no longer reacting to light direction either. It may be a normal problem but I am not sure. Something really strange is going on.
     

    Attached Files:

  33. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Thanks for the confirmation. I was starting to think it was ignorance on my end. :)
    Please let me know if you need any assistance / testing / info.
     
  34. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Are you available to help me on a simple test? At materialBuilder, try using the cloth skinnedMeshRenderer both on race and slot mesh.
    If you would agree, you could also send me the mesh (no need for textures) and I´ll test it here.
     
  35. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Yep! Give me a couple of hours, have to run a few errands.
     
  36. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    You don´t need to test that anymore, we´ve found the problem =)
    While problem isn´t fixed on source code, please be sure you´re doing the step mentioned at 3:00, to attach the cloth into base mesh. This should avoid the area of the code where the bug was identified.
    Cheers =)
     
  37. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Just to be clear: The problems is not associated with the rigging as far as I can tell. The animations will work fine on C4D content converted into a slot using the Material Builder. What does break is the normals/lighting, so something is going wrong during the mesh calculation.

    As for the 3ds max tutorial, C4D handles skinning differently. The bones/joints do not reference meshes. The meshes are deformed using a Skin modifier, which in turn gets information from a Weight "tag" (operator) that holds information about the bones hierarchy and all weights. So there is nothing to attach the mesh to. Again, the animation works fine and I doubt the lighting/normals issue is related to the rigging.

    Also, the exact same mesh looks great using the old "duplicate slot and edit" method.
    Any ideas what might be causing it?
     
  38. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    The problem lies on SkinnedMeshAligner.AlignBindPose, It´s called on MaterialBuilder, and it´s generating the normal problem in case the mesh bones alignment don´t match the base model.
    Looks like Lane managed get the bones matching, so he don´t get the problem on normals.

    Is there any way to attach two meshes together on C4D? You need to be sure your mesh rotation matches with the baseMesh rotation values, this way you avoid the bug until it´s fixed.
    Sadly SkinnedMeshAligner.AlignBindPose is a part of the code I don´t fully understand so I will offer little help on fixing it.
     
  39. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Ah, now I understand. :)
    Since C4D do not attach a mesh to the joints, it will not magically fix the problem in the same way as Max seems to do. C4D has an indirect relationship between joints and meshes. (A mesh has a weight tag that defines its weighting and a skin deformer - it ties into the C4D philosophy of being non-linear).

    However, I might have a workaround to solve the issue. (Which again seems to be caused by the fact that the rig is rotated away from 0,0,0.. :p ;) ). I will test it and post soon. :)
     
  40. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Ok, I have narrowed it down. A bit obscure and probably not relevant to anyone not using C4D but the trick to make a mesh work with UMA is to do the following:
    - Rotate the mesh to 0,-90,180 as mentioned earlier
    - After transferring weights and adding the skin modifier, make sure to hit "Set Bind Pose" on the Weight tag.

    If the last step is skipped the Skin modifier will will not respect the (uncommon) orientation of the bone rig and will get its normals messed up when converted into a slot.

    The technical difference (I would suspect) between setting bind pose and not setting it is that it resets the Skin Deformer coordinate system so the Skinning data is in the same (rotated) coordinate space as the mesh. Before the operation the Skin Deformer is automatically oriented to counter the offset rotation of the mesh, which is likely why a conflict with the Material Builder script occurs.

    Oh, how I love 3D apps and different coordinate systems....... :)

    PS.
    Yes, I do know I sound like a broken record but if UMA is slated to become an integral part of Unity - it looks that way - then you might want to have a base rig that is properly rotated. Not sure how much work that would be, but it would probably be worth it. IMHO the more standardized things are, the better.
    Sure, there are often small tweaks, workarounds, issues to be considered when moving between apps or integrating content from different source (as someone mentioned). But precisely because of this I would argue it is important to try to eliminate them when possible. The small things to consider do add up.
    I personally have no problem with it - the problem is solved and our pipeline is set up and documented so we are good to go. I am merely arguing for the less experienced developers, which I would guess UMA is primarily targeted at.

    Anyway, point made (several times I admit) so I will humbly shut up about it after this. :)
    DS.
     
    Last edited: Jan 27, 2014
  41. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    I don't know C4D, but it seems the reason attaching the new mesh to the base mesh fixes this in Max is that this forces the new mesh's pivot to perfectly match the base mesh. You can then remove the base mesh and your new mesh will be correctly oriented. If you can't attach the mesh, is there a way in C4D to match the pivot position and orientation of one mesh to another? It seems that would fix it as well.
     
  42. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Not automatically as far as I know, although I must admit I have not searched for it. I have not encountered this problem before. If someone knows of an automatic function to do this I would be interested in hearing about it.

    However, aligning the new mesh with the base mesh is extremely simple as long as you know that you have to do it. The mesh pivot should be at origo and have the same rotation as the base mesh. Then the Weight tag should be instructed to set bind pose. Those steps will ensure that 1) the mesh has the "right" coordinate orientation and 2) the skinning data is properly oriented in that coordinate space and not rotated again.
     
  43. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hey =)
    As soon AlignBindPose is fully functional you won´t need those extra steps. About the crazy rotations, just rotating the avatar in one axis wouldn´t be enough, I would have a weird rotation in blender to match the other 3d software. This could have been done on beta stage, when I asked for feedback considering this kind of change, but it won´t be viable now considering we already have a huge number of people using those base meshes and following this standard.
     
  44. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Hi!
    Fair enough. As long as the Slot creator scripts will handle rigged meshes even if they have not been rotated, the actual orientation of the base meshes and reference rigs is mostly a non-issue. :)
     
  45. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
  46. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hi there! The tutorial has been updated at AssetStore, the corrections is now included :)
    https://www.assetstore.unity3d.com/#/content/14452
     
  47. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    Thanks. Looks like you've been busy. I guess if I go for that I'll have to spring for Dionysus as well. :)
     
  48. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    = DD
     
  49. adventurefan

    adventurefan

    Joined:
    Jan 17, 2014
    Posts:
    230
    Is there facial animation support included for these avatars? Thanks.
     
  50. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    I love to post this video :)