Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    I've created the shared material in the overlay, and how to use the "shader parameter mapping"?
    upload_2020-4-30_10-53-42.png

    I've marked the shader parameter in the UMA material settings, the first channel is supposed only to change the _RootColorPowerA color but it also changed the _TipColorPowerA, and the second channel doesn't seem to have effects.
    upload_2020-4-30_10-59-58.png

    Is that I can't use the first channel to set specific color but to use the second or the third channels? And another question about how to add more channels on the avatar's character color? They seems to only have 3 channels and there is no way to change them.
     
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Looking further at this, the TypeDictionary add needs to be moved out of the editor ifdef.

    Instead of posting code, I've started a branch for fixes here. There's an additional fix for null checks on the editor instance included, but that's all so far.

    https://github.com/umasteeringgroup/UMA/tree/fix/Inevitable210Fixes


     
  3. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208

    I've not worked on that code. I'll make a note to take a look at it, but for now, I suggest to use the Shader Parameter mapping in the UMAMaterial to do this. You have to add the Shared Color to the recipe. The Shared Color on the DCA will plug straight into the recipe, and that will go into the material at runtime.

    It's on the UMAMaterial here:

    umamaterial_update.png
     
    Harekelas likes this.
  4. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @Jaimi How do I tell UMA to use a different hair shader? It seems to be very persistent in changing it back to the UMA Fade Cutout one. I tried just changing the Render Queue value at runtime and even that just reverts back to the 3000 value. I changed to Standard shader at runtime and it reverted back to UMA Fade Cutout also. Is there some place to assign what shader and parameters I want to use so it won't revert it at runtime?
     
  5. lobotomista

    lobotomista

    Joined:
    Jul 21, 2018
    Posts:
    39
    So you mentioned that there's active work done to adapt UMA to DOTS, but what exactly would this entail?

    1.- Would this be a re-writte from the ground up? or just adapt it?
    2.- What kind of features or changes/improvements can we expect?
    3.- Is current UMA usable with DOTS? like a hybrid workflow?
     
  6. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208

    The shader is taken from the material that the UMAMaterial uses. If you manually change it at runtime, then it will be reset to that material when you rebuild it.

    To change to a completely new shader, adjust the material that the UMAMaterial points to. You can adjust the parameters on that material, and they will be copied to the atlas.
     
  7. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    1. I'm not sure, we haven't started on it. Most likely it would be adapted. Only like 1% of UMA is setting up the animation and Rig.
    2. I'm expecting a speed increase.
    3. UMA produces a standard Mecanim avatar. Anything you can do with that on DOTS will work.
     
  8. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Where is this UMAMaterial so that I can change it?
     
  9. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Every recipe is composed of slots. On those slots are overlays. Each overlay has an UMMaterial that specifies a material, and various parameters how colors and textures are mapped. In the recipeeditor you can select "inspect" to get to the overlay (and from there to the UMAMaterial).
     
    magique likes this.
  10. Gervais60

    Gervais60

    Joined:
    Apr 7, 2016
    Posts:
    37
    Is there a video tutorial that explain the steps to convert UMA to URP or HDRP
     
  11. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Not that im aware of. But you can get 98% of the way there for URP, by installing it, running the material converter, and then running the UMA option to switch to URP. You will have to adjust a few materials manually ( the hair material, and maybe one more)
     
  12. Gervais60

    Gervais60

    Joined:
    Apr 7, 2016
    Posts:
    37
    I did this and at the end all I have is that the UMA character transparent and the wardrobe that I did add are visible then remove all the wardrobe element and the UMA character is still not visible

    I did use Unity 2019.3.12 and it was a new project with just UMA 2.10 and added external asset for the wardrobe
     
  13. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You ran the UMA option to convert also?
     
  14. Gervais60

    Gervais60

    Joined:
    Apr 7, 2016
    Posts:
    37
    yes I did and for some time it did work ok then added the wardrobe element and run it bang no more UMA just the wardrobe then remove all the wardrobe element but no more UMA at runtime
     
  15. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    It sounds like a error is occuring. Do you see any errors in the console?
     
  16. Gervais60

    Gervais60

    Joined:
    Apr 7, 2016
    Posts:
    37
    ok I have redone the project from scratch it was just a test to see what I could do and now it all work ok must have done a step in the wrong order all ok now

    Thanks for the replay
     
    Jaimi likes this.
  17. DLeb

    DLeb

    Joined:
    Feb 13, 2019
    Posts:
    10
    I've got an error in Console. It writes:

    NullReferenceException: Object reference not set to an instance of an object
    UMA.Editors.OverlayEditor.OnGUI () (at Assets/UMA/Core/Editor/Scripts/CharacterBaseEditor.cs:1416)

    There is the whole if-statement for line 1416:

    if ((_overlayData.asset.material.name != _slotData.asset.material.name))
    {
    if (_overlayData.asset.material.channels.Length == _slotData.asset.material.channels.Length)
    {
    EditorGUILayout.HelpBox("Material " + _overlayData.asset.material.name + " does not match slot material: " + _slotData.asset.material.name, MessageType.Error);
    if (GUILayout.Button("Copy Slot Material to Overlay"))
    {
    _overlayData.asset.material = _slotData.asset.material;
    EditorUtility.SetDirty(_overlayData.asset);
    AssetDatabase.SaveAssets();
    }
    }
    else
    {
    EditorGUILayout.HelpBox("Material " + _overlayData.asset.material.name + " does not match slot material: " + _slotData.asset.material.name + " and Channel count is not the same. Overlay must be removed or fixed manually", MessageType.Error);
    }
    if (GUILayout.Button("Select Slot in Project"))
    {
    // find the asset.
    // select it in the project.
    Selection.activeObject = _slotData.asset;
    }

    if (GUILayout.Button("Select Overlay in Project"))
    {
    // find the asset.
    // select it in the project.
    Selection.activeObject = _overlayData.asset;
    }
    }

    I looked and read the replies. Somebody had similar error. I just could not add an overlay to a wardrobe recipe in editor.
    It's about pushing too many GUIClips. But there is the different code line number now. (The first error was related to line 503 in CharacterBaseEditor.cs and corrected by Jaimi. Console also writes:


    GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced.
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Can you give a piece of advice how I can to get rid of that bug and/or what causes it? I can reinstal UMA or start a new project, but mine is big and I'm not sure that this error will not appear again.
     
  18. mjohannessen

    mjohannessen

    Joined:
    Jan 30, 2020
    Posts:
    7
    I'm seeing this issue in UMA 2 2.10 and Unity 2019.3.12f1. The avatar disappears when playing. I started from a fresh scene per the video. Is there a fix?
     
  19. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    The "pushing guiclips" error is harmless. Its caused by unity unloading the appdomain during an import or when hitting play, while the recioe editor window is open. This editor is up for a rewrite, but i havent had time yet. But this wont cause a problem in your game.

    The if statement is blowing up because you have a slot or overlay that doesnt have a UMAMaterial on it, or if it does, no material is set on tne UMAMaterial. Look at both the slot and overlay you are adding in the inspector.


     
  20. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Need more info. Are you getting errors in the console?
    What video are you watching?
     
  21. DLeb

    DLeb

    Joined:
    Feb 13, 2019
    Posts:
    10
    Thanks!
     
  22. mjohannessen

    mjohannessen

    Joined:
    Jan 30, 2020
    Posts:
    7
    UMA 101 Part 2: Up and Running (
    )

    Console:
    Unable to find animator! This will not be good.
    UnityEngine.Debug:LogError(Object)
    UMA.CharacterSystem.DynamicCharacterAvatar:SetAnimatorController(Boolean) (at Assets/UMA/Core/Extensions/DynamicCharacterSystem/Scripts/DynamicCharacterAvatar.cs:1854)
    UMA.CharacterSystem.DynamicCharacterAvatar:BuildFromComponentSettings() (at Assets/UMA/Core/Extensions/DynamicCharacterSystem/Scripts/DynamicCharacterAvatar.cs:560)
    UMA.CharacterSystem.DynamicCharacterAvatar:Start() (at Assets/UMA/Core/Extensions/DynamicCharacterSystem/Scripts/DynamicCharacterAvatar.cs:423)
     
  23. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Ok - first thing to do is fix that.
    On your DCA, you need to supply an animator. If you switch races and need each race to have a different animator, you can also add race-specific animators.

    Animator.png

     
  24. mjohannessen

    mjohannessen

    Joined:
    Jan 30, 2020
    Posts:
    7
    I tried adding Locomotion in the past per a prior post, with no luck. I tried your settings for DNAConverterControlledExampleRace (similar errorsusing HumanMaleDCS) and the console is this

    Overlay 'Eye Overlay' doesn't have the right number of channels
    UnityEngine.Debug:LogError(Object)
    UMA.OverlayData:Validate(UMAMaterial, Boolean) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/OverlayData.cs:207)
    UMA.SlotData:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/SlotData.cs:358)
    UMA.UMARecipe:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:619)
    UMA.UMAData:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:329)
    UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:208)
    UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:285)
    UMA.UMAGeneratorBuiltin:Work() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:148)
    UMA.UMAGeneratorBuiltin:Update() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:101)

    ...

    Invalid Overlay 'Eye Overlay' on Slot 'MaleEyes'.
    UnityEngine.Debug:LogError(Object)
    UMA.SlotData:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/SlotData.cs:362)
    UMA.UMARecipe:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:619)
    UMA.UMAData:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:329)
    UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:208)
    UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:285)
    UMA.UMAGeneratorBuiltin:Work() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:148)
    UMA.UMAGeneratorBuiltin:Update() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:101)

    ...

    Overlay 'Default Eye Adjust' doesn't have the right number of channels
    UnityEngine.Debug:LogError(Object)
    UMA.OverlayData:Validate(UMAMaterial, Boolean) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/OverlayData.cs:207)
    UMA.SlotData:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/SlotData.cs:358)
    UMA.UMARecipe:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMADat a.cs:619)
    UMA.UMAData:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:329)
    UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:208)
    UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:285)
    UMA.UMAGeneratorBuiltin:Work() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:148)
    UMA.UMAGeneratorBuiltin:Update() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:101)

    ...

    Invalid Overlay 'Default Eye Adjust' on Slot 'MaleEyes'.
    UnityEngine.Debug:LogError(Object)
    UMA.SlotData:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/SlotData.cs:362)
    UMA.UMARecipe:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:619)
    UMA.UMAData:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:329)
    UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:208)
    UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:285)
    UMA.UMAGeneratorBuiltin:Work() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:148)
    UMA.UMAGeneratorBuiltin:Update() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:101)

    ...

    UMAData: Recipe or Generator is not valid!
    UnityEngine.Debug:LogError(Object)
    UMA.UMAData:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:345)
    UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:208)
    UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:285)
    UMA.UMAGeneratorBuiltin:Work() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:148)
    UMA.UMAGeneratorBuiltin:Update() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:101)


    Screen Shot 2020-05-03 at 12.30.47 PM.png
     

    Attached Files:

  25. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You need to review the error messages, and fix what they say. Something is not right on your UMAMaterial, or your overlay. The number of texture channels must match. They normally would, unless you have edited them.

    This is what all of that looks like. Notice that the overlays and the slots have the same UMAMaterial set. Notice that the overlay has 3 textures. Notice that the UMAMaterial has 3 channels.

    MaleEyes.png


     
  26. mjohannessen

    mjohannessen

    Joined:
    Jan 30, 2020
    Posts:
    7
    Thanks - for some reason there were quite a few channel mismatches (should be 2 but 3 were entered). As I said, this was a fresh install of UMA 2 and a new scene following the tutorial, so I'm not sure how these parameters became incorrect.
     
  27. lorddanger

    lorddanger

    Joined:
    Aug 8, 2015
    Posts:
    103
    Hello,
    Is it possible to use UMA with synty studio character models
    Like modular fantasy character
     
    Vaupell likes this.
  28. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Yes - UMA is basically a system for combining models and customizing them on the fly. You could take the synty models, and create UMA's from them. There would be a good amount of work involved in creating the races, rigging the models as needed for customization, etc. Secret Anorak has some helpful videos that show how to create a race (he uses DAZ as an example).
     
    Vaupell likes this.
  29. mjohannessen

    mjohannessen

    Joined:
    Jan 30, 2020
    Posts:
    7
    Looking at this further, when I create on UMA (which works correctly) and then prefab that to another, and change the Active Race to HumanFemaleDCS, I get these errors:

    Overlay 'InnerMouth' doesn't have the expected UMA Material: 'UMA_Diffuse_Normal_Metallic'!
    Currently it has 'UMA_Hair_Aniso (UMA.UMAMaterial)' at 'Assets/UMA/Content/Core/HumanShared/Overlays/Face/InnerMouth.asset'
    UnityEngine.Debug:LogError(Object)
    UMA.OverlayData:Validate(UMAMaterial, Boolean) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/OverlayData.cs:198)
    UMA.SlotData:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/SlotData.cs:358)
    UMA.UMARecipe:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:619)
    UMA.UMAData:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:329)
    UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:208)
    UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:285)
    UMA.UMAGeneratorBuiltin:Work() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:148)
    UMA.UMAGeneratorBuiltin:Update() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:101)

    The "InnerMouth" overlay is in the UMA/Content/Core/HumanShared directory, and the material is specified as "UMA_Hair_Aniso (UMAMaterial)". That doesn't seem right and when I change that in Inspector to "UMA_Diffuse_Normal_Metallic", I get an error "Overlay Texture count and UMA Material channel count don't match!".

    Is this recipe broken? How is this fixed?
     
  30. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Something is seriously wrong with your UMA install. I recommend to pull the release version of 2.10 from here:

    https://github.com/umasteeringgroup/UMA/tree/release-210
     
  31. mjohannessen

    mjohannessen

    Joined:
    Jan 30, 2020
    Posts:
    7
    Will do - is there any documentation on how to import the downloaded 2.10 zip release into an existing project?
     
  32. mjohannessen

    mjohannessen

    Joined:
    Jan 30, 2020
    Posts:
    7
    Sorry - got it. Just Drag the Assets folder from the repo to the unity project Assets folder.
     
  33. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    HI, anybody knows if there are anime styled avatars for UMA yet?
     
  34. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    755
    UMA is basically a system for combining models and customizing them on the fly. You could take the anime models, and create UMA's from them. There would be a good amount of work involved in creating the races, rigging the models as needed for customization, etc. Secret Anorak has some helpful videos that show how to create a race (he uses DAZ as an example).
     
    hopeful likes this.
  35. Giantsmall

    Giantsmall

    Joined:
    Apr 28, 2019
    Posts:
    18
    Hello, I have a problem with DynamicCharacterAvatar - often when I click on DCA gameObject in hierarchy unity freezes for up to 20-30 seconds, I guess to load some stuff.
    Is there a way to disable it if I don't need it in editor mode?
    I have all the libraries in scene already in case someone asks..
    Thanks.
     
    Last edited: May 9, 2020
  36. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    What version are you on? The current version has only one gameobject in the prefab, and no libraries are on it.
    If you are on 2.10, you should be using the UMA_GLIB prefab. If you are, then the pause is loading the library (assuming you have addressables turned off). But that should only happen once.

    If you are on an earlier version, there are several things that could be going on. It could be scanning for races. It could be loading the library. It could be attempting to contact a download server if you are configured for asset bundles downloading.

    All of those are addressed in 2.10.
     
    Giantsmall likes this.
  37. Giantsmall

    Giantsmall

    Joined:
    Apr 28, 2019
    Posts:
    18
    It worked, I just updated to 2.10 but did not bother to take a look for changes..
    Thank you Jaimi!

    btw In new scene for some reason everytime i enter play mode BuildCharacterEnabled is set to false permanently to game object. Haven't found root cause yet so I had to set it in Awake method..
     
  38. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Glad that got it for you. On the field issue, there have been several UI quirks that have arisen in later versions of Unity that I need to address (notably 2019.3). I've been working around them as I find them, but that is one that I missed. I will put a trello task out there to fix it. In the meantime, you can use the debug inspector to set/clear that. (right click on the tab, and select "debug". Don't forget to change it back).
     
    Giantsmall likes this.
  39. Bucee

    Bucee

    Joined:
    Apr 20, 2016
    Posts:
    14
    Hello, I've been using UMA on Android and it works great with regular clothes but the default MaleRobe causes a crash when I try to equip it. Is there a built-in cloth physics on the item, or perhaps a deformation in movement that may cause greater memory usage than other clothing? I can't seem to find a tutorial on how to look at the details of UMA Wardrobe items beyond the .asset files.
     
  40. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    There is a version of the male robe that has cloth. I recommend running a debug build to see if you can get any errors from the console.
     
  41. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    I know we can make our own avatars using UMA, but im not graphic artist, and i dont have time to sit, learn, and do that.

    * Need UMA Avatars that looks like TEENS/ANIME, because most TEENS are the ones playing games.
    * TEENS LOVE ANIME!!
    * Default UMA characters look like ADULTS..

    I would gladly PAY if someone could make a teen/anime looking package for UMA, you could sell it in asset store also and make money from it too.

    https://assetstore.unity.com/?q=anime&orderBy=0

    I know UMA can do it, but i personally dont have time for it at all (too busy coding)

    So many talented graphic artists running around out there.

    So will someone get on that please???
     
  42. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I am working on a side project I call "UMAnime". It will be some time before it is ready.
     
    nsmith1024 likes this.
  43. Tomi-Tukiainen

    Tomi-Tukiainen

    Joined:
    Jun 8, 2013
    Posts:
    26
    Hi! I'd like to again thank everyone who played a part of making UMA possible and Jaimi especially for being here, helping everyone! Huge respect.

    We implemented avatars with UMA 2 and o3n packages to our VR-game Premium Bowling. On PC it's been working great but on Oculus Quest avatar generation seems to be causing some seriously long frames. We have played with UMAGenerator parameters and limited texture sizes in their import settings and got it down a lot but still some frames are way too long. This is a problem because we have online game and players come and go... so avatars get created on the fly.

    My question is if there's a way to speed up the avatar generation or just add more yields to some critical parts of the avatar generation code to split the longest parts to a few more frames? We recently updated to UMA 2.8.1 and our parameters for UMAGenerator:

    - Fit Atlas: yes
    - Convert Render Texture: no
    - Convert Mip Maps: yes
    - Atlas Resolution: 1024
    - Initial Scale Factor: 2
    - Fast Generation: no
    - Iteration Count: 1
    - Garbage Collection Rate: 10000000
    - Process All Pending: no

    NOTE: we increased Garbage Collection Rate to avoid UMA from forcing garbage collection. It seemed to start GC during avatar creation, which was not a good timing. We also tried to add yields ourselves but then we started sometimes getting errors regarding missing DNA or such... so it doesn't seem safe to start peppering yields without knowing a bit where it's safe to do, if anywhere.
     
    Last edited: May 11, 2020
  44. Bucee

    Bucee

    Joined:
    Apr 20, 2016
    Posts:
    14
    Right, I saw that in the Cloth UMA Demo however it seemed to be integral to the .asset or something that prevented me from accessing that information. Is there an easy way to tell when an article of clothing has Cloth physics or do I just need to make a new .asset file when I want to change something?
     
  45. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Some observations:
    1. Setting Initial Scale Factor to 2 means you are using all textures at half resolution. We do this in the demos because we don't know what kind of hardware users have. If you do not modify this in your game (like when setting quality), then you are better off by setting that to 1, and manually decreasing all of your textures by a factor of 2.

    2. Earlier versions of UMA would sometimes search for items in Resources. This could cause slowdowns during generation. We made a big pass at fixing all of these in 2.9 and 2.10. If you don't use Asset Bundles, you will find that UMA 2.10 will be a simple upgrade. If you do use Asset Bundles, and dont want to switch to Addressables, then this will be a tougher upgrade.

    3. Evaluate whether or not you need to use Convert Mip Maps. By default, all UMA texture atlases are Render Textures, so this doesn't give you any speed or memory savings. It's only useful to address visual artifacts when using Render Textures. If you use LOD, or if your UMA's don't run off into the distance, you're probably much better off with this turned off.

    4. If you are using events on the character, make sure you are not generating the character twice. A common thing is for people to mixup the CharacterCreated event with a Start or Awake type call. This event (CharacterCreated) is called *after* the first generation - so if you do something in this event, and tell the character to generate, you can end up generating twice.

    5. Some of the heaviest code is in Unity setting up the bone-weights. This means, the fewer vertexes you have, the faster generation will be. o3n comes with some good LOD models. You might want to evaluate switching to a lower LOD level as the base level.

    6. If you are using UMASimpleLOD, sometimes the characters can be generated twice as well - if you create them far away from the camera. You might want to try removing this component, see if you get any speed increase.

    Hope these help!
     
  46. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    As far as I know, that is the only one I know of that uses cloth. I believe that Arteria is currently looking into adding cloth into their models, but I don't know the status of that. You can look at the slot (MeshData, ClothSkinningCount) to see if it has cloth on it.
    I'm not aware of a way to modify the slot to remove the cloth, but I did not work on that part of the code.
     
  47. DankP3

    DankP3

    Joined:
    Jul 17, 2017
    Posts:
    93
    Hi All,
    Has anyone else noticed selecting polys for mesh hide assets is a little difficult with HDRP? is there a trick to this?
    thanks
     
  48. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I haven't tried this - are you using 2.10?
     
  49. DankP3

    DankP3

    Joined:
    Jul 17, 2017
    Posts:
    93
    That's a good point, I'll update and see. I think I am on 2.9. Thx
     
  50. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,685
    Maybe you just don't do anything related to art ... which is fine. But there are free and paid anime models in the asset store, often with changes of clothing, that could be used as base models inside UMA. Just follow the directions in the Secret Anorak videos for converting an existing character model into an UMA, and there you go.

    Here's an example of a free teen male with a ton of clothing options. There are modestly priced female versions that have a similarly large wardrobe.

    https://assetstore.unity.com/packages/3d/characters/taichi-character-pack-15667