Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    Those things on the DCA just specify where to load the character definitions from. All the big stuff will be handled by Unity. The global library resides in a resources folder here: Assets\UMA\InternalDataStore\InGame\Resources

    I'm not sure if moving the AssetIndexer from there to the other folder will work. Might give it a try.

    But If you want to get out of having too many files in resources, the straight answer is to move them to Asset Bundles. They will still be found by the Dynamic Libraries, and everything should just work. (you'll need to build the asset bundles, and distribute them though).
     
  2. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    Would it be possible to drag and drop the file to be loaded too/instead?
     
  3. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    Not currently, but I can add that to the trello list - then we can fill in the filename, and set the load options.

    You can also load/save the character yourself as well, if that fits your needs also (if you store it in a DB, for example)

    Code (csharp):
    1.  
    2. string savedAvatar = Avatar.GetCurrentRecipe(false); // Avatar is a DynamicCharacterAvatar
    3.  
    4. //Then load him from that string:
    5. Avatar.LoadFromRecipeString(savedAvatar);
    6.  
    7. //After loading the avatar, it should be rebuilt:
    8. Avatar.BuildCharacter();
    9.  
     
    LoekvanKooten and kenamis like this.
  4. DankP3

    DankP3

    Joined:
    Jul 17, 2017
    Posts:
    68
    kenamis and Jaimi like this.
  5. Hellwaiker

    Hellwaiker

    Joined:
    Jan 8, 2016
    Posts:
    73
    Has anyone experienced problem with multiple slots being created from single mesh? For Custom female meshes I get separate Head/Teeth slots created using slot builder even though in 3D application and Unity they are merged. With Male meshes teeth/head are same mesh. Can't figure out what is different.
     
  6. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    The slot builder will create a slot for each submesh. Unity will create separate submeshes at import time - one for each material in your model.
     
  7. Hellwaiker

    Hellwaiker

    Joined:
    Jan 8, 2016
    Posts:
    73
    Thanks! The material was the problem, I had two.
     
  8. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    490
    Hi, guys, my game is using up to 20GB when entering Play mode and here is one problem we found that related to bloated memory.

    This is an Empty Scene memory profiling.
    The bottom half is from UMA texture and it looks like it load all texture whether it is used or not.
    The total UMA texture size is about 1.65GB.
    There might be other UMA related stuff as well but texture by far the biggest.

    upload_2019-2-23_0-29-23.png
     
  9. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    Behind the scenes, unity is treating the resources like an asset bundle. It will be loaded into memory when accessed. To limit the amount of RAM used, it's best to go through and make sure you don't include any assets that you don't need. In addition, make sure that you have compressed all of your textures to the maximum that you can while still keeping texture quality. You should also look at all of your textures, and change the imported texture sizes if they are too large. If you do this, and are using partial overlays, you will need to adjust the rectangles for the overlay in your recipes as well.
    We are looking at ways to force Unity to unload textures when they haven't been accessed in a while, but this will likely not be ready until version 3 and we switch to addressables.

    If you switch to using Asset Bundles, then you can manage the load/unload of them yourself. However, this is an advanced topic and will likely require a lot of knowledge on the UMA internals and of Asset Bundles as well.
     
    hopeful and kenamis like this.
  10. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    490
    Hi, Addressable sounds exciting and I'm really looking forward to it.

    I just want to point out that this is the Memory Profile on an Empty Scene and there is nothing in it except a camera and a light.
    When UMA loads all textures in the project, there is very little I can do optimizing.
    Hm...
     
  11. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    Yes - it's because the items are in the resources. You can manage things yourself (by using scene-based libs), but then you need to plan what is available in each scene. And if you have a character that can wear anything, then you basically have to have everything in every scene -- which is why the global library exists, so you don't have to do that.

    I'm assuming you are developing for mobile? so you need to be very conservative on what you include in your app. Remove everything you do not need, and compress everything as much as you can. Removing something from the global library will exclude it from being included.
     
  12. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    490
    Hi,
    I'm developing for PUBG like PC online game and it will have 100s of wardrobes.
    Items are dropped in-game, therefore, I do not know what's available in each scene.
    On-demand loading is what I need and it sounds like I'll have to wait until the Addressable.

    Is there a rough ETA of Uma v3?

    Thanks.
     
  13. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,913
    Is it not possible to load slot and overlay assets at runtime, and remove them when done?

    UMA shouldn't be set up such that you must have all your assets loaded all the time. I believe it is set up that way for the examples to make it convenient, but part of the idea with UMA is that at any time you should only load what you need to use.
     
  14. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    My estimate would be about 1 year of development before it is released. For a PC game, I would not be too concerned about 1.6GB of memory - you can cut that in half by removing things you don't need and carefully adjusting the texture sizes. Plus, what you don't use will be swapped out to the hard drive automatically by Windows anyway. Of course, you could go the asset bundle route also.
     
  15. twospoonstn

    twospoonstn

    Joined:
    Mar 10, 2013
    Posts:
    12
    Question -
    Is there a way to make overlays work like an atlas texture? That way I don't have to have 20 overlays / recipes for my eyebrows. I looked through the code and it seems like the offsets are only in relationship to where the texture is going, not where it's coming from.

    If not, is there a way to programmatically create wardrobe slots? I look through the code, and I cannot for the life of me figure out how the Slot is tied to a recipe (in code).

    Thanks for an awesome framework btw. I have made some strides with integrating it with the oculus framework also. Works pretty well.
     
  16. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    There's not currently a way to construct an overlay from an atlas, though that is a good idea and I will put in a trello task for it.

    You can programatically create wardrobe recipes from slots and overlays - look in UmaEditorUtilities.cs, in the SaveAsRecipe and CreateRecipe functions.
     
    hopeful likes this.
  17. twospoonstn

    twospoonstn

    Joined:
    Mar 10, 2013
    Posts:
    12

    Thanks,
    I'm curious to how you would solve the atlas texture without having to have n number of overlays.
     
  18. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    I'm thinking we would just allow you to enter a source rectangle, and use that when creating the atlas. Because of the number of things that would have to change, it's probably not something that will be coming in the near term though. There is quite a bit of code and several shaders that would need to be modified.
     
  19. Rob4

    Rob4

    Joined:
    Aug 4, 2017
    Posts:
    3
    Hello. I have a problem with UMA and i couldn't find an answer so far. I would be glad if someone here could help me out.

    I want to create procedurally generated NPCs at runtime using UMA. What is the proper way of doing that? if a simply add the DynamicCharacterAvatar to a GameObject, then of course it is missing all the properties. Is there an easy way to initialize it?
    I am fairly new to unity, programming and uma, so if i am missing something obvious please excuse me.
     
  20. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    If you are wanting to randomly assign Skin colors, hair colors, set DNA within set amounts, and add randomly preselected clothing, there is a new feature that does just that in the next update.
    If you are wanting to do something else, will need more info.
     
    hopeful likes this.
  21. Rob4

    Rob4

    Joined:
    Aug 4, 2017
    Posts:
    3
    @Jaimi
    that is kind of what i want to do, plus give the npc a name and store/pool it. i want to do it at runtime though.
     
  22. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    Then the new UMARandomAvatar is just what you need. It let's you do all that. You can generate one, pull its character string and save it and reload it later (via DynamicChatacterAvatar). You can even specify different sets of random info, so you can have a random dwarf, random elf, random dark skinned character ( with matching dark hair and features), etc.
     
    DankP3 likes this.
  23. Rob4

    Rob4

    Joined:
    Aug 4, 2017
    Posts:
    3
    @Jaimi
    neat! when is that update coming?
    btw i am impressed by the work you do here. everytime i look for info related to UMA i see your posts here. i wish there would be a dedicated forum for UMA, so it wouldn't all be in one single thread.
     
  24. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    334
    http://umacommunity.boards.net/forum
     
  25. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    43
    All right, so I decided to make a new project to consolidate all my things: UI, battle system, etc. It's a brand new project, it's clean, mostly everything works and it's nice, except for my UMA Race.

    Default UMA races works perfectly. Mine does not. It works on my two other projects: the one I use to make the clothes on Unity 2017, and the one I used to test the whole thing on Unity 2018.3.

    In my new project, I imported only my race and it's dependencies, (shaders, textures, meshes, etc) along with every slots, overlays, dna files I used, tucked neatly into subfolders.

    The UMA indexer sees it correctly, everything seems fine. On play test, though, it doesn't build my race. It just doesn't appear. HumanMale, Female, SkyCar etc. all work, but when I select my race, nothing happens. No errors, no warnings, nothing. If I start a playtest with my race as default, there's nothing appearing. Nada. When I change the race via the UMADynamicCharacterAvatar at runtime via the Inspector, to HumanMaleDCS, for example, it works without issues.

    This is on Unity 2018.3, UMA 2.8 RC3.
    -----------------
    DISREGARD. This was me being an idiot. I have deactivated warnings and didn't see what the problem was. It was due to UMA 2.8 RC3 having a new DynamicDNAConverterBehaviour. I just had to open the prefab and click Find and Replace all just like it told me to do, then that's it. Everything was back to normal.
     
    Last edited: Feb 24, 2019
    hopeful likes this.
  26. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    My guess would be a few weeks. You can pull the develop branch if you want to get a head start:

    https://github.com/umasteeringgroup/UMA/tree/develop?files=1
     
  27. Andrius32

    Andrius32

    Joined:
    Nov 27, 2018
    Posts:
    17
    Hey i have question :) How could i create UMA character over the network? Problem im having now is: Im trying to create characterat my character selection scene -> load Main Scene -> Instantiate selected character from Resources folder over photon network. Geting ERROR about prefabs...cant rly understand where the problem exactly located. Or maybe i just can't do that with UMA? If its posible , maybe someone could add link to tutorial or documentation page...Thanks :)
     

    Attached Files:

    Last edited: Feb 24, 2019
  28. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    I have no clue how to do this in Photon. In a generic networking model, the simplest thing to do would be grabbing the current recipe string, sending that, and then loading it on the other side (See "Saving and Loading from a string" in the documentation). Note that all clients have to have all of the data indexed on both sides (either in the global library or in Asset Bundles).
     
  29. Andrius32

    Andrius32

    Joined:
    Nov 27, 2018
    Posts:
    17
    In Photon same, but it should be in assets/resources folder. Well i made it to work in other way. i created character and then made prefab. before i saved it , so it spawning now, but animations not working...i think maybe i need reinstall everything, getting alot errors :(( Thanks for an answer :)
     
  30. Nynex96

    Nynex96

    Joined:
    Sep 15, 2014
    Posts:
    2
    Currently running into an issue. I set the active race in the inspector to a custom race and when I hit play it reverts back to the default HumanMale. This causes my wardrobe to disappear, once I manually set the active race during playmode to the custom race the wardrobe reappears. I tried to do a quick fix and in the character events under Character Created I set the UMADynamicCharacter racePreset string to my custom race and it updates the value under active race in the inspector but my wardrobe is still disabled. I do not know much about UMA but any assistance would be appreciated.
     
  31. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    I've just tested this in the sample scene - I set the race to SkyCar, and it loaded up as a car. Set the race to "Human Girl" and it loaded up the girl. So there must be either some setting that you have set to cause it to load something, or you are doing something procedural that is causing the problem.

    Take a look at the "Load/Save Options", and verify that you are not loading any characters. If you are doing anything in any of the events, take a look at those and make sure they don't change the DCA (you should not be modifying the DCA or telling it to rebuild or update in the events).
    As a last resort, you might want to look at the DCA prefab and make sure your settings haven't been changed.
     
  32. Andrius32

    Andrius32

    Joined:
    Nov 27, 2018
    Posts:
    17
    Hey, im geting alot errors with UMA. 1-st question why Dk UMA is needed? 2-nd question Can it be the problem im trying to use DK UMA. Becouse in most tutorials it shows how to create character with UMA_DCS and well, they have no problems with creating prefabs, and im geting alot NULLS. All i need at the moment its just create character and let to cuztomize it... Can't find anything about that, even if i found im geting NULLS...and already reinstaled everything n - times.... Pls help with that one ;)
     

    Attached Files:

  33. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    I can't help with DK UMA, because I am not familiar with it.
    You should be able to generate characters with straight UMA_DCS like in the Tutorials. What problem are you having creating a prefab?

    Here is a link showing how to do that:

    http://umadocs.secretanorak.com/doku.php?id=knowledgebase:creating_a_customizable_prefab
     
  34. Andrius32

    Andrius32

    Joined:
    Nov 27, 2018
    Posts:
    17
    I think that was the problem DK UMA is this the same product at all? Thank you :)

    I have one more question. Can i add on UMA_DCS object dont destroy on load script so this gameobject can travel around all my scenes? Or that would not work for some reasons? :)
     
    Last edited: Feb 26, 2019
  35. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    DK UMA is an asset from a third party, it's not part of the core UMA code. I'm not very familiar with it, or what it does.

    You can add a "don't destroy on load" script to UMA_DCS, and it should work fine. I believe that there are some bugs on Android that requires you to add it to all of the child objects as well.
     
    kenamis likes this.
  36. Andrius32

    Andrius32

    Joined:
    Nov 27, 2018
    Posts:
    17
    Okay, Thank You :)
     
  37. arteria

    arteria

    Joined:
    May 31, 2007
    Posts:
    2,081
    Ahead, of the launch of our new 'Celts & Vikings' Modular Clothing pack, heres one of the costumes that feature in the pack, and is available as a singular purchase.



    The pack also features the Axe & Shield Models as show in the pics. Pics taken directly from unity uma.

    Purchase below at $25
    https://arteria3d.myshopify.com/collections/uma/products/viking-warrior-a-for-uma
    Customers who purchase this today can also choose another free pack from the site
     
  38. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,085
    Very nice!
     
  39. arteria

    arteria

    Joined:
    May 31, 2007
    Posts:
    2,081
    Thank you, ive really enjoyed making this new pack
     
  40. treshold

    treshold

    Joined:
    Nov 9, 2013
    Posts:
    217
    Looks great! Good job Steve! :)
     
    arteria likes this.
  41. Bantichai

    Bantichai

    Joined:
    Nov 6, 2016
    Posts:
    107
    Looking great Steve, can't wait to get my hands on this set!
     
    arteria likes this.
  42. Andrius32

    Andrius32

    Joined:
    Nov 27, 2018
    Posts:
    17
    Hey what im doing wrong if character not loading at run time? There is how it looks:


    FIXED: Just disabled object at scene and when I'am pressing button to choose it, it loads correctly.
     

    Attached Files:

    Last edited: Feb 27, 2019
  43. DankP3

    DankP3

    Joined:
    Jul 17, 2017
    Posts:
    68
    I am finally setting up blendshape controller through the DNA converter. It seems that whatever i set the "starting shape weight" to, it always starts at 0.5 when the avatar is created. Am i missing something? I would like my UMA to not have the blendshape applied at creation (be value 0). My Evaluator is "Raw" with a multiplier as 1, and the slider works exactly as expected, but starts at 0.5.
    Thanks
     
  44. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    43
    Go to your base recipe and see if they're at zero, there, too.
     
    DankP3 likes this.
  45. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    43
    @Jaimi

    I just want to be sure which scripts do I have to copy to my resources folder? Right now UMA is in its own folder, inside assets but separate from Resources, Plugins, etc.

    I say this because whenever I try to declare a DynamicCharacterAvatar in script, it doesn't work. It gives me the red squiggly error and it says [The type or Namespace could not be found ...] even though I put using UMA.
     
  46. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    No scripts should be in resources.

    DynamicCharacterAvatar is in the namespace "UMA.CharacterSystem". You'll need to add "using UMA.CharacterSystem" in your using lists.
     
  47. chaza_li

    chaza_li

    Joined:
    Jan 8, 2018
    Posts:
    29
    Hello Team!

    Is it possible for me to get an idea about how to apply different skin shaders for my UMA characters? Thanks!
     
  48. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,812
    You create a material with the shader. This is used as a template. Set any default values on this material.

    Then you create a "UMAMaterial". Specify the material you created above on it. You'll have to setup the number of textures that it will use.
    Assign that to the slots and overlays.
    Then on your overlays, add all the textures it needs.
     
  49. chaza_li

    chaza_li

    Joined:
    Jan 8, 2018
    Posts:
    29
    Hi Jaimi, thanks for your prompt reply!

    Just a quick question on top of the old one - what recipes would I have to change for the UMA DCS male to have all its skins changed to the new shader?

    Thank you so much!
     
  50. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,913
    You would create new skin overlays using the new material, and store them outside the UMA asset so they don't get over-written when you update UMA. Then use the new skin overlays in your new recipes.

    Experiment a bit. :)
     
    Jaimi and chaza_li like this.