Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    That is what i though originally now im not so sure, I think its the actual modeling of the hair cause if i seperate just a scalp with nothing on it and place it on the UMA the scalp cap comes in fine.

    I have never created hair before this so not sure how it works and i understand this is a blender side of modeling but I am hoping if not you someone can point me in the right direction for how you make the hair so i can import it..

    Is it Hair cards or an actual mesh of some sort, and if one or the other what is the process. Is there a tutorial on it somewhere i can lean it if im pointed in right direction as of right now ive tried so many variations im loosing track of what i have and havnt tried if that makes sense
     
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    How many polygons (triangles) are in your hair? If it's more than 64k, then that will generate an error, and stop the model from building. Do you see any errors in the console?

    You may want to load up some of the existing hair (like the ponytail fbx). Like hopeful says, it's just a polygonal mesh in the end just like everything else. If you're generating a mesh from particles, then that could generate a ginormous mesh. I think this is the tool that umut was using to generate hair: https://gumroad.com/l/hairtool - I don't have any experience with it beyond knowing the link.
     
    Last edited: Oct 23, 2018
  3. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Sorry - not really sure what is going on. Unity can do funny things with meshes and rotations when converting between different coordinate systems. It's possible that you may need generate a rotation matrix and multiply all the vertexes to adjust them.
     
  4. EnriquePage91

    EnriquePage91

    Joined:
    Jul 2, 2015
    Posts:
    67

    Thanks!

    I definitely will try that too.

    However my question is really st this point more related to UMA in the sense that I can't cast their Skinned Mesh renderers to Mesh Renderers without them behaving in a crazy way. That does not have anything to do with Mega Fiers so I was wondering if anyone understood why this is happening.

    After all something like this could be very well be used to leave the dead bodies of UMAs behind without having to consider the performance of their bones, it's really not about Mega Fiers as this could be used
    for many other purposes.

    If anyone has had any luck on that, it would be very appreciated. As for now I will simply try to see what else can be done, thank you guys!
     
  5. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    I am getting no errors like that anymore i figured that part out but i was not aware of a ponytail fbx or any other hair fbx where are they located if i can see them i can figure that out, That would be enough

    i went through the Uma files in Unity didnt see any hair fbx's so please let me know where to get them


    Thanks
     
  6. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    So you're able to make your own custom clothes and bring them into UMA and have it all working? If so, hair is exactly the same, you'll just have it skinned all to the head adjust bone (unless doing some advanced hair). If you're still having problems you can PM me and we can go through it step by step or if you send me your email address I can invite you to the UMA slack channel.
     
    Jschilz1 likes this.
  7. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47

    I will pm you with my Email, but if i can find out where the Fbx File @jaime was referring to i can prob fig it out i just need to see how it was set up in blender i think and thanks again you all are great.
     
  8. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    Hair meshes definitely work, because you see those in the UMA kit. I would think hair cards work as well, because it is still a mesh with an overlay, but maybe there is a clever way to do it wrong. ;)
     
  9. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    I think i figured out the Hair part now its not fitting right , If you can take a look at the picture below and let me know if you can tell me what is wrong

    I do have it set as a hair slot using a single sided overlay
    BadMohawk.png Inspector.png Blender mohawk.png
     
  10. GeekosaurusR3x

    GeekosaurusR3x

    Joined:
    Nov 22, 2013
    Posts:
    15
    Hi guys

    I have another question about multitexture / submeshslot.

    I try to create some hairs and i a little problems.

    First the gameobject direct after the import
    Second the wardrobe recipe created Hair_recipe.png
    Third the mesh generated by the slot builder hair_slot_mesh.png

    For now all is good but when i it play
    OnPlay.png

    The Alpha slot mesh (the second in the recipe) not look good.
    But i i select "Everithing" in the recipe for "Hide baseslot(s)" OnPlay_maskeverything.png it's ok.

    So i must do something wrong but i don't know what.
     

    Attached Files:

  11. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
    It looks like when I had exceeded the 64K polygons (all messed up) check your hair mesh how many polygons (tris) does it have?
     
    Last edited: Oct 23, 2018
    Jschilz1 likes this.
  12. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
    That kind of offset may happen when the position of the object is not 0, 0, 0 in the 3d program. Can you check if you have applied all the rotation position and scale before exporting the fbx? (in blender it is done by hitting ctrl + a and selecting location, rortation and scale one at a time)
     
    hopeful and Jschilz1 like this.
  13. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    that was the first thing i thought so i went back and reapplied to make sure and same issue
     
  14. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Did you copy the bone weights using the data transfer? Did it create the vertex groups needed and assign the vertexes?
     
  15. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    yes i did ill make a video of it all to see if it makes it easier to see thanks for the help

     
    Last edited: Oct 23, 2018
  16. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
    The weight painting looks wrong. Do you see it moves with the head when you rotate the neck bone in blender?

    It looks like it is rigged to one of the spine bones or the hip instead of the head / head adjust.
     
    hopeful and Jschilz1 like this.
  17. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    Thanks You i thought i had done that but i went threw so many versions i must have missed it on this one. At least now i know what that looks like now so ill know how to fix thanks again

    Blender mohawkgood.png
     
    hopeful, ecurtz and umutozkan like this.
  18. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
    Hey guys,

    I just want to announce that the new UMA Community Forum has been created and ready for use here.

    The forum is moderated by UMA Steering Group. The main idea was to prevent answers given in this thread from being buried in time. There is a community support section where you can ask for help. It will be searchable by other people who have similar issues.

    There are other sections like tutorials etc. so hopefully it will turn into a knowledge base for UMA in the future.

    See you there ;)
     
    Last edited: Oct 25, 2018
  19. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47

    Thanks @Jaimi ,@hopeful , @kenamis and all those who helped i think i finally figured things out and understand the concepts and shaders, There were several steps i didnt grasp with the Shaders not working and missing some things on my modleing section but now i got it

    Indian.png
     
    kenamis, hopeful and Jaimi like this.
  20. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    Yeah, there are a lot of small steps to go through when you first set up, but once you get the first complete bit of workflow done, you're basically golden ... good to go! :)
     
    Jschilz1 likes this.
  21. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    So far I have been able spawn a UMA prefab into the scene with no problems. I have a question about saving. I'm using Opsive TPC (Legacy) and Inventory Pro. I have all three systems working together. I'm trying to figure out how to save equipment for the player. So like the player loots a chest piece and equips it then quits the game. I would like for it to load the equip back on the player's character. I have been looking at using Easy Save but I would like to see if anyone has done this before.
     
  22. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You can save the character to a string, and then reload it with its wardrobe intact. I'm on my phone so I don't have access to the project, but I believe this is covered in the faq
     
  23. umutozkan

    umutozkan

    Joined:
    Oct 30, 2015
    Posts:
    406
    I knew there was a faq somewhere :)

    I have put it on the UMA community forum here https://umacommunity.boards.net/thread/13/uma-2-6-faq
     
  24. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    I'm using Playmaker to save the string. What is the function I'm looking for? "GetCurrentWardrobeRecipe"
     
  25. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Here is the info from the FAQ, I've highlighted the two functions you need.

    Q: How do I programmatically Load and Save a character to/from a string?
    To get the current avatar as a string call “GetCurrentRecipe()” from the DynamicCharacterAvatar. You can save or transmit this string as needed. To reconstitute the avatar from the string, call “LoadFromRecipeString()”, passing the string you got from GetCurrentRecipe().
     
  26. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Hey guys,

    I am getting the "Jaw open" issue on all of my UMA characters currently. Do you remember what the fix is for this? I had it awhile back but I forget how to fix it. I think I had to go into the rig settings of the .fbx file and do something with the jaw bone (like set it to the upper head or something)....but I can't remember.

    If it is messing with the .fbx file, which .fbx file does the UMA generator use? Or maybe there's a DNA slider somewhere? Thanks for any info.
     
  27. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    This is a unity issue - it happens when you have an avatar that has the Jaw set, but the animation doesn't animate the jaw.

    You can fix this by using an avatar without the Jaw. Or you can add the expression player, and force it to close the jaw. or You can fix the animation (add the jaw bone).
     
  28. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437

    Ok thank you.
     
  29. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    I posted about not being able to get the expression player to work, but I found that I had two "Expression Player" scripts. The one I needed is actually the "UMA Expression Player" not the regular "Expression Player".

    I have the expressions working now, and the blinking. The blinking is really cool! UMA is pretty amazing sometimes. :)
     
    hopeful and umutozkan like this.
  30. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Yeah, that's pretty nice - i think Eli did it.

    You can add this as a slot also (by dropping the ExpressionRecipes slot).
    I like to modify the default parameters - set the blink duration to 0.8, and the min blink delay to 3 and max to 7. Turning on the saccades (eye darting) is pretty cool too.

     
    umutozkan and hopeful like this.
  31. electro_unity

    electro_unity

    Joined:
    Nov 29, 2015
    Posts:
    64
    Is it possible to export UMA characters to FBX?
     
  32. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    There's a built-in export to OBJ, but not to FBX.

    I believe Joen's fbx exporter will export UMA's - you might ask on his support forum:

    https://forum.unity.com/threads/uni...-skinned-meshes-terrains-and-textures.434348/

    The asset is here:

    https://assetstore.unity.com/packages/tools/modeling/unity-fbx-exporter-69997

    Unity has their own FBX exporter, but I haven't tried it, not sure if it works on a UMA during runtime:

    https://assetstore.unity.com/packages/essentials/fbx-exporter-101408
     
    electro_unity likes this.
  33. electro_unity

    electro_unity

    Joined:
    Nov 29, 2015
    Posts:
    64
    OBJ is fine too. Could you give me a clue on how to do that? I searched on UMA's wiki and youtube tutorials, no mention of exporting created characters.
     
  34. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    It's on the UMA menu. Select your character, and select the menu item. I've never actually used it. The downside of obj format if course is that it doesn't contain the skeleton - all that info is lost.
     
    electro_unity likes this.
  35. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    @Jaimi @kenamis @hopeful or anyone who can help i have two questions

    first Im geting better with my modeling but having an issue making the models when adding to an uma to have them use several overlays on one slot, It keeps giving me a slot for every material but if i remove the materials then its all one color and when i keep them as multiple slots then somehow it changes my overlays all to match one of them. What i am aiming for is taking a item of clothing and allowing for script to change colors to different sections that i have textures and mapped here is a look at a shirt i did but the Collar and cuffs are suppose to be able to be different colors than the shirt itself here is an example of the shirt
    Shirt_Example.png

    Next Question is to do with Cloth Creation and explaining how it works ive tried watching Will tutorial but im not grasping the concept here is the issue im running into

    I have a dress for a female Victorian age. Because of the Bustle the dress extends out and the arms are penetrating into the dress as you see here Victorian Dress Example.png Victorian Dress Example2.png

    In this one as well id like to have the textures able to be changed but in this case i imported it in as 1 material colored already so i cant change the colors or they would be off because it would blend with the Base color which in this case is not white like the previous one.

    But i do see the cloth area in the Uma Materials and i know that it has something to do with the colliders just not sure how to set the cloth up so any help would be greatly appreciated, step by step for a child works for me lol

    Thanks as always
     
    Last edited: Nov 13, 2018
    hopeful likes this.
  36. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Hey guys,

    I'm spawning a lot of UMA 2.x characters into my scene for a crowd (like 200+), and I was just wondering if anyone knows what happens if you don't manually call the Garbage Collector at all during the game?

    For example, in the "UMAGenerator" gameobject script there is a "Garbage Collection Rate" which calls GC.Collect about every 8 UMA's spawned into the scene currently (which causes a huge framerate drop that I want to avoid). But what happens if you never call GC.Collect at all? Would something terrible happen?
     
    hopeful likes this.
  37. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    If you never call GC.Collect, then the system should automatically call it at some point (when it determines that it needs to). This could cause a spike when you don't expect it. We're all waiting for the day when the new Garbage Collector goes into place (I think it's in 2019).
     
    Velo222 likes this.
  38. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    When you apply multiple materials in Blender (or any modeller) it will generate submeshes in unity when it is imported, and these will be converted to additional slots when uma-fied.

    When creating separate overlays to colorize things, it's important to do that only in Unity so this doesn't happen. The portions of the second overlay are overlayed using the opacity of the alpha channel of the diffuse texture. Just add the second overlay after the first.

    You can also add it on a separate recipe. To do this, add it to the original slot, and add the second overlay. The original slot will be "merged out", and the second overlay will apply after the first, so it all works out.

    If you're not seeing your texture take effect, then make sure that the Wardrobe Slot is after the original in order (they're applied in the order you see them in the race data).

    As for the cloth, perhaps someone else might have more information. However, this is a common problem with all low poly modelling. Sometimes you have to fix it in ways that don't seem perfect - ie, adjusting the base arms out, or squeezing in the dress. Cloth physics are possible, but costly (i'll let others address this). Another option is soft-body physics (like with VertexMotion). I'm not an expert on either of these.


     
  39. Jschilz1

    Jschilz1

    Joined:
    Jul 18, 2016
    Posts:
    47
    Thanks Jaimi that makes sense i was trying to make them all have different textures and such so they werent exactly alphas. Now that i know i can solve that quite easily.

    As for the cloth i understand there is a cost and here is my issue and maybe if cloth is too expensive you can maybe help me with a workaround that will still look decent and act functional.

    If I have a Character that is wearing lets say a long coat or a trench coat and is reaching for a gun that is on his hip or shoulder harness how to grab it without seemingly going through the coat to draw a weapon. my initial thought was to add the cloth simulation so when the hand reached for it it would push the cloth back and the gun would then be accessible.

    Any thoughts to that that could help in my planning
    thanks again
     
  40. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Ok I found something else that helps me a lot with performance, but I need help with doing it before the game starts. As I said before, I'm trying to generate about 100 - 200 + UMA characters into my scene.

    I found in the UMA Generator gameobject script that if I leave the "Convert Render Texture" option on false (not checked), then overtime I get too much garbage collection for my system to handle without a lot of little fps stuttering (micro fps drops constantly) over a certain number of UMA's (for me it's at about 80 UMA characters).

    I found though, if I set "Convert Render Texture" to "true" (checked), it actually cuts down on the GC a lot over time. I know it actually makes it a real texture on my materials.....but it causes a large FPS drop for each UMA when it's spawned into the scene, because it's converting the texture/atlas I believe correct?

    So, my question is, is there a way to convert the textures before the game starts myself, and then simply add the textures to the materials myself, so no conversion at runtime is required, and I can avoid those fps drops during the texture/atlas conversion?
     
    Jschilz1 likes this.
  41. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Personally, I would rig the cloth there to a bone, and then include that bone as part of the animation. I'm sure it could be done with cloth, though - you'd have to have some sort of collider on the hand to push it back. But honestly, I've not been working with cloth in unity, and am not really sure how to do it right.
     
  42. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    No, sorry. The atlases are created with Render Textures at runtime, so to make them "regular textures", they have to be converted. I think you'll likely need to look into the UMASimpleLOD and perhaps lowering the overall quality/atlas size on the generator to be able to keep the memory requirements down.
     
  43. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437

    Thanks Jaimi. But is there maybe a way to save the converted texture to a prefab, or asset or something? Or perhaps reference it for one of the generated UMA's when it's created at runtime, and then use it on others? Just trying to think. If not, then I'll just try lowering the atlas resolution like you said, and see if it's performant enough for me.

    Thank you.
     
  44. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You can save the textures for a generated UMA at run-time (from the UMA menu item), and you could concievably construct a material, and replace the generated material with the one you pregenerated with a script. You'd probably want to make the runtime generation (the one you replace) super-tiny so it's not such a big hit when it gets cleaned up.

    You can also save an entire pregenerated UMA to a prefab if you use Joen's UMA Power Tools.
     
  45. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Ok, thank you for the help.
     
  46. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    During runtime I found that on the UMA Generator script there is information about "Shape Dirty, Texture Dirty, and Mesh Dirty". For me, every time I generate an UMA character, it says Time Spent: 344 ms, Shape Dirty: 0, Texture Dirty: 2, and Mesh Dirty: 2.

    Does this mean my texture and mesh are still dirty? Or does it mean they were dirty, but have been cleaned up?

    If they're still dirty, what is the code to clean up the texture and mesh so they are no longer dirty?

    I've tried this code so far:

    Code (CSharp):
    1. umaDataInstance = gameObject.GetComponent<UMAData>();
    2.             umaDataInstance.Dirty(false, true, true);
    3.  
    4.             avatarScript.ForceUpdate(true);
    But it doesn't seem to do anything to the texture/mesh dirty counts.
     
  47. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Those flags mean that a UMA is being generated (there are 2 umas that need their texture generated, and two that need their mesh generated). This is taken care of by the generator, you don't need to do anything, nor do you need to manually call the dirty function to set the dirty flag.
     
  48. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Ok thanks. :)
     
  49. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Hey guys, does UMA work with the HD SRP, and if not is there a roadmap or rough timescale for it?
     
  50. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    No, there's some issue with it right now. We're looking at it, but we don't have a timeframe.
     
    Whippets likes this.