Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Are the blendshapes that Mixamo created when it auto-rigged the mesh that I am using to create my race any use?

    Its just I have gotten my character rigged perfect to the armature that @ecurtz kindly provided with the expressions animations and it looks fine. But, not having looked in massive detail, it looks like the expressions script perhaps calculates the vertex positions of a given mesh at certain keyframes of the expression animation, is that right?

    If so could I use the Mixamo blendshapes and keyframe those? Its just that those blendshapes are a bit nicer looking than the results I am getting with the facial bones...

    Or should I just delete the Mixamo ones and save space?

    Also, how do I go about using my 'Femaleness' blend shape with my new UMA race?
     
  2. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    How were the UMA_Human_Female/Male_Separated files created?

    I know I can split my mesh up, but in the UMA_Blend file I see that the UMA_Female mesh for example has different materials for face, torso etc... Is there some 'one-click' trick that you use to split a mesh in to bits based on materials or something?
     
  3. smd863

    smd863

    Joined:
    Jan 26, 2014
    Posts:
    292
    UMA doesn't support blend shapes. The Unity mesh API doesn't support getting or setting the blend shape data directly. The slot assets don't contain the blend shape data, and even if they did, there is no way to set blend shapes on the mesh when the slots are combined into an UMA.

    The good news is that the mesh blend shape API is finished (according to a Unity dev in a different thread), but it didn't make the deadline for 5.2 (coming Sept. 8). Hopefully, it will be included with 5.3 (Dec. 8). Once that is released, proper blend shape support could be implemented for UMA.

    There is a way to set the blend shape weights, bake them out with a skinnned mesh renderer, and calculate the blend shape data indirectly for the slot mesh data. Then you could bake the blend shape into the slot mesh vertices before they are combined into the final mesh. I've been looking into getting this working, but it's a bit of a work around so it's probably best to wait until the real API is released. Though baking certain blend shapes directly into the mesh would be a nice optimization to have for blend shapes that are not going to be changing at runtime (i.e. femaleness, muscularity, fatness, etc.). Facial expression blend shapes will need to be dynamic so those will have to wait for the new API.
     
  4. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Argh... Thanks for the bad news @CaptainScience

    I thought I read somewhere that UMA 2 uses blendshapes in some way for expressions? How does that work?

    I guess that is what you are talking about in your last paragraph maybe? I dont understand tho... Do expressions not work in UMA2 then- or are they reliant on bones animation and not blendshapes after all...

    Confused...

    So is the only option for the time being to set my femaleness blendshape in blender and import that as a completely different slot mesh?
     
  5. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    There seems to be another issue with using blendshapes for femaleness, by the way, which is that the normals seem to be set on the mesh in the state it imports in

    What I am seeing in Unity is that while the blendshape might make the actual 'boob' geometry, because the normals were set on a 'flat-chested' male model no matter how big the boobs are, from the front the model still looks flat, as the light does not bounce off the cleavage so to speak...

    I thought this is what 'Normal Maps' were for, i.e. if I swapped the Normal map for the male for the normal map for the female then I'd get boobs in all their glory, but that doesn't seem to be the case...
     
  6. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    So I am following the warewolf tutorials again and I know that I dont need to create a pre-fab now in UMA2 but its really not clear to me what i DO need to do and what I DONT need to do...

    In those videos Fernando keeps saying 'this is really important' and 'this is really important' but I dont know now what is and what isn't...

    I get that this process is much easier now in UMA2, but what is the process!
     
    Last edited: Sep 3, 2015
  7. charris456

    charris456

    Joined:
    Nov 25, 2012
    Posts:
    29
    Hey guys, hopefully a pretty simple question.

    What is the best way to go about attaching items such as weapons to umas? I don't really want to use a slot, so I tried to attach them on the appropriate bones in the UMA Human Male/Female prefabs, but they didn't seem to carry over when spawned. Is the only way to do it at runtime :(?
     
  8. smd863

    smd863

    Joined:
    Jan 26, 2014
    Posts:
    292
    I haven't really delved into the expressions beyond just loading them up in Unity and playing with them, but it's my understanding they are all bone-based. It's just a lot of facial bones and the expression player code maps them to facial expressions in a similar way that DNA maps bones to UMA shape. Maybe someone who knows more about it can correct me if I'm wrong.

    But blend shapes aren't involved. I just meant that once Unity allows defining blendshapes for meshes, it would be possible to create an UMA with intact blendshapes for facial animation at runtime. In theory, you can hack UMA to support blendshapes during mesh generation, but the weights couldn't be changed without re-creating all the mesh geometry from scratch. But in UMA, right now, all the blendshape information is lost when the slot asset is created.

    Blend shapes come with their own normals/tangents for the vertices, and the normal map should take care of the rest. With the female normal map and the full femaleness blendshape, there should be no visual difference from the regular female model. The normals, tangents, and normal map should all be identical.

    For intermediate states, I imagine it should work well enough to blend between the normal maps with the same weight as the blend shape. You just need to be careful blending the normal maps because they are encoded vectors not colours. It could be done in shader, but it would be much better to do it in the texture combining/atlasing step that UMA is doing anyway.

    I haven't dug into the overlays too much yet, but I was kind of hoping UMA might already support different types of overlay blending (i.e. Photoshop-style layer blending, normal map blending, etc.). Though it's straight forward enough to add if it doesn't.
     
  9. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    I get that this process is much easier now in UMA2, but what is the process!
    OK so maybe its the case that I *dont* have a female normal map for my male mesh with the femalness blendshape applied...I figured that if I applied the material that I was using on my actual female mesh to the male with femaleness applied, that would work- but it doesnt.

    The texture is all in the right place but as I say 'she' looks flat-chested...
     
  10. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    Just throwing out the idea that maybe the API could be included in 5.2.1. It's too late for 5.2.0, but maybe we won't have to wait till the end of the year for it.
     
  11. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    But all that aside PLEASE could someone who knows just provide a 1,2,3 for creating a new race
     
    Licarell likes this.
  12. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    I'm trying to figure this out too. I believe the UMA devs want us to use slots, but I find prefabs easier to work with during development. My understanding is that the prefabs used for UMA1 don't carry over to UMA2. You can use them as functional placeholders, but that's it.

    UMA Power Tools has the ability to make prefabs of UMAs. Currently I'm running into some trouble with it, which could be user error on my part, but I suspect changes need to be made to allow for the switch from gamma to linear, and from the old diffuse material to the PBR material.

    Maybe UMA prefabs aren't absolutely necessary for development, as you can use other character art, but when I can get Power Tools working again I'll most likely be using the prefabs.
     
  13. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    This is correct, the expressions are based on bone animation, not blend shapes.
     
  14. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    The absolute minimum requirements for an UMA 2 race are:
    • A RaceData asset containing:
      • The T-Pose asset extracted from your configured Mecanim avatar.
      • A DNAConverterBehavior (and, if you aren't using existing DNA, then DNA matching the converter).
    • One or more SlotData assets (these require OverlayData assets to be visible, but those can be preexisting ones for testing).
    Creating each of those should be covered in the videos, as well as various places in this thread.
     
  15. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    SecretAnorak did a whole video on spawning items and attaching them to your character without using slots.
     
    FernandoRibeiro and hopeful like this.
  16. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    I have created the T-Pose asset from my Unified mesh, and followed the video to create the Race Asset, now I am trying to create slots from my Separated asset, but when I do the slot asset isn't getting any bones- surely that's not right? The slots assets in the video have bones...

    I dont know if it matters but the T-Pose was created in a new UMA_Assets->TPoses folder outside the UMA folder and the Race Asset was in the same place, I have tried moving the created file into the UMA folder but still no bones...

    Also there does not seem to be any tool to create Overlays anymore, is this another new undocumented thing? If so what is the new process?

    We just desperately need an updated video that shows us how to do this with the NEW tools and the NEW way UMA works, so we can see how things should work, what data we should expect to see generated and where...

    This whole process has been an absolute god awful nightmare I have to say- I could never in my wildest dreams have guessed this would be so difficult and take so long, and now I have spent SO long getting everything so my rig, animation, weights etc are all matched as closely as possible to the Content pack, learned Blender to do it, and I just dont know what is wrong in UMA in Unity, dont even know if it is wrong or just the 'new' way UMA does things, all I know is its not working...:(
     
  17. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Which is why I strongly recommend people not jump right in and try to create a new race as the first thing they do, it requires the ability to make all the other assets as well as the race itself.

    If your slots don't have any bones that's definitely wrong. Was the FBX exported with the rig included? You don't need to start with the separated slots, you can try everything with a single slot made from your entire base mesh.

    It doesn't matter where your assets are stored, some of them have default locations where they get created but you can move them wherever you'd like.

    Overlays no longer need to be processed in the same way unless you're using the Legacy UMAMaterial. You can just use the Create menu or contextual menu to create a new OverlayDataAsset, and assign the UMAMaterial and textures.
     
    FernandoRibeiro likes this.
  18. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Thanks for helping @ecurtz

    I have an fbx file with my rig and a unified mesh in, and another 'separated' fbx file with the same exact rig in and with the same mesh except that in Blender I split it up into the same parts as UMA uses for is male/female...

    I have imported both into the same folder and set the rig on both to humanoid and configured them the same.

    With the Unified one I extracted a T-Pose.

    I then duplicated the HumanFemaleDNAConverterBehaviour object and script and renamed them to Toon, dropped the renamd script in to the renamed objects script slot, and adjusted the function names in the script in Monodevelop as per the video so the errors went away.

    Then I created an UMA Race and dragged in the created T-Pose, used the Female Expression Set, set dna converter to 1 and dragged in the modified and renamed DNA file, set DNA Ranges to 1 and dragged in the Human Female DNA Ranges.

    I gave the Race a Name, but maybe this is wrong, does this have to match something? In the RandomSet you have to specify a Race ID is this the same as the Race Name in the the UMA Race object?

    Anyway, still not getting anywhere... Are there other naming conventions I have to match to maybe? I exported as binary fbx 7.4 from Blender (the Blender Dev said that the other option is screwed and they will be dropping it soon and not to use it)- but is that an issue? Does the fbx need to be ASCII?
     
  19. smd863

    smd863

    Joined:
    Jan 26, 2014
    Posts:
    292
    What I've been doing (after watching the Secret Anorak videos) is trying to recreate the standard UMA with the default UMA assets from scratch. Exporting an .fbx from Blender, setting up the slots, slot library, creating a material, overlays, overlay library, etc. I know the provided assets are properly created for UMA so I can focus on getting them set up properly. Once I have the work flow down, I will know how to start including my own assets.

    UMA really needs a tutorial for this. A set of unambiguous steps to go from an empty scene to generating a complete UMA using only UMA core scripts and the provided .blend files would really help people to understand how to create everything and how it all fits together. It would also provide a good starting point for anyone who wanted to generate their own content.

    I can make one eventually, but I'm still working through things myself. Something on the wiki that the community could keep up-to-date would be fantastic.
     
    Last edited: Sep 3, 2015
    ecurtz, hopeful and Licarell like this.
  20. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Yes, the RaceID in the random set should be the race name which you set. Did you add the race to the RaceLibrary in the scene? Using the random set is just another place for things to break though, you'd be better off just creating a character from scripting while you're still testing. SecretAnorak covers that in his first few videos.
     
  21. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    Ya know... I have to make a comment here... I have been following this thread for months now and the majority of the posts have been folks wanting to bring in their custom meshes and pleading with the UMA creators/community for help. Only to get cryptic responses which might be perfectly clear for those who created the asset and to respond just use the stuff that's already there I think flies in the face of the true power of UMA and for life of me I cannot figure out why all the people that want to know how to import custom characters seem to be treated like red-headed step children.(Although that's not be the intent... IMO that's the way it's perceived...)

    From outdated procedures to import/export scaling issues to texture issues to importing and adapting to UMA to me it just doesn't seem like it should be this hard. People are spending days trying to get this to work and I'm afraid out of mere frustration give up dust their feet and move on.

    For me personally I have the skills to create a my own character and textures and mimic the UMA rig with a CAT rig in max to create custom animations with motionbuilder and would love the power of UMA for character customization in Unity. Now I can see using the base character for prototyping but for an actual shipped game your not going to want your characters looking like some other game's especially if your doing this for a client who's expecting and paying you for custom characters/assets.

    I feel personally I can figure just about anything out if given the information. But, does it really need to be this hard?
     
    fisj and davidosullivan like this.
  22. charris456

    charris456

    Joined:
    Nov 25, 2012
    Posts:
    29
    Awesome. Thanks!

    For anyone else the way I went about it is getting references to the left hand/right hand transform in the OnCharacterSpawned event.

    Code (csharp):
    1.  
    2. leftHandTransform = UMAtransform.FindChild("Root/Global/Position/Hips/LowerBack/Spine/Spine1/LeftShoulder/LeftArm/LeftForeArm/LeftHand");
    3. rightHandTransform = UMAtransform.FindChild("Root/Global/Position/Hips/LowerBack/Spine/Spine1/RightShoulder/RightArm/RightForeArm/RightHand");
    4.  
    I then have a database of all of the weapons/items at the correct position, scale, and rotation. I currently just instantiate / destroy them as needed, but for performance I may move to instantiating them if the item hasn't already been spawned, then just enabling/disabling them to avoid the cost of instantiation and destruction.

    Code (csharp):
    1.  
    2. public void EquipRightHandItem(string name) {
    3.         GameObject g = HandEquipDatabase.instance.GetEquippablePrefab(name);
    4.         rightHandItem = (GameObject)Instantiate(g);
    5.         rightHandItem.transform.SetParent(rightHandTransform);
    6.         rightHandItem.transform.localRotation = g.transform.rotation;
    7.         rightHandItem.transform.localPosition = g.transform.position;
    8.         rightHandItem.transform.localScale = Vector3.one;
    9. }
    10.  
     
    hopeful likes this.
  23. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    So is adding the race to the RaceLibrary in the crowd scene (or a copy of it) part of the actual process of creating a race then? I sort of thought it was just so you could see how things were going as opposed to something you actually *had* to do to be able to create your separated race components as slots that actually have bones...

    I also skipped all that stuff about creating the prefab, as it was said here that you didn't need to do that any more, but maybe there *is* something in there I have to do?

    And I also sort of assumed you had to have an already existing race before you could do *any* of the stuff @SecretAnorak covers no?
     
  24. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    You won't be able to use any race, slot, or overlay that isn't included in the libraries in the scene. The UMAGenerator uses those libraries to find the objects.

    That doesn't have anything to do with your missing bones though, that's a problem with the slot generation or the original FBX the slot was built from. You aren't getting any warnings in the console when you build the slot?
     
  25. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Nope it just says 'Success', (or 'Batch Importer Processed Mesh' if I drag and drop- neither works tho)

    If I drag the model/prefab whatever you call it that Unity creates when I import my 'separated' file into to an empty scene I can select the object and drop the 'Locomotion' animation controller onto the animation slot and it plays fine... Same with the 'Unified' one...
     
  26. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    The slot is probably ok then, does it have stuff in the "UMA Bones" array? It's ok if the "Bones" array is empty in the asset, that will get filled in when the slot is instantiated as part of the character. If your new character is actually using the skeleton from the regular male or female you ought to be able to test your new slot by using it on the default races - as long as the bones are right, and it has an overlay attached it should show up, even if it doesn't match the geometry well. Remember you can't instantiate any slot or overlay that isn't in the library.
     
  27. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hi there everyone!
    I guess this subject is something really important to discuss especially with content creators looking for a standard to follow for a more modular approach on asset creation and combination.
    I've started last month working with a couple artists creating new content for UMA and the first thing we defined was an early standard for separating armor and cloth pieces, following the image posted below.
    UMA_SeparatedAreas.jpg
    For the end user, this can possibly mean that we can have the flexibility of combining a full plate breastplate with leather armor for arms and legs, while wearing mage gloves, and being sure all assets can combine together and work seamlessly.
    Of course this solution is optional, but I'm looking forward joining forces so we can have as much content as possible working as armor sets that can be combined.
    This also provides the possibility of removing occluded body parts in a very efficient way, as content can be created considering those regions to benefit occlusion and slot swaping.
    I'm looking forward hearing for both users and content creators to improve those separations, including extra areas if necessary.
    The early results of using those areas are really promissing, the full plate armor can be combined with other armor pieces and body areas can be removed based on this standard.
    Would you guys be in need of content combination asymmetry (Right arm wearing plate while left arm is leather)? This would require both body parts and assets having a Left/Right separated files.
    I'm also including an head mesh that has no influence of extra bones, so only head size and width would have influence. This way we can have head fully working with any full helmets that still require head visibility and while wearing them, we can avoid head parts poking through the helmet.
    UMA_SeparatedAreas_FullPlate.jpg
     
    Last edited: Sep 4, 2015
  28. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    @FernandoRibeiro This looks fantastic, my only comment would be please for the love of everything document what you all are doing so those of us with the skills can have a through guide to create content as well.

    Thank you for your dedication to this project.
     
  29. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Ok yes it does have stuff in the 'UMA Bones'! In my Torso for example I have Mesh Data -> UMA Bones as 45, rather than 41 in UMA Human Female and MeshData->Bones s is showing 30 rather than 25, cant understand why that is, I definitely did not add any bones to the UMA rig in Blender?

    Cant get what you suggest to work, I'm probably going wrong with Overlay creation/assignment...
    I cant see the 'Material Builder' mentioned in the Wiki anywhere and I tried creating an overlay asset and adding a diffuse texture but that doesnt give me anything showing up in the UMA crowd scene...

    When I try in my duplicate I get 'AvatarBuilder 'Generated Character': Transform 'Hips' for human bone 'Hips' not found', but 'Hips' is in the rig, as at Global->Position->Hips, like the UMA Skeleton, and its a deform bone etc (I used the UMA Skeleton as a basis for mine, I just moved the bones so they fit my character) and actually it is showing up in 'Mesh Data -> Bones in the slot itself- and as I say the Locomotion motion does work when applied to the imported object...
     
  30. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Try testing the slot in the Serialized Scene (or make the crowd smaller and try there) by adding it to an existing character while the scene is running. If you run the scene and select one of the UMA characters, the inspector for the UMA data has tabs for the DNA and Slots. You can go into the slot tab and add a new slot with the field near the top labelled "Add Slot" then you'll have to come back into the tab and assign an overlay (can be anything doesn't need to match) to it for it to actually be visible. Make sure both the slot and the overlay are in the scene you're running.

    EDIT: Actually if you just use one of the "Add Slot" fields within an existing section it will share the overlay with the other stuff there, so that's a faster way to test the slot.
     
  31. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Well something happens if I do that, but I get a horribly twisted cripple as a result- if I add the head it looks like the mask from Scream but on its side, if I add the body its a bundle of distortion under the head...

    Does that tell us anything?
     
  32. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Means you have a valid (if messed up) slot. Did you update your code with the Max slot building fix from here? http://forum.unity3d.com/threads/um...n-the-asset-store.219175/page-64#post-2260301
     
  33. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Ok I made those changes now, but things still look the same, But I have no idea if I am doing anything right when I add the slot, there doesn't seem to be an 'Add Slot' drop area for the torso anyway when I look at a character in the scene, it just says 'Shared Overlays'...

    And actually I didn't export this from MAX I did it from Blender, modified the female armature in UMA_Blender so the bones were where I need them to be and then attached my mesh to that with a armature modifier and weighted it... I did turn it around though a I was trying to get a mixamo animation onto it to test, but I never managed to do that... So that may explain why its all screwed up with UMA slots, but I dont need those anyway... I just need to get mine working...

    So any idea about the 'AvatarBuilder 'Generated Character': Transform 'Hips' for human bone 'Hips' not found' issue in my duplicate crowd scene?
     
  34. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    What could be an issue is that I exported with fbx 7.4 - which we should be using as the ASCII version will be removed from Blender soon the dev told me, it totally screws up scaling (thats why the UMA meshes are so miniscule) and it outputs files that are three times the byte size of the binary ones-which I dont think matters to UMA but is important generally.

    But that could be why my slots are not able to connect up with the UMA ones without getting screwy?
     
  35. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    You'd have to use the SlotBuilder window and rebuild one of your slots to see if that code change helped, it changes the way the slots are converted. It didn't happen on the old Blender slots, but they're constantly messing with their FBX export so it could happen in some versions of Blender as well.

    You would normally get that error if the hips are defined in your T-Pose but not in any of the attached slots.

    If you exported with settings different from the instructions (Z forward Y up) even in Blender that can definitely cause problems.

    The UMA Data inspector is probably a little out of date since I'm using github code. I guess you'll need to add the overlay yourself while testing, as in my original description.
     
  36. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Well 'Legs' and 'Torso have 'Hips' but 'Face' and 'Feet' dont, I think from looking in the mesh data...

    Is it looking for 'Hips' at a specific location relative to the Global bone? I mean location not as in heierachy, but as in actual distance in units from, because that has changed in my modified rig
     
  37. Augis1980

    Augis1980

    Joined:
    Sep 23, 2014
    Posts:
    48
    Hi,
    UMA charaxcters seam to be of a less quality (less antialised) then standard assets, is there a way to improve their look?
     
  38. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    That is a very diffuse question. Pic's or it didn't happen. ;)

    I believe you mean the lack of mipmaps that can make characters look noisy at a distance. There is a toggle to have uma generate mipmaps for the characters, however that takes up almost twice as much texture memory. Alternately you can set the atlas resolution scale and re-generate the atlas at whatever resolution fits your camera distance.

    However if you're referring to the content you can create your own content or buy 3rd party content for uma.
     
    FernandoRibeiro likes this.
  39. Augis1980

    Augis1980

    Joined:
    Sep 23, 2014
    Posts:
    48
    Ok, mipmaps helped. Also I forgot to change antialiasing settings in quality settings. Everything is fine now :)
     
    hopeful likes this.
  40. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    No, at the place where that error occurs it's just looking for the existence of the Hips transform in the skeleton that has been built out of the bones in the slots. It never cares about the placement of stuff in the rig, only the hierarchy.
     
  41. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Ok I sussed out why that error was happening- it was because I had not added the slots to my RandomSet.

    So now I have my duplicate of the crowd scene working WOOHOO!!!

    I am getting lots of my Toon race all modified with DNA- they are all showing up black though, but i can probably work that out.

    What IS a major issue though is that any animations seem to have the feet off the ground and I don't think they are actually moving- just animating. This happens with the Locomotion animation and my Mixamo ones.

    UMA-Toons-floating.jpg

    When I directly apply the same animation controller to my imported models (which have a modified UMA rig where I have moved the bones to match the bone positions of the original Mixamo rig) its perfect.

    Also when I apply the same controller to the UMA crowd scene which is using the UMA base meshes, they work as I'd expect aswell.

    EDIT actually on closer inspection the above is NOT true it just looked like it because they have longer legs. But when the UMA characters bend their knees their feet move towards their hips when they are dancing using the Mixamo animation.

    Regards the feet floating though I am not sure what could be the issue there. I have made sure that the Global and Position bones have the same position as the UMA rig. My ToeBase bones actually touch the ground as this is what the Mixamo ones did- the UMA ones are off the ground- I dont know if that makes a difference?

    Maybe this is related to the fact that the UMA models have come into Unity with the Root Bone set as 'Hips'. what i mean here is if you go to UMA->Content->UMA->Humanoid->FBX->Male and click on one of the SkinnedMeshRenderer components in Male_Separated/Unified the Root Bone there is set as 'Hips'.

    EDIT- I dont think this makes any difference actually- the UMA characters are the same.

    So I am not sure what to do here. Manually setting the Root bone to hips doesn't seem to get things correct either as it just seems to make the meshes move up by the same amount the hips are off the ground...

    Any ideas?
     
    Last edited: Sep 4, 2015
  42. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Actually I notice that the UMA people in the demo scenes are floating too- is this normal, is it like to accommodate shoes or something? Or is my UMA version screwed up do you think?

    Looking at it more though I think its something to do with the root motion thing though. Even if the feet were on the floor, when my characters bend their knees their feet move up towards their hips rather than their body moving down towards the ground.

    And so do the UMA's actually. Its pretty much impossible for me to redo the Mixamo animation, so i need to know if there is (or could be) a setting that could fix this?

    The Mixamo animations dont have a Global or Position bone that wraps the Hips bone so i think its something to do with that.
     
    Last edited: Sep 4, 2015
  43. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    If they have a capsule collider attached there is an offset built into the collider that makes them float a bit at Assets/UMA/Content/UMA/Humanoid/Slots/AdditionalSlots/CapsuleColiderSlotScript.cs line 35.

    If they don't have a collider then they are floating because the Y-position of the hips is being set too high in the DNAConverterBehavior.

    EDIT: If it does turn out to be from the root motion you'll probably have to play with the Root Motion Y-axis settings on your imported animation clips.
     
  44. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Ok cool, that fixes the floating issue.
    How about the issue where the feet are moving towards the hips when the knees bend rather than the hips moving towards the feet? This doesn't happen on the imported object. The imported fbx object (meshes and rig i.e. what Unity creates when you 'import asset') has the same armature as the character UMA creates- obviously- but this armature itself is a different one to the one the Mixamo animation was created on/for. And yet if I apply the same animation controller to that object when its just dragged into a scene the animation is perfect.

    So I know, in theory, that the Mixamo animation is re-targeting from the Mixamo rig to the UMA-Style rig I have my character attached to, just fine. Its just when UMA creates a character, it goes wrong somewhere and the animation stops working right (feet move towards the hips when the knees bend)
     
  45. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    As I say above I think the capsule collider change fixed the 'floating' issue, now just need to know some way of making the feet not move towards the hips when the knees bend.

    Excuse my ignorance regarding terms, I am still getting to grips with what everything means, so I think what I am talking about is 'root motion' but I am not certain. What I do know is that the same animation, on the same Animation Controller, applied to the same rig, before it goes via UMA, works fine...
     
  46. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Unfortunately this exposes another flaw with Blenders fbx exporting. Blendshapes dont get normals exported correctly from blender.

    I attach some pics to show the differences, there are a lot of boobs here sorry about that! I am not mking a porno app honest!

    Mixamo-original-female.jpg
    So in this pic you can see the original female model imported into Unity. This is what I used to make my blendshape from. (I used the shrinkwrap modifier in Blender on the male mesh to wrap it to the female mesh. That got me close and then I had to manually snap every vertex to the same position which frankly took forever). I think the UVs of the male and female meshes are the same with Mixamo, you can swap the textures between the two and they work.
    Anyway the things to note are that there is sculpting that comes from the normal map (like the clavicles) and the nippes are pointing the right way (outwards) and that there is highlighting on the top of the breast.
    exported-normals-only-NOfemalenessBS.jpg
    Above is the male with no 'Femaleness' blendshape appled, again you can see the sculpting from the normal map.
    exported-normals-only-femalenessBS.jpg
    Above is the male model with the same material as above but with the 'Femaleness' blendshape applied, you can see that the geometry has changed but the way the geometry is reflecting light is not the same as the actual female model, there is no highlighting on the top of the breast. This model was exported from blender with the 'Normals Only' option selected.
    exported-normals-only-femalenessBS-w-mixamo-female-normal-map.jpg
    This is the same model with the same export settings but this time I have copied the normal map from the Mixamo female to the male material's normal map slot. Its making a difference but not looking right (still no highlight)
    exported-edge-femalenessBS.jpg
    This is the same mesh (the male mesh with the femaleness blendshape applied), but exported from Blender with the smoothing option set to be 'Edge'. Now we do have highlight on the top of the breast, but we seem to have lost the sculpting from the normal map to a large degree, and also-though its not that apparent in this shot- the normal direction on the nipples is screwed up and this means that from some angles they 'light up'.

    With Blender right now you have to make a choice between having normal map textures that work properly (exporting with smoothing set to 'Normals Only') or having the geometry lit correctly (exporting with smoothing set to 'Edges' or 'Faces').

    i have run out of images I can attach to this post, but below you can see the result from Max...
     
    Last edited: Sep 5, 2015
  47. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    This is the same male model exported from Max and imported into Unity with the 'Femaleness' blendshape applied...

    exported-from-max-femalenesBS.jpg
    perfecto...

    I am amazed by Blender, its 99% as good as Max, at 100% less of the cost, but their fbx export issues have literally caused me a month of pain. Its the reason why the models in the content creator pack are so tiny as to be unusable in anything else and the bone envelopes make the file un-usable, its responsible for the wild discrepancies between what you get when you export now (in 2.75) as compared to what you got when you exported from 2.65 and so many other issues. I seriously hope they get it sorted soon.

    But I'd seriously recommend that UMA, rather than basing everything on what, with the best will in the world, is currently a 'moving target', based their content creator pack models- and dare I say UMA itself- on files that have been exported correctly and are 'standard' in some fashion- if only because right now the current UMA fbx files, while they work, are a result of the incorrect Blender exporting that was present in 2.65, something that they (Blender) themselves admit they wont be fixing (they are not fixing fbx 6.1 exporting, just 7.4) so for the UMA system to be based on interpreting those screwed up exports seems nuts to me... Content creators cannot be expected to use an outdated version of Blender, to export incorrectly scaled and outputted fbx files, in an out of date version of fbx, that outputs at three times the byte size necessary, in order to create content for UMA.

    I know it will be a pain to fix this situation but surely it has to be done, its only going to get worse the longer its left as it is.
     
    Last edited: Sep 5, 2015
  48. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    The Blender files are the "source" files for the content, not the FBX files. When Blender gets its FBX export sorted out the FBX versions in the content pack can be updated.
     
  49. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    I appreciate that, but I am just concerned that UMA with respect to UMA in Unity is using messed up FBX exports from Blender as its 'starting point'. Of course I realize I don't know how UMA works, but from what I can tell alot of stuff is based on those initial fbx exports and they are dodgy.

    Thats all I am saying
     
    Licarell likes this.
  50. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Anyway any ideas about what I can do about my 'feet-moving-towards-hips-rather-than-hips-moving-towards-feet' issue?