Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    UMA 2 is on the asset store.
    It's the top of the page, I thought I should repeat it here.

    Additional branches has been deleted, UMA 2 development is now happening directly in master branch. The uma122 branch is the latest uma1x development.
     
    Last edited: Apr 30, 2015
  2. mar0x

    mar0x

    Joined:
    Sep 22, 2012
    Posts:
    8
    I use for example:
    Code (CSharp):
    1. umaData.umaRecipe.slotDataList[13] = slotLibrary.InstantiateSlot("Male_Separated_Hand_Right", umaData.umaRecipe.slotDataList[4].GetOverlayList());
    Where slotDataList[4] holds the original body overlay. It still ends up with separate materials and thus multiple drawcalls. All slots and overlays in question are set to NoAtlas, and they use the same UMAMaterial.
     
  3. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    That's a bug and should be easy to fix.
     
    mar0x likes this.
  4. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Fixed all the stuff you mentioned except the WriteAllBytes. The fixes are available in the git master branch.

    Fixed in git master branch. Eli's fix of the shoulders has also been pushed to the master branch.
     
    mar0x and hopeful like this.
  5. tomi-trescak

    tomi-trescak

    Joined:
    Jul 31, 2013
    Posts:
    78
    First of all, great job on UMA2! Thanks for the continuous effort!

    The problem we are facing is the lack of documentation for UMA2. I have quite a few questions, so maybe they can become part of the documentation for you guys? Even though I am using UMA for quite some time with this new release I feel like noobie. Most of my questions relate to new expressions functionality, only some to general functionality.

    1. In slot definition, I cannot find the mesh, only significant amount of numbers, is that a decomposed mesh?

    Expressions

    1. I have to manually mark the animation as Legacy (in debug view) in order to be able to see this animation in the animation view (I also have to reopen the scene)
    2. You show an example of a serialised expression, I rigidly searched for how you achieved that and I could not find it.
    3. You mention that it is possible to convert this legacy animation to Mecanim ... but how? The Pose Tools are not very intuitive.

    Thanks!
    Tomas
     
  6. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Added to wiki:
    Slots no longer use Native Unity Mesh
    The Material Builder extracts the needed information from a Unity Mesh and then stores the resulting assets in mono arrays. This ensures the data is stored just how we want it and reduces garbage generation!

    Look at the characters generated in the expression scene, they have an expression player component. The expression player has a lot of floats that ties directly to the expressions, simply changing these values will change the expression! Unity supports animating ANY serialized field on your components, so you can create Legacy/Mecanim animations for these expression values and have the mecanim statemachine interpolate them for you. Since Expressions are meta data (Right Eyebrow raised) rather than actual bone/mesh animations you need the Expression Player to do the correct mesh manipulation for you. This is similar to how FaceShift, FaceFX and other expression suites handles this.
     
    hopeful likes this.
  7. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    Is there a way to save a UMA and bring into a new scene without powertools?

    Edit:

    Kinda solved. If anyone else may need help with this one, Joen explains it in this great tutorial:


    I'm not too certain how to make a prefab so the "UMA Scene" isn't required. Does anyone know how to accomplish this without waiting for the powertools update?
     
    Last edited: May 1, 2015
  8. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    If you have the power tools you can just grab the two files PowerToolsRuntime.cs and SaveCharacterPrefab.cs they work independently of the rest of the power tools. Alternately you can write your own code to do it. It takes knowledge of the Unity AssetDatabase but it's not that hard and I remember someone did it more than a year ago.

    Third option is to wait a bit longer, working on the power tools right now. ;)
     
    Richardm1985 likes this.
  9. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    It should have been automatically marking the animation clip as legacy in the editing scene and providing menu items for switching them back and forth between legacy and generic. There was a bug with the Unity version testing in the code (they removed the old method for changing the clip type.) Those will be fixed in 2.0.1 or you can get the files from github checkin b0b501a.
     
    Last edited: May 1, 2015
  10. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    I have a couple noob questions, that I couldn't find answers for in searching.
    I am using Unity 5.0.1f1 personal and UMA 2.0.0
    First it would seem the UMA Data linkage is missing in each of the Demo Scenes. It was my first look at UMA and after reading the wiki I still could not figure out what I needed to do, if anything.
    So, I already read, "The UMAData component is a run-time container for the plan of a UMA character. This is the class that you tell the UMAGenerator to process into a full fledged character! If you wish to procedurally build a character this is where you should look!"
    I just don't know what I should look at for an example, if there is one.
    Secondly, when I start each of the scenes, the models are uniformly through the floor. I don't see an obvious reason why. There are a few places with adjusted Y values, but no obvious this will tell the generator where to generate type of value; is there one?
    As an aside, the UMA Dynamic Avatar is also unlinked and outise of the UMAContext object its unlinked as well. I linked it in a couple and it didn't seem to have an effect.
    Just trying to get my head around what I am seeing in the example scenes, any help is much appreciated.
     
  11. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Sounds like you're in a bad state somehow. Perhaps there is a conflict with a previous UMA 1x package, or a third party library or something.

    You should try to create a new empty project and import UMA 2.0.0 clean from the asset store into that. Everything should just work smoothly. Once you have a working setup it is usually easier to tell what went wrong in your particular setup.
     
    boysenberry likes this.
  12. BaxtardWorm

    BaxtardWorm

    Joined:
    Nov 15, 2012
    Posts:
    37
    excuse someone can tell me how I can make other changes to the character or already experienced the locomotion diirgli so I know how to do jumps etc. but how can I create in a utonoma animations thanks in advance.
     
  13. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Yep, rebuilding the project starting with UMA 2 and so far so good. I still have empty values for UMA Data and UMA Context on the UMA Crowd script when not in play mode, but while playing the UMA Data gets filled in. I will be reading up more on Context now. It all seems to be working so far though, yay! Thanks for the advice.
     
  14. tomi-trescak

    tomi-trescak

    Joined:
    Jul 31, 2013
    Posts:
    78
    Hi

    I managed to run the expressions on my generated avatars, yet I still suffer with the open jaw problem. All my animations captured from XSENS suite come up with avatars having the jaw opened and look quite dumb, I was hoping that with expression editor I could force to close their jaw, but this is not a truth (the override mecanim jaw does nothing). How can I force to close the avatar's mouth? All the other expressions work.

    I've found on this forum that I can use "NoJaw" for new generated avatars, but what about the already generated ones? I have significant amount of already generated ones which I would like to use.

    Last question, do you plan on bringing the old interface to random sets? Using the default "array" interface is not very convenient. Thanks!
     
    Last edited: May 4, 2015
  15. tomi-trescak

    tomi-trescak

    Joined:
    Jul 31, 2013
    Posts:
    78
    I have another question. How can I minimise the bone structure of the avatar? Each avatar has a complete set of bones for face gestures, but most of my avatars have no expressions and no finger gestures. Can I somehow remove those?

    Related to this, when will powertools be available for UMA 2? Really missing save to prefab and older powertools do not work ;/

    Thanks!
     
    Last edited: May 4, 2015
  16. tomi-trescak

    tomi-trescak

    Joined:
    Jul 31, 2013
    Posts:
    78
    I have a last post. Material editor is not working in UMA 2. It is failing in creation of base textures "Base_Normal" and "Base_Specular" when subsequent import fails. When I manually create the base textures, then overlay creation fails on similar error and generated textures are corrupted.

    Also, using UMALegacyTransparent material for my hair leads to following error.

    IndexOutOfRangeException: Array index is out of range.
    UMA.TextureProcessPROCoroutine+<workerMethod>c__Iterator0.MoveNext () (at Assets/Standard Assets/UMA/Core/Scripts/TextureProcessPROCoroutine.cs:177)
    UMA.WorkerCoroutine.Work () (at Assets/Standard Assets/UMA/Core/Scripts/WorkerCoroutine.cs:70)
    Rethrow as Exception: Exception in WorkerCoroutine: UMA.TextureProcessPROCoroutine
    UMA.WorkerCoroutine.Work () (at Assets/Standard Assets/UMA/Core/Scripts/WorkerCoroutine.cs:74)
    UMA.WorkerCoroutine.Work () (at Assets/Standard Assets/UMA/Core/Scripts/WorkerCoroutine.cs:40)
    UMA.UMAGeneratorBuiltin.HandleDirtyUpdate (UMA.UMAData data) (at Assets/Standard Assets/UMA/Core/Scripts/UMAGeneratorBuiltin.cs:105)
    UMA.UMAGeneratorBuiltin.OnDirtyUpdate () (at Assets/Standard Assets/UMA/Core/Scripts/UMAGeneratorBuiltin.cs:138)
    UMA.UMAGeneratorBuiltin.Update () (at Assets/Standard Assets/UMA/Core/Scripts/UMAGeneratorBuiltin.cs:73)
     
    Last edited: May 4, 2015
  17. kimgod1142

    kimgod1142

    Joined:
    Apr 27, 2015
    Posts:
    2
    (* sorry for poor English! )
    Hi!
    Nowadays I'm learning the way to use UMA... and now i'm on the level that adding custom stuffs like hat on avatar

    and this is what i got.



    see...??? oh god
    Hat i put went separated and it looks so awkward

    i used this code to put hat on avatar's head



    other parts(ears, eyes, etc.) moves correctly
    but I don't understand why only hat is not following head's movement...

    so i tried on this code.



    and result was this. ↓




    hat's still not following head's movement + face color got patterned!!!! Oh plz god T^T


    I have to use UMA avatar with only scripting bcuz of company's demand.
    can somebody help me to conquer this hardship??
     
  18. BaxtardWorm

    BaxtardWorm

    Joined:
    Nov 15, 2012
    Posts:
    37
    on guys a little help I need is this to control uma how can I make animations in command ie I or the locomotion already ready but I have to create the animation that he jumps and swims like I do plz. thanks
     
  19. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    The hat must be skinned incorrectly! Your initial code is correct. You only want to share overlay lists when slots are supposed to use the same texture!
     
  20. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    This is a Mecanim problem, please read up on how to create your own Mecanim Animation Controlle.
     
  21. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Legacy Transparent might not be the right choice for your hair. The Legacy Transparent is meant for eye lashes, it does double sided rendering and doesn't use normals.

    In UMA 2 it's easy to use your own custom materials.

    First in the project hierarchy create a Unity Material with the right shaders and right default values. Then in the project hierarchy create a "UMA Material" the uma material should have a reference to your Unity Material.

    First you specify the uma material type
    #1 Atlas
    It will combine all meshes that uses this UMA Material into 1 draw call, UV rects will be updated and the texture will be atlassed.
    #2 No Atlas
    The uv coordinates will not be touched and each overlay list will use their own draw call!

    Then it should have an array for each shader value of the material you want to modify (any material value you doesn't mention will stay at the values from the default material).

    Each shader value can be one of four things:
    #1 Texture (Normal render texture, combine overlays!)
    #2 NormalMap (A render texture, that combine overlays but uses a special unity normal map shader. Use this for Unity normal maps (and only Unity normal maps!))
    #3 MaterialColor (No texture! This is simply grabbing a color from the overlay and applying it to the material)
    #4 TintedTexture (Only works with No Atlas! Set the texture directly from the overlay and apply the overlay color to the material.color property.)

    The Slot and the Overlay need to agree on the same UMAMaterial and the overlay must have number of channels as the UMAMaterial.
     
  22. tomi-trescak

    tomi-trescak

    Joined:
    Jul 31, 2013
    Posts:
    78
    Hi, thanks for the explanation, but as much as I tried I could not follow :/ Here are the steps I did:

    1. I created Unity material with standard shader
    2. I created UMA material referencing my Unity material
    3. I created a new overlay and assigned the new UMA material (I left everything else unassigned)
    4. I assigned the UMA material to the slot as well referencing the overlay
    5. When generating the avatar I receive following error:

    Code (CSharp):
    1. IndexOutOfRangeException: Array index is out of range.
    2. UMA.OverlayColorData.set_color (Color value) (at Assets/Standard Assets/UMA/Core/Scripts/OverlayColorData.cs:18)
    3. OverlayLibrary.InstantiateOverlay (System.String name, Color color) (at Assets/UMA/Example/Scripts/OverlayLibrary.cs:105)
    4. UMACrowdRandomSet.Apply (UMA.UMAData umaData, .CrowdRaceData race, Color skinColor, Color HairColor, System.Collections.Generic.HashSet`1 Keywords, .SlotLibraryBase slotLibrary, .OverlayLibraryBase overlayLibrary) (at Assets/UMA/Example/Scripts/UMACrowdRandomSet.cs:172)
    5. UMARaceCrowd.DefineSlots (.CrowdRaceData race) (at Assets/UMA Madness/Common/Scripts/UMA2/UMARaceCrowd.cs:26)
    6. UMACrowd.GenerateOneUMA (Int32 sex) (at Assets/UMA/Example/Scripts/UMACrowd.cs:583)
    7. UMACrowd.Update () (at Assets/UMA/Example/Scripts/UMACrowd.cs:64)
    8.  
    The error comes from this line, so obviously I need to assign at least one channel:

    Code (CSharp):
    1. public Color color { get { return channelMask[0]; } set { channelMask[0] = value; } }
    But, concerning your response, I did not understand how exactly the shaders (the four mentioned) relate to the Unity material. For example I set Channel Type to Texture, ARGB32 .. what do I specify in that field and why do I have to specify it?

    I tried to go with channel "Texture" Texture format "Default" and left the name empty but I get this error:

    Code (CSharp):
    1. Slot 'HipBag' Material Channel 0 refers to material property '' but no such property exists.
    2. UnityEngine.Debug:LogError(Object, Object)
    3. UMA.SlotData:Validate() (at Assets/Standard Assets/UMA/Core/Scripts/SlotData.cs:216)
    4. UMA.UMARecipe:Validate() (at Assets/Standard Assets/UMA/Core/Scripts/UMAData.cs:277)
    5. UMA.UMAData:Validate() (at Assets/Standard Assets/UMA/Core/Scripts/UMAData.cs:155)
    6. UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/Standard Assets/UMA/Core/Scripts/UMAGeneratorBuiltin.cs:88)
    7. UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/Standard Assets/UMA/Core/Scripts/UMAGeneratorBuiltin.cs:138)
    8. UMA.UMAGeneratorBuiltin:Update() (at Assets/Standard Assets/UMA/Core/Scripts/UMAGeneratorBuiltin.cs:73)
    9.  
    Thanks for your help!
     
    Last edited: May 4, 2015
  23. Alexarah

    Alexarah

    Joined:
    May 1, 2014
    Posts:
    110
    Hi everyone does UMA support facial animations on it's own? I would prefer not to purchase a plugin for it from the Unity Asset Store because I'm quite tired of having to rely on the asset store for everything to a degree ya know.
     
    boysenberry likes this.
  24. BaxtardWorm

    BaxtardWorm

    Joined:
    Nov 15, 2012
    Posts:
    37
    with the answer but the problem is that if no one gives me a hint of how I need to do to create an animation type swim I remain with those standards and my characters are inutilizabili because they can only run in the game and are useless as UMA and a perfect system for what I want to do please tell me where I have to look to create movements or if I understood correctly create the FBX with various movements and which program should I use?
    Or do I have to see how they are called bones and I create them as programming or there another method with locomotion help help help
     
  25. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    A UMAExpressionPlayer component with OverrideMecanimJaw enabled will close the mouth even if it has no animation, so something isn't working correctly. Is the expression player component on the same game object as the UMAData and Animator? If you disable the animator in the running scene are you still able to adjust the face using the expression player values?

    The old random set editor was using a third party library that with a different license, so it won't be part of the main distribution in the future. If you need it the code is available here.
     
  26. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    You won't be able to change the animations in UMA until you understand how animation works in Unity because UMA just uses the builtin Mecanim system. The Unity animation tutorials are probably the best place to start for that.
     
  27. BaxtardWorm

    BaxtardWorm

    Joined:
    Nov 15, 2012
    Posts:
    37
    oK thanks
     
  28. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Yes it does, but it's a newly added feature without a lot of documentation. Try the expressions scenes and ask questions from there.
     
    Alexarah likes this.
  29. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    It needs the property name that the shader uses for each texture - e.g. "_MainTex", "_BumpMap", etc. You'll have to look in the actual shader code or use the editor API to see what these are.
     
  30. mar0x

    mar0x

    Joined:
    Sep 22, 2012
    Posts:
    8
    Yeah, the material editor isn't working for me either and will create a "broken" normal map. This doesn't fail for diffuse because that's copied differently. As a result, the above error will be spit out (which isn't very descriptive :( )

    As a workaround simply find UMA.FileUtils.WriteAllBytes in UMATextureImporterUtil.cs and replace it with System.IO.File.WriteAllBytes

    Thanks! I can confirm that this works wonderfully now :)

    Here's a bug I've found in SkinnedMeshCombiner.cs in the MergeSortedTransforms() function
    Code (CSharp):
    1. long i = mergedTransforms[pos1].hash - umaTransforms[pos2].hash;
    should be
    Code (CSharp):
    1. long i = ((long)mergedTransforms[pos1].hash) - ((long)umaTransforms[pos2].hash);
    It would cause certain slots to throw errors due to overflows, and was particularly sneaky in my case causing all my right leg armor slots (and only those!) to throw errors :(
     
  31. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Pushed this fix. I don't know what the history on the WriteAllBytes() stuff is since it all seems to be in editor code where the platform wouldn't really matter. I'm waiting for Joen on that one.
     
    mar0x and hopeful like this.
  32. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    If you set target platform web player this method isn't available in the editor at least not on 4.6.

    So we need our own method, however that method does need to work in all case.
     
  33. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    Hi Guys,

    I got another question again lol. Adding armour onto UMA dynamically at runtime.

    Thanks to the help provided here I have been able to create UMA content and have my UMAs be created wearing the armour.

    I am trying to make a game with the RPG element of interchangeable armour onto a UMA. I tried creating an empty game object on the head attachment in the hierarchy, but when I place any piece onto that gameobject, the armour is started offset by quite a bit of distance, like 3 meters from the UMA's head lol and rotate at some angle close to 180 on the Y axis (not sure on the other axis yet).

    I've read posts on using sockets but unfortunately I am not overly skilled in programming/using unity. Is this a solution I would need?

    Edit:

    I've watched this video, it ALMOST tackles my problem except for the fact it using one of their purchased plugins.


    I've also followed this tutorial but still getting the same results. http://answers.unity3d.com/questions/51929/attach-object-to-bone-ingame.html

    Edit 2:

    When I bring my helmet into the scene, it is facing the right way. When I attach it to a bone at runtime it rotates to its side and is set far away from the head.
     
    Last edited: May 5, 2015
  34. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Whenever you change the parent of a transform the object stays in the exact same world position and it's local position/rotation is recalculated. This typically means that if you wish to attach a non-uma helmet to your character you need to enforce it's desired localPosition and localRotation.

    However it sounds like you're using uma incorrectly! Armour is closely fitted and should be rigged for uma, otherwise the armour will not match character proportions. Adding non-uma weapons makes sense, but adding non-uma armour will cause problems when you customise your characters.
     
  35. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    Thanks Joen for the response.

    Here is an image with the problem I am getting

    . example for attachments.png

    The armour I am using is a helmet I modeled (using 3ds Max) over the head of the "UMA Separated.FBX" file from content creation. I attached it to the face (no head option), detached, added the skin wrap modifier, added the skin by selecting the head and clicked "add skin". Grabbed the helmet and the entire rig (should I only have grabbed the head bones?) and exported the fbx.

    I also did the same steps by creating a duplicate and changed the pivot point to be center to the object as opposed to the bottom center of the separated file just in case that had something to do with it, because the results look like its attaching the pivot point to the bones.

    Here is a simple script I am using to attach the armour to the bones at runtime by placing the items into the inpector.


    public GameObject objectToAttach;
    public GameObject objectBone;

    // Use this for initialization
    void Start () {
    objectToAttach.transform.parent = objectBone.transform;
    objectToAttach.transform.localPosition = Vector3.zero;
    objectToAttach.transform.localRotation = Quaternion.identity;
    objectToAttach.transform.localScale = Vector3.one;
    }
     
  36. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    Also in the image (above) you can see the helmet I wanted to practice attaching, is already working when using the UMAGenerator with slots/overlay in place. The pants are from the original items that ship out as standard with UMA.

    Edit:

    It seems like its a pivot thing when creating the model in the modeling program.

    I got the helmet working by going back into 3ds Max and changing to pivot to the center of the object and not even adding the skin mesh as that creates the pivot to be at the feet again. I had to change the parents transform details (by matching those of the helmet) quite significantly before I got the script to get the helmet to be placed directly on the head.

    Is that the correct way? How would you go about creating armour and dynamically changing armour at runtime?

    Edit 2:

    Should I create a bone on the armour and attach it to a bone on the UMA?
     
    Last edited: May 5, 2015
  37. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    No!

    The correct way is to follow the steps in our Content Creation guidelines.
    http://uma.unity3d.com/wiki/index.php/Content_Creation

    You shouldn't have to worry about transforms! Skin your stuff the uma skeleton and create slots. Then add those slots to the umaData.umaRecipe and call umaData.Dirty(); And then your character will be recreated with the meshes from the slots.

    The wiki page is a bit outdated, whenever it refers to SlotData it most likely means SlotDataAsset etc. But the general workflow should be correct.
     
  38. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    Where would I call umaData.Dirty();? I'm still lost haha. Are we both talking about runtime? Is there a specific script in the UMA files I can use for that can create the armour at runtime?

    Not the slot stuff, that was difficult but I solved that, I can get my helmet, wrist armour and leg armour to be created with UMAGenerator with random characters wearing the stuff (as per the picture). I'm talking about at runtime when my player has 5 billion helmets in his inventory he can choose either 1 to wear and the scene will be updated with him wearing the helmet as soon as he clicks on the helmet.
     
  39. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    It's not just my stuff that isn't working its Fernando's male Jeans also. There is no "hip" bone on the rig in the hierarchy. So I used the lowerback gameobject and those pants but they arrive in the scene on an angle as per the attached photo.

    uma not working.png

    In the photo you can see my character is wearing a helmet and the exact same helmet I want to create at runtime is not matching the right bones, neither is Fernando's male legs. I believe I am attaching the items incorrectly. I've created them correctly as they work as expected.

    Am I missing something in my scene? Do I always need a UMA gameobject that holds all the slot library, overlay library, race library and the UMAGenerator stuff?

    I tried to follow this step:

    Step 7 - Asset Collection
    Instead of going through all your scenes finding your SlotLibraries and OverlayLibraries and adding the new content to each of them manually, you can simply create an UMAAssetCollection.

    1. Open the Context Menu in the Project View and click "Create|UMA Asset Collection".
    2. Add the SlotData and OverlayData to the inspector of the newly created Collection, using the lock inspector is particularly useful for this.
    3. Open each scene and press the "Add to Scene" button on the Asset Collection Inspector and save the scene.
    But I become stuck at the first step. What is the context menu? Is that where I right click the hierarchy, select "Create Other|UMA"? Because the only option after that is "Dynamic Avatar"? I also can't find the "Context Menu" in the top editor tools.

    uma editor.png

    Edit:

    Found the "Context Menu" Looks like it's been renamed as "Assets" In Unity 5 lol

    Edit 2:

    I follow all three steps and when I get to step 3, nothing happens. I press "Add To Scene" and I receive no messages via the console and nothing gets added to the scene:

    add to scene.png
     
    Last edited: May 6, 2015
  40. tomi-trescak

    tomi-trescak

    Joined:
    Jul 31, 2013
    Posts:
    78
    I'm dumb ... still not following. Can you give me an example of working UMA Material (diffuse + normal) please?
     
  41. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    Ok I finally got the AssetCollection thing to work...its an alright thing but it still doesn't solve my problem of swapping items to a UMA at runtime.

    Step 8 on the wiki site also works:

    step 8.png

    My problem was not creating UMA content....its having the UMA models dynamically change gear during gameplay.
     
    Last edited: May 6, 2015
  42. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    Does anyone know how to generate UMA content (that you have already made/purchased) dynamically so characters to equip different armour and weapons? I know UMAElements wanted to solve something like this, but it does not work for UMA 2.0.

    Has anyone ever got a UMA item equipped onto a character dynamically during game play?
     
  43. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Richard relax and take a deep breath, UMA can easily do this, and everybody can change their armour/clothing at runtime.

    You're using UMA wrong, that is the problem. You should NEVER add your meshes or game objects into the hierarchy!

    Instead you should use the content creation steps to create SlotDataAssets! Once your meshes have been converted into slots you can add the slots to the recipe and UMA will do what you want.
     
    Richardm1985 and boysenberry like this.
  44. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    Haha thanks Joen, I know I was ripping my hair out and stressing haha.

    Thanks for the clarifying what not to do lol I had no idea how I would exactly get the armour onto the characters at runtime. So I'll need to add the slots to the recipe for the specific UMA (via a custom script I take it?) I want to update and then how will I force the recipe to update to render the armour onto the UMA during runtime?

    Edit:

    I'm now reviewing how Scene 2 (serialized) is done/setup. Will I always need the UMAContext, Slot Library, Overlay Library, Race Library and UMAGenerator present in every scene where a character will change armour/weapons?
     
    Last edited: May 6, 2015
  45. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
     
  46. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    I got my UMA wearing my armour dynamically haha thanks heaps! But I still don't know how or when I will call umaData.umaRecipe and then umaData.Dirty(). Will I have to create a custom script?

    public virtual void Dirty()
    {
    if (dirty) return;
    dirty = true;
    if (!umaGenerator)
    {
    umaGenerator = GameObject.Find("UMAGenerator").GetComponent<UMAGeneratorBase>();
    }
    if (umaGenerator)
    {
    umaGenerator.addDirtyUMA(this);
    }
    }

    So I will always need the UMAContext, Slot Library, Overlay Library, Race Library and UMAGenerator present in every scene where a character will change armour/weapons?
     
  47. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    Ok I've joined the wiki site and created a new page on how to dynamically add weapons/armour in game at runtime for characters.

    It's incomplete because I haven't solved it. Joen you have been a huge help thank you so much, as soon as you give me the steps in how to do it exactly, I will edit the wiki page so you will never have to repeat them yourself anymore.

    I wanna contribute in helping people learn UMA as I know personally how difficult it has been for me.
     
    boysenberry and Teila like this.
  48. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Thanks, Richard!
     
    Richardm1985 likes this.
  49. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    This is the UMAMaterial for the legacy UMA shader, it uses two textures "_MainTex" and "_BumpMap" (but notice "_BumpMap" is not marked as being a normal texture because the legacy UMA shader doesn't use the same channels as regular Unity normal maps!)
    LegacyShader.png

    This is a new UMAMaterial that uses the Unity 5 standard shader. It's including three textures, "_MainTex", "_BumpMap" (which is marked as a normal map), and "_MetallicGlossMap". These are the internal shader names for the "Albedo", "Normal Map", and "Metallic" textures in the standard shader inspector.
    StandardShader.png
     
    Dreamaster and Teila like this.
  50. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Yes, you'll need the context and libraries to be able to generate UMA stuff.

    Here's a script that you can attach to one of the female characters in the serialized scene to swap her shirt back and forth between the mesh version and the overlay only version.
     

    Attached Files:

    Richardm1985 likes this.