Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

UMA Character System (deprecated)

Discussion in 'Assets and Asset Store' started by Jaimi, Dec 1, 2015.

  1. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    This is now part of UMA, as of UMA 2.5. It is recommended to use the updated UMA instead. It has many new features and bugfixes.

    Here is the first version of my recipe-based character system. It uses Recipes for the individual
    pieces and will correctly merge them in order, manage slots (so you don't have two hats on, etc) and apply hair/eye/skin colors to them when they're generated. It was everything that I needed to manage my avatars, and should work for most others.

    Since it requires a later version of UMA than is on the Asset Store, I've included the full UMA package with it, so it's quite large.

    http://www.aztica.com/images/UMACharacterSystem.zip

    Note: the sample scene is very limited, simply defining an avatar. I will work up a better sample scene for the first update.

    This version will work with Unity 5.2 + (I'll try to work around some compile issues for previous versions)

    I've attached the updated "manual" to this message.
     

    Attached Files:

    Last edited: May 23, 2019
  2. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Reposting from the UMA thread...

    We are on 5.1.3. Waiting until Unity is stable to upgrade as my programmers have had difficulties with 5.2. Really wish we could move on though.
     
    Vinchinderlous likes this.
  3. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Hi Teila -

    I've recreated the ColorUtility functions, and added them to the namespace. Include this file in your solution and it should start working. If you have any other issues, please let me know. I should have a better demo included in a few days, just need to carve out an hour or so to make all the recipes. The limited content that comes with UMA won't make an amazing demo, but I can still show:

    1. How to get all the Recipes for the wardrobe slots
    2. How to add wardrobe pieces
    3. How to remove wardrobe pieces (oh my!)
    4. How to hide parts of the base mesh.

    Jaimi
     

    Attached Files:

    Moerk75 and theANMATOR2b like this.
  4. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Fabulous! That was fast. :)

    I am somewhat familiar with UMA so I will see what I can do. This saves my programmer from having to make something special for me to test. He has it all working on the server but I want to test in my scenes first. I am hoping this will do it.

    Thanks again for sharing.
     
    Vinchinderlous likes this.
  5. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    The script worked, thank you! :)
     
    Vinchinderlous likes this.
  6. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    So far, seems easy to understand. The female peasant shoe is missing though, and I wanted to look at how to put in the "hide" parameters. Is this the shoe from Secret Anorak's videos or somewhere else?

    I would guess that I would type in the body part that is being replaced, such as feet, chest, etc.

    Once I get that info, I am going to try out Will's peasant outfit and see what it does. :) Having fun! And that says a lot when it comes to anything having to do with UMA. lol
     
    Vinchinderlous likes this.
  7. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Yeah, sorry - I left that recipe in by mistake - that's one of Will's actually. Will, if you're seeing this, It was only the recipe Not any of the assets. :)

    To hide something, just put the name of the "SlotData" into the hides field. To find the slot names to hide, just select your base recipe, go into the inspector, and collapse everything (easier for me then remembering every slot name). But for reference the SlotData names for female are: "FemaleFace, FemaleEyes,FemaleFeet,FemaleLegs,FemaleHands,FemaleTorso,FemaleInnerMouth,FemaleEyelash". The male names are the same (except for "Male" instead of "Female" of course).

    Next version I'll use the Split Head for the base recipes, that way you can swap out ears/noses.
     
    hopeful likes this.
  8. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Sounds great!

    I actually figured out that was Will's after importing the Peasant package. lol Still didn't work but no worries. I will just remake it with the rest of the recipes.

    Thanks for the Slot names, I should have figured that out but you are making it easier for me. :)
     
    Vinchinderlous likes this.
  9. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    @Jaimi

    Okay, so I am making the recipe but having trouble with adding slot and overlay data. Adding the Slot asset (M_Peasant_Hood_Slot.asset) to the first space: Add Slot, worked fine and opened the M_Peasant Hood area. However, I dragging the overlay and slot into the next two areas does not work. I am using the same slot asset as above and the corresponding overlay for the hood. When I drag them in, nothing happens. Having looked at the example for the hair, it looks like the overlays should appear below the bottom blue area.

    Screen Shot 12-01-15 at 02.16 PM.PNG
     
    Vinchinderlous likes this.
  10. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    ok - the first "add slot" at the top is to add a slot without an overlay. The second one (under the first overlay) is a way to add a slot that shares an overlay with the current slot. Dropping an overlay on the OverlayDataAsset field should have shown the overlay, and allowed you to set colors. Did you get any errors in the console? Does the overlay have the template material defined?
     
  11. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    No errors, and the overlay was from Will's male peasant outfit, the hood. Dropping it in did nothing.

    I will check on the template material, but I would guess it was there.
     
    Vinchinderlous likes this.
  12. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Will uses a modular system so maybe that is the problem. Here is a picture of the inspector for the overlay.

    Screen Shot 12-01-15 at 05.17 PM.PNG
     
    Vinchinderlous likes this.
  13. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    I am assuming your system does not use Legacy.
     
    Vinchinderlous likes this.
  14. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    It can use either one - it doesn't care how they are setup. The only problem that I see is that the template material is not assigned - you'll need to drop the UMAMaterial there, it's the last field.
     
    Teila likes this.
  15. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Ooo, okay. Thanks. I missed that.

    Edit: I assumed the PBR materials were already included with UMA but they were not. So downloading and trying those.
     
    Last edited: Dec 1, 2015
    Vinchinderlous likes this.
  16. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    @Jaimi

    I am sorry to be such a pain! Thanks for your patience. This really looks pretty nice to use. Tedious though to add all the PBR stuff in so will do that this evening.

    One thing about UMA, if you take a break from it, it all changes, and like other complex assets, you forget how to do things. :) Yours makes sense intuitively so much easier to remember, kind of like the Gaia of UMA. :)

    Hopefully I will have a UMA avatar running around in my scene by tomorrow thanks to you. I have spent the day going from the Character System Project and making some new fields in another project.
     
    Vinchinderlous likes this.
  17. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    Just so you know, I'm lurking. I did get the project downloaded and ran the scene (no PBR), but haven't had time to do anything else yet. But I'm interested in working more with recipes, and I look forward to seeing what this new add-on does. :)
     
    Teila likes this.
  18. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Used Jaimi's handy dandy method of getting all my PBR overlays and slots in! Yay! So they are all in and all I have to do is change Will's. A little shopping tonight with my daughter and then back to see if I can get it to work for me. It is looking very good!
     
  19. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    You're not a pain, I don't mind. I'll try to have some more complete demos up this weekend.

    Also - If anyone is aware of some (free) content I can include to make the demo(s) a bit more interesting, please let me know.
     
  20. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Secret Anorak has a few things, a t-shirt, a hair, and shoes. You could ask him. He is very nice. :)
     
    Vinchinderlous likes this.
  21. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    I now have another question! lol

    Back to the slot names to hide, can I put more than one slot in and if so, do I separate them by spaces or commas? Some things, like Will's maiden dress require the hiding of more than one slot.

    Thanks!
     
    Vinchinderlous likes this.
  22. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Yes - seperate by comma. You'll also want to use the "suppress slot", to hide anything that is attached to the legs.
     
    Teila likes this.
  23. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    I'm very excited to try this out, but everytime I try to run the scene in the latest version of Unity (5.2.3 I think) Unity freezes and I have to CtrlAltDelete to shut it down... Any idea what might be going on?
     
  24. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Not sure, haven't seen that before. Are you on Windows or Mac? I'll try to duplicate it, see if I can figure out what is happening.
     
  25. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Maybe David is putting in the script you gave to me to use 5.1.3. :) That might cause a problem.
     
    Vinchinderlous likes this.
  26. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    That should be in it's own namespace, so shouldn't affect anything - with Unity though, who knows?

    David - Are you loading the "CharacterSystemTest" scene? And if so, if you disable the avatar object in the scene, does it still hang up?
     
  27. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    I'm pretty sure I am using the version linked to in the first post here, anything I should do to check?
    Also if I turn off the Avatar in the CharacterSystemTest Unity doesn't hang (and I can run the standard UMA example scenes ok too...)
     
    Last edited: Dec 3, 2015
  28. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Thanks, I've setup a windows box, and am trying it on there.

    Edit - I can't get it to crash no matter what I do, on Windows/Mac, Pro version, Free version. Do you see anything in the log? Have a debugger attached, anything like that?
     
    Last edited: Dec 5, 2015
  29. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Yeah so nothing in the log...The only thing I am using apart from vanilla Unity is a thing called 'SpacePuppy' so possibly there is a conflict there... But there must be some kind of leakage somewhere because I just added this line of code to a c# script that was working fine a second ago and my pc has slowed to a crawl and the fans are maxxed out...
    Code (CSharp):
    1. if(UMA.OverlayColorData.SameColor(_sharedColorList.colors[i].color,this._currentColor))
    And that is just a line in a custom component in a scene that has no UMA at all...
    Appologies if its unrelated, but either way either you or SpacePuppy should be namespaced so you dont conflict... I'll do a restart and create a vanilla project sans SpacePuppy and report back...
     
  30. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Ok so after restarting, everything seems a bit more sane...So do you think it could be something to do with load order? i.e. I know some plugins I have bought say that you will need to re-import them in to Unity because Unity imports things in an order that is appropriate for them? Could that be what happened to me with what you have made do you think?
     
  31. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Honestly, I'm not sure what happened - likely something inside the SpacePuppy framework interfering with UMA. The Character system is in it's own namespace already, so I'm not really sure what could have caused the initial issue. Anyway, glad it's working for you now.
     
  32. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    I'm preparing an update to the system, should be uploaded this evening.

    It includes a simple editor, along with recipes created for the female character. The editor shows how to set colors and change wardrobe items. Here is the sample scene in action:



    The "user" code is all in one class, and is commented. I've removed the hard-coded color names, and made colors completely dynamic - so you can call them whatever you want, and create as many as you need. Note that the default colors in UMA are named "Hair" "Skin" and "Eyes", so you should start with those.

    I've added a few more overlays for the default clothing, so there is a bit more variety.

    The package has been updated, and is available here:

    http://www.aztica.com/images/umacharactersystem.zip
     

    Attached Files:

    Last edited: Dec 6, 2015
    John-G, hopeful and BackwoodsGaming like this.
  33. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    What are the pros and cons of using recipes for character creation?

    Pros:

    1. You can stack as many slots and overlays on a piece of equipment as you like - for example, you can have a chest armor made up of a chestplate and shoulderpads. Or using Wills wanderer armor, you can have the shirt+neck+bags+roll (all seperate slots with overlays) be one single piece of equipment. All predefined.
    2. You can hide parts of the body or other equipment that would be covered by the wardrobe piece. For example, if you add gloves, you can hide the "hand" so the finger meshes don't z-fight and show through. And it's all automatic if you specify it.
    3. The system scans for recipes, and loads and categorizes everything for you. You can add whatever fields you like to the text recipe, because it's a partial class. So when your app starts up, the system has a list of all your wardrobe pieces, neatly indexed for you.
    4. Everything is data-driven, making it very easy to use. I wrote the sample application (in the movie above) in about 30 minutes.

    Cons:

    1. The recipe editor can be a bit daunting to get started with.
    2. The recipes store the overlay data plus offsets once they are created. If the size of an overlay has changed, the recipe would need to be rebuilt.

    Q: Why don't you change that?
    A: Recipes are at the base of how UMA works. Changing this is a big deal.
     
    TeagansDad, twobob and Teila like this.
  34. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    What are the consequences for people using a custom race? have you made everything work with that scenario or hard coded in stuff relating to the UMA base meshes? Just wanting to hear your thoughts on this...
     
  35. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Jaimi, we are having problems with Will's maiden dress. It is an unusual case because the neck piece is separate. I was unable to hide the torso using the recipe so not sure why that isn't working.

    I am going to start over with it and see if it will work.
     
  36. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    It did not work, Jaimi. Here is a picture. I can get everything else to work but that dress just won't work. The torso is not being hidden or suppressed. In the picture, I tried suppressing the arms, but it made no difference. I don't have the neck in the slots at the moment since it made no difference. I was testing to see if the chest/torso would be hidden. In the back I can also see the torso poking through. I imagine you do not have this particular asset. I can't imagine why the torso won't hide.

    Screen Shot 12-08-15 at 11.47 PM.PNG

    PS. It works with the old element system we have, but not with the recipes.
     
    Vinchinderlous likes this.
  37. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    @Teila - I'm not sure how Will handles that, but is it possible there is a special neck piece that goes with the dress? And then hand slots would attach at the sleeves.

    My thought is that probably a whole torso doesn't go under the dress.
     
  38. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Hopeful, that is the problem! :) I can't get the torso to hide. The neck piece just ends up over the torso so makes no difference right now. I can't figure out how to fix this.

    If you look at the inspector in the picture, I have the torso as hidden, but it is not hiding.
     
    Vinchinderlous likes this.
  39. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    Hmm. I don't know how to interpret what you've got there, but I see you have "Suppress slot: Arms," which makes me suspicious, as chest and arms are both part of the torso slot in the standard layout of UMA.

    You're not trying to suppress arms while still keeping the torso, are you?

    FWIW, it seems like I also see clipping in the dress for the lower belly and leg. So I'm going to guess you have those parts there too, when they should be hidden / not present.
     
  40. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    No, I am trying anything. I tried hiding torso, it didn't work. I tried suppressing chest and then arms. Suppressing simply suppresses what is on the arm, I think. So ignore it since nothing else is attached to the arm. The dress is attached to the chest.

    Yeah, they do have parts that need to be hidden, but nothing seems to be hiding. Everything else has been fine, just this one dress.
     
    Vinchinderlous likes this.
  41. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    Well, you're ahead of me on this one. I haven't managed to get into the UMA Character System yet. :)
     
  42. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Nothing is hard coded - You can use whatever meshes and stuff you like.
     
  43. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Sorry I'm late - for some reason I didn't get notifications for the thread!

    Anyway, I have that asset also, and have used it successfully - The Maiden dress hides "FemaleTorso", Wardrobe slot is "chest", Suppress Slot is "Legs" (to hide any lower armor you might have).
    The recipe slots include

    "Maiden Neck" (overlay F_H_Bod)
    "Maiden Dress" (overlay Maiden Outfit)
    "Maiden Belt" (overlay Maiden Outfit)

    It *should* work -- Here it is for me:



    Screen Shot 2015-12-09 at 7.07.46 PM.png

    And here is the recipe:

    Screen Shot 2015-12-09 at 7.09.49 PM.png
     
  44. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Thank you! I will try it. If it works for you, it should for me. :)

    Pretty character creation screen, btw!
     
    Vinchinderlous likes this.
  45. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Thank you, Jaimi. It is working now. I was putting on things I didn't need. :) I remember that Maiden dress was tricky in UMA 1 too. I appreciate the help.
     
    Vinchinderlous and hopeful like this.
  46. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    No problem, I'm happy to help. The Maiden dress is the reason I added the "suppress slot", it was too problematic. :)
     
    Teila likes this.
  47. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Now the task of switching our character creation system from using elements to using recipes. I am assuming, since DNA works the same, our sliders are fine. Thanks so much for the example scene with the clothing/hair/skin switching UI. That should help a lot. My programmer is a little UMA weary I think, but he is coming around.
     
    Vinchinderlous likes this.
  48. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Shouldn't be a problem - DNA works like you would expect, with one caveat - if you rebuild a character (with Avatar.BuildCharacter), you need to be sure to pass "true". This is because recipes can contain DNA also, so you need to preserve what was already there. This is on purpose, so you can adjust the DNA on the base recipe for different races (Halflings are short and squatty with big noses, Elves are tall and thin with a beak nose, etc).

    I included some classes for DNA editing, but you don't need to use them. I'll include DNA editing to show off their use in the next release.

    Jaimi
     
    Teila and BackwoodsGaming like this.
  49. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    This looks like a great resource! Thanks for sharing with the community, @Jaimi! I've been following the discussion since you initially posted. Love that you are very responsive to questions! I'm not working with UMA atm but have filed this away along with @SecretAnorak's videos to dig into when the time comes! Again, thanks for sharing and awesome work!
     
  50. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Fabulous! :) I only have the default races although would like to add children eventually. Waiting on Secret Anorak to teach us how. lol

    In the meantime, this is more a UMA chat question but they are quiet it seems....is there a way to adjust the DNA to go below or above the range that is coded into the system? I would like to have flatter chests for the ladies available. I know..that is not popular, but I want to make younger versions for NPCs.
     
    Vinchinderlous likes this.