Search Unity

UMA Power Tools Support (v. 2.9)

Discussion in 'Assets and Asset Store' started by UnLogick, Jan 7, 2014.

  1. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    UMA Power Tools v. 2.9 Released!
    Asset store link: UMA Power Tools
    • Updated to match UMA 2.9
      Texture Merge Prefab has been replaced by Texture Merge asset
    • Removed warning in 2018.3
    • Fixed: Prefab T-Pose Export Animator disabled
    • Fixed: Making Prefab from autoloader gives log error
    Known problems:
    • There seems to be a problem with blendshapes, for facial animation and salsa.
    Enjoy!
     
    Mark_01 likes this.
  2. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Thanks!!! :)
     
  3. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Will you be looking into this soon? Thanks.
     
  4. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I want to make it soon. However with the priorities of family (we're four now), work (being lead in a successful game studio) and then finally hobbies like this I can't make promises.
     
    Teila and magique like this.
  5. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    What version of Unity is supported in 2.9?
     
  6. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I've tested and uploaded with Unity 2017.3.1f1, 2018.3.4f1 and 2019.1.0f2.

    Due to time constraints I haven't looked at newer versions, but if anyone reports a problem I'll take a look.
     
  7. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I had a bit of time today so I wanted to take a look. Turns out I don't have a license of Salsa so I'm hard pressed to investigate this.

    When I look at the blendshape setup in an uma character and in my prefab it's pretty much identical here we have prefab:
    salsa-prefab.JPG
    And here we have regular uma:
    salsa-uma.JPG
    So I wonder if the problem is actually that Salsa has done uma integration that knows how to set it up once it sees an UMAData or something like that.
     
  8. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
  9. mierzej306

    mierzej306

    Joined:
    Oct 3, 2019
    Posts:
    4
    Hi, I am very new to UMA and was most interested in creating prefabs from generated characters. I downloaded the UMA Power Tools 2 and when I launch the generator it creates characters which turn black when I approach them and the attached results pop up. Any help would be greatly appreciated, thanks :)
     

    Attached Files:

  10. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Please expand with more information, in particular I need you to select the first uma related error in the console so that I can see the full call stack. Information about which unity version would also be valuable.
     
  11. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Yeah, it's possible that SALSA is requiring UMAData or something specific to a normal UMA character in order to work. He might need to do a different one-click setup for UMA exported from Power Tools.
     
  12. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Actually, I think what's probably needed is a new one-click setup that works with a Power Tools prefab. SALSA's default UMA one-click probably needs UMAData to work, but with a different one-click then the prefab could work also.
     
  13. mierzej306

    mierzej306

    Joined:
    Oct 3, 2019
    Posts:
    4
    I attach a screenchot with the info you asked to provide. The unity version is 2019.2. Also all the generated characters are green and in robes, or some medival clothing unlike in the demonstration pictures and videos provided in the asset store where they are wearing casual clothes. Is there a way to change this?
     

    Attached Files:

  14. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Main problem here is that there is nothing that really identifies an UMA prefab aside from the name of the UMARenderer and that it has the Root->Global bone transform setup. But no actual component or similar to be 100% sure.
     
  15. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Hmm, I seem to be reproing something like this. Once I start moving and the characters rebuild their textures at different resolutions.
     
  16. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Hmm... found a solution... I'll have to confirm with someone who actually knows what this particular feature is about if it's sane, but for now you can apply it as a patch while I confirm that it's the right fix.
    Open the file UMABoneBakingMeshCombiner.cs and insert this command at line 158
    umaData.SetRendererAssets(umaData.generatedMaterials.rendererAssets.ToArray());
     
  17. mierzej306

    mierzej306

    Joined:
    Oct 3, 2019
    Posts:
    4
    Thanks a lot, so the script you provided works and the characters dont turn black when I come closer to them :) but now I am unable to save a prefab. Everytime I try to do it, even though I am trying to save it in the assets folder, a window pops up saying that I must save the prefab in the assets folder. After I close this an error pops up as seen on the image provided in attached image. Before I applied the script you gave me I was able to save an asset but it had no texture.
     

    Attached Files:

  18. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    There is an error thrown if you try to save outside of your project... because prefabs can only be saved through the asset database and the asset database only works inside your project.

    However the error message here is simply stating that the prefab already exists, you need to delete the old prefab or save the new prefab with a different name. This is because there are additional resources like textures which could be left stranded if I tried to overwrite an existing prefab.
     
  19. mierzej306

    mierzej306

    Joined:
    Oct 3, 2019
    Posts:
    4
    Thanks, I fixed it :) last questions I have is how to make the generated characters have more casual clothes like in the pictures shown in the Power Tools extention page on the asset store and how to add other wardrobe recipes apart from robes and helmets which are currently almost the only clothing being generated. The second question is how to also generate female characters. I have both male and female races selected in the race library in the UMA setup, but only get male characters in the generator. All help would be much appreciated, thanks :)
     
  20. Korsigon

    Korsigon

    Joined:
    Oct 6, 2014
    Posts:
    16
    I am using Unity 2019.2.12f (latest), UMA 9 (latest) and Power Tools version 2.9 (latest).
    The menu item "Power Tools/Create Autoloader Prefabs" does not do anything; no errors, no messages, no response, nothing. Am I missing something? If you could write a tiny ReadMe file (a dozen lines), it would help users use your product easily, because I am searching for what I am not doing right for it to work, without success .
     
    Last edited: Nov 18, 2019
  21. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    You're right, I should add a small readme. The menu item looks at your current selection and export the selected uma character as a prefab. But your unity selection is what matters.
     
  22. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
  23. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Hmm, I think the problem might be different than I thought... he isn't looking for unity the blendshapes, he is looking for the uma expression player... which I've removed because it's UMA and I remove anything related to UMA. I took a look at the code for the UMAExpressionPlayer and it has a hard dependency on UMA and UMAData. UMAData in particular is nasty because it cleans up stuff when it's being destroyed. In order for this to work the UMAExpressionPlayer would require some significant refactoring.
     
  24. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    So, it sounds like this is just not possible then unless we do some sort of custom code to set up what SALSA needs.
     
  25. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I just had a chat with @ecurtz (the author of the UMA Expression Player) and we came up with a reasonable solution. It will require the Salsa guy to do a bit of work, namely to look for the base ExpressionPlayer instead of the UMAData, I can then replace the UMAExpressionPlayer with my own expression player as I make the prefab. Obviously the prefab will then have a slight dependency on UMA code, rather than the current complete disconnect. (ExpressionPlayer, ExpressionSet and my new ExpressionPlayer thingy).

    I'll ping the Salsa guy to get confirmation that the base expression player has all he needs to get Salsa working.
     
    SickaGames1 likes this.
  26. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    It sounded like he wasn't willing to put any effort into this. However, if he does, it wouldn't be useful if it requires any UMA components that would include the UMA library of resources. Because that takes up over a GB of RAM and is the reason why I want to get away from UMA in that form. But if the scripts could be included and not cause dependency issues then that would be fine.
     
  27. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    It would be two uma code files and the standalone assets known as ExpressionSets, they're some kb in size.
     
    magique likes this.
  28. Kaen_SG

    Kaen_SG

    Joined:
    Apr 7, 2017
    Posts:
    206
    Hi Joen, Trying to use your power tools for the first time. Bit of a nightmare as I couldn't find any basic documentation anywhere... anyway, I'd finally figured out how to bake a prefab.. but it defaults the atlas'd textures to 1k*2k. I saw a atlasresolutionslider script. so I'm assuming this can be configured somewhere... my question is how?

    Also since your asset doesn't do the LOD'ing. Is there an optimal workflow?

    One last thing.. I'm getting the black character issue when running your uma power tools LOD scene. Is there a fix for that?
     
    Last edited: Nov 21, 2019
  29. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    You're not the first to complain about the documentation, I'm hearing you... I plan on adding some sort of documentation "soon(tm)".

    About the quality of the model and the textures, what you get is the exact output from uma. To get higher res configure uma to generate higher res. I have considered adding a generate prefab with lod, but that would require me to actually trigger uma to rebuild at various lod my initial tests at this actually blew up quite literally as characters with rigidbodies and colliders interacted quite forcibly with each others. I still don't know exactly how to make this simple and painless the way uma is set up currently.

    About optimal workflows for generating mesh LOD for uma, I'm still looking. I've tried multiple tools inside of unity both paid and free, but I'm afraid all my experiments have left small but quite visible gaps in the model that makes me reluctant to recommend them. The best solution might be to bring the source fbx files into a full blown 3D tool to unlock a wide variety of higher quality simplifier and then generate lod slots based on that. Of course that requires someone familiar with such tools.

    What I do have is some pipeline tools that can directly read the uma slot data, convert it into a unity mesh, simplify it and generate slots from the output. However until I find a mesh simplifier of sufficient quality publishing this would not help anyone. When Unity released their free mesh simplifier it took me about an hour to modify the scripts to handle how it dealt with quality settings and get it working, so as soon as someone can point me at something that works we could be in business. (Unfortunately it leaves sizable gaps down the spine of uma characters exactly where the uv wrapping is. Even with all their settings to preserve edges and the likes.)
     
    Last edited: Nov 21, 2019
  30. Kaen_SG

    Kaen_SG

    Joined:
    Apr 7, 2017
    Posts:
    206
    Thanks for the quick response!
    The problem is that my uma is generated on the source textures which are 4k i believe. The baked prefab turned out much lower quality as you can see in the screenshots.

    upload_2019-11-22_4-22-51.png
    upload_2019-11-22_4-25-25.png
    Left Is source uma... right is powertools baked.
     
  31. Kaen_SG

    Kaen_SG

    Joined:
    Apr 7, 2017
    Posts:
    206
    and then there's this black character issue in your demo scene... which only happens when you go close to the characters.

    upload_2019-11-22_4-40-2.png
     
  32. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    The Atlas size is controlled by the UMAgenerator in the scene (usually a prefab named UMA or UMA_DCS). You can select the atlas size on there, and select an initial scale factor as well. By default we set the scale factor to 2 because some of the testers had lower spec video cards. So you should change that to 1.
     
  33. Kaen_SG

    Kaen_SG

    Joined:
    Apr 7, 2017
    Posts:
    206
    I generated the baked prefabs using this same scene. ie. the left uma is used to generate the right prefab. so i should expect atlas'd textures that are the same as the uma I am seeing on the left yes?
     
  34. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    You'll have to patch this until I get a new version released.
     
    Kaen_SG likes this.
  35. Kaen_SG

    Kaen_SG

    Joined:
    Apr 7, 2017
    Posts:
    206
    Solved the Texture Atlas export issue. Thanks to @Jaimi on discord. It was generating 8k atlases but unity by default imports them only at 2k resolution. upload_2019-11-22_5-19-37.png

    If anyone else is having issues with this, you need to change the Max Size on the texture like this. So unity imports it at whatever size you need (higher/lower). In my case, 8k texture atlas.
    upload_2019-11-22_5-20-32.png
     
  36. Kaen_SG

    Kaen_SG

    Joined:
    Apr 7, 2017
    Posts:
    206
    Done and Thanks it works. Getting a small 10fps boost over the uma defaults with 540 umas generated. with fewer umas I couldn't notice any difference in speed.
    upload_2019-11-22_5-32-2.png
     
  37. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    As PCs become faster and Unity becomes better at utilizing threads the gains are often hidden behind other bottlenecks. Your system needs to be cpu limited for the effects to show. I'm guessing that somewhere around 500 animated characters is where your system went from gpu limited to cpu limited.

    In a real game you tend to add logic that will stress the cpu like: physics, ai, pathfinding, etc.
     
  38. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I went back to see if I could fix whatever was ailing it and that's when I noticed the bool to preserve edges was being passed incorrectly in my system. :oops: I'm getting pretty good results up until lod 3 where I noticed some z fighting on the female mesh shirt vs female body. But that's actually quite decent for an automated process with zero hand holding.
     
    Kaen_SG and hopeful like this.
  39. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    By the time you get down the LOD chain, a lot can be forgiven because it's so far away and so little detail. I recall when I wrote an LOD system for my first engine (ages and ages ago), the lowest level wasn't even rasterizing polygons, just making best guesses as to what should be there, and it looked fine (for the time). Of course, this was when we were drawing everything with the CPU.
     
  40. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I'm aware but the old alternatives had visible holes in them, not even distance can make your eyes unsee that.
     
  41. Kaen_SG

    Kaen_SG

    Joined:
    Apr 7, 2017
    Posts:
    206
    If everything is bad... What is everyone using for their LOD workflow then?
    I'm using the very outdated SimpleLOD v1.6.
     
  42. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I already have SimpleLOD integrated into my pipeline, it's giving decent results but it's hard to sell something that requires an outdated purchase on top. But I'll keep it as an option. ;)
     
  43. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    SimpleLOD is pretty good, but even 1.6 still produces some gaps as you can see here.

    SimpleLOD 1.6
    8857 verts, 15217 tris
    simplelod0.JPG

    Compared to the "new" free Simplify Mesh
    UnitySimplifyMesh
    7232 verts, 11956 tris
    unitymeshsimplifier0.JPG

    Obviously this is a pears to apples comparison, my settings are pretty much just the default settings. At a distance gaps wont be seen and I haven't even tried looking at the quality of the output. Perhaps you can tell me what SimpleLOD settings you are using?

    I'm certainly gonna leave both in as well as add support for more. I'll even allow mismatch where you can have different tools for different levels.
     
    hopeful likes this.
  44. Kaen_SG

    Kaen_SG

    Joined:
    Apr 7, 2017
    Posts:
    206
    Coincidentally... I just watched this video.... and Secret Anorak recommends just using blender for LOD. :(
    This link goes directly to that quote. They mention you right after that. :)
     
    Last edited: Nov 27, 2019
  45. Kaen_SG

    Kaen_SG

    Joined:
    Apr 7, 2017
    Posts:
    206
  46. Kaen_SG

    Kaen_SG

    Joined:
    Apr 7, 2017
    Posts:
    206
    Playing with the trial version... seems like it works quite well on some models but not so good on some.
    It also doesn't seem to recognize powertools exported prefabs as meshes. 20% looks pretty good for this zombie.

    upload_2019-11-27_11-38-42.png

    Even at 10% i have no holes on the zombie.

    upload_2019-11-27_11-40-44.png

    This creature with a lot of hair cards is a pretty big failure though. only reduced by half even on 10% quality.

    upload_2019-11-27_11-43-42.png

    upload_2019-11-27_11-44-8.png
     
    Last edited: Nov 27, 2019
  47. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    I'm going to guess that the hair cards are already efficient and can't be decimated. (?)
     
  48. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Notice how @SecretAnorak takes a deep breath before replying to that one. The thing is blender has been used and tested by a ton of professionals so it gives consistently good results. Many of these in Unity Mesh LOD solutions produce inferior results either in all or some specific situations.
    No, when I find time for it I'll pick up their trial and integrate that too. The thing about hair cards is that at a certain lod your only automated option is to either make them go away or do like a voxel like thing and project the textures onto that. I dare say even blender might be challenged by this one, you'll certainly want another blender tool/configuration for this.

    This is in fact the reasoning behind integrating with multiple lod providers, one tool might be superior for certain lod levels or mesh types while falling flat at others.
     
  49. Kaen_SG

    Kaen_SG

    Joined:
    Apr 7, 2017
    Posts:
    206
    Maybe I can do manual LOD on 100-200 models in blender.. but there are 10k+ meshes in my project and I'd probably die from the tedium long before I finish... :p

    Might pick up mantis and try it out... the command line option means you could script the entire LOD process.
    also there's this experimental thing from Unity https://github.com/Unity-Technologies/AutoLOD
    and this https://github.com/Whinarn/MeshDecimator
     
    Last edited: Nov 27, 2019
  50. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Or you can just wait a week or two and join the beta on my next package: UMA Pipeline Tools

    Just to clarify: Pipeline Tools would be for asset creation only and would work with UMA without the need for Power Tools. Once the pipeline tools lands the lod solution in power tools will get a revamp to take full advantage of this.