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,621
    There is an expression Slot that needs to be added to your recipe! UMA builds based on a recipe, adding a script after the fact wont change a thing. If adding that slot doesn't work then you should look at that script.
     
  2. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    Please... you're doing it the hard way, just add the slot and we got you covered! :)
     
  3. Korsigon

    Korsigon

    Joined:
    Oct 6, 2014
    Posts:
    13
    Does the UMA Power Tools 2 asset work without issues with the latest version of UMA 2.8.1 released yesterday? I am planning on purchasng it.
     
  4. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    878
    Waiting on @UnLogick to publish his beta version
     
  5. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    Just had a repro on the scene view issue. Will be fixed in the upcoming 2.8.1 release.

    About the spacing, the idea is to use lod to show large amounts of characters, if you put all the characters next to each other you can still run out of ram. :) The lod system in power tools is fairly basic, there are multiple issues with it, most grieving there is no lod group limits. If your system is up for it you can change the number of characters in each cluster (t:LODDemoCluster in scene hierarchy search)
     
  6. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    UMA Power Tools v. 2.8.1 Released!
    Asset store link: UMA Power Tools
    The pieces finally locked into place!
    • Bone baking - Blend Shape support
      Blendshapes are now properly retargeted when doing bone baking.
    • Prefab - Improved component cleanup
      Improved cleanup, all components from the uma namespace is removed.
    • Prefab - Improved save
      The prefab functionality now triggers a project save which ensures the prefab is valid.
    • Prefab - Android normal maps
      Android normal maps are now properly saved raw.
    Enjoy!
     
    Last edited: Apr 21, 2019
    SickaGamer likes this.
  7. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    878
    Buying it now!!
     
  8. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    618
    Hi, UnLogick, congratulation to everyone who made this possible. I really appreciate your awesome tool and there is one feature that I really like to see, that is dynamically generating Mesh Hide Asset.
    I know, MHA is not supported yet but I know you are working on it and I hope you support generating MHA during runtime when you work on it. You already have a really fast dynamic generator and it will be a good fit.

    Here are the reasons why it's useful.
    Assuming that you have layers of cloth, like t-shirt, shirts, jackets, and outer coats, they overlap each other.

    It is really difficult to create layers cloths that do not poke-through and you have to have MHA to fight it.
    The thing is each clothes are shaped differently and there is no way to have few pre-configured MHA that can work in all cases.

    To create all MHA that works in all cases, you will need to have a combinatorial number of MHAs and it can blow up your system quite fast. Imagine doing that for each LOD as well.

    Instead, what I would like to do is to create MHA dynamically from the given set of user-specified layers at the runtime. I know, the result will not be better than hand-created MHA but in the latest UMA, MHA creator has improved and I think it will be good enough in most of the cases. Once we have dynamic MHA in-place, we can improve the algorithms later on such as cutting overlapping geometries instead of deleting and such.

    In my opinion, this will be a huge timesaver and I would like to know what you think.

    Cheers!
     
  9. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    618
    To be more precise, you don't even have to generate MHA at runtime since MHA used when generating a combined mesh.
    What we need is that when we generate combined mesh, it will do an overlapping test as if we have MHA.
    If it's easier, we can create MHA internally for now, but later integrate the overlapping test into the mesh combiner to make it faster.
    Thanks.
     
  10. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    Power Tools already supports a different type of Mesh Hiding, the "old" (non pbr) uma Cutout where you created a black and white mask, the vanilla workflow would then use an alpha test shader to hide what you didn't want to see. This fell out of favor when we switched to pbr. Power Tools have functionality that will automatically sample the black and white texture in the editor and populate an array in the overlay asset. So it's not a new concept to add to the bone baking, it's just taking a different data source. If you're interested in hacking it "all" you need to do is find a suitable place in the UMABoneBakingMeshCombiner to populate the triangleOcclusion on the SkinnedMeshCombinerRetargeting.CombineInstance. It's a simple bitmask using 1 bit per triangle to remove it (0 is removed, 1 is kept). The power tools also have fast merging of these bitmasks.

    I'll probably add support for the new uma way of doing it "soonish" (hopefully within half a year).

    About the complexity of having assets for this, we did some early tests at automating this and the results were not super great. Most game titles suffer from similar artifacts to what we got (gaps when looking at steep angles), this sounds super innocent until you start adding a hoodie and have parts of the head go missing. When I researched this I came to the conclusion that you need the ability to close gaps between pieces for any automatic solution to be viable. If you don't merge the two pieces proper you'll always have skinning produce weird corner cases that either produce visible gaps or poke through.

    The proper way to handle this involves a significant amount of raycasting and math, until you find a cheap way to do this my opinion is that it's best done in the editor. Of course for a real project with a real asset count you need proper tooling that can run through the combination matrix and come up with decent results that can then be hand tweaked.
     
  11. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    618
    Hi, I'm not sure if I fully understand how bitmask works, but it seems like it still requires pre-preparations just like MHA. If so, we can't still get away from the combinatorial combination of all Cloths.

    However, I think you understand what I'm talking about. Doing this in the runtime without having to pre-prepare them.
    Yeah, I'm fully aware of the artifact it can give. Removing certain geometry will make a hole if the gaps can be seen.
    What I'll eventually do is to fill the gap but that's of course, that's after we have some infrastructures and that's what I'm asking for now, not a perfect solution.
    Even if it's not perfect, it will be much better than not having it. The problem you mentioned with Hoodie with head can be avoided if the head is put into different slots. Anyway, UMA is still new to me and once I figure out how to dynamically remove the overlapped geometries efficiently in the background thread, I'm planning on working on filling the gaps. I hope this asset can help me to get started.

    Thanks.
     
  12. Korsigon

    Korsigon

    Joined:
    Oct 6, 2014
    Posts:
    13
    Bought it today, as promised!

    I am using Unity 2018.3.12f and UMA 1.8.1 version.
    The error I got is
    Assets\UMA\Extensions\UMAPowerTools\Scripts\MeshBuilder.cs(164,34): error CS0117: 'PrefabUtility' does not contain a definition for 'IsComponentAddedToPrefabInstance'. Since IsComponentAddedToPrefabInstance has been removed from the API, I commented out the whole section since it does not do anything but warns. So I am keeping in mind the warning:
    //if (UnityEditor.PrefabUtility.IsComponentAddedToPrefabInstance(renderer))
    // {
    // Debug.LogError("Cannot apply changes to prefab!");
    // }

    What is missing is documentation. It would help if there were some guidance or some text in the scene explaining the basics on how to use the tool.
     
    Last edited: Apr 21, 2019
  13. Korsigon

    Korsigon

    Joined:
    Oct 6, 2014
    Posts:
    13
    - When I run the demo and I select a random UMA character to save it as a prefab (from UMA | Power Tools | Save Character Prefabs menu) , it gives me the following error when I attempt to save it. It does save it but has no slots or materials added to it.
    IndexOutOfRangeException: Index was outside the bounds of the array.
    UMA.PowerTools.PowerToolsRuntime.SaveCharacterPrefab (System.String assetFolder, System.String name, UMA.UMAData umaData, System.Boolean exportTPose) (at Assets/UMA/Extensions/UMAPowerTools/Scripts/PowerToolsRuntime.cs:141)
    UMA.PowerTools.UMASaveCharacters.SaveCharacterPrefab (System.String assetFolder, System.String name, UMA.UMAData umaData) (at Assets/UMA/Extensions/UMAPowerTools/Scripts/Editor/SaveCharactersPrefab.cs:51)
    UMA.PowerTools.UMASaveCharacters.SaveCharacterPrefabsMenuItem () (at Assets/UMA/Extensions/UMAPowerTools/Scripts/Editor/SaveCharactersPrefab.cs:39)
     
  14. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    I will fire up 2018.3 and see what kind of problems the new prefab workflow is causing.
     
  15. Korsigon

    Korsigon

    Joined:
    Oct 6, 2014
    Posts:
    13
    I am not sure whether you started looking into it but I had to have prefabs so I looked into the code to a certain extent.
    There's a line where the avatar becomes null in PowerToolsRuntime.cs about line 120+- a few lines:

    AssetDatabase.AddObjectToAsset(materials[j], prefab);
    AssetDatabase.SaveAssets(); // Added this line needed for serialization.

    This created the prefab but not entirely. It generated the textures and the prefab. The generated material(s) and the mesh object are children of the prefab in the project but most of the necessary information is not applied to the UMALODAvatar component inputs such as the context, the generator , as well as the materials for the SkinnedMeshRenderer.. The animator is not enabled. At least I got all the elements necessary to complete a prefab for now. I hope that helps.
    The ever updated Unity API is not helping, so I've also modified in PowerToolsRuntime.cs line 82

    // var prefab = PrefabUtility.CreatePrefab(assetFolder + "/" + name + ".prefab", umaData.gameObject, ReplacePrefabOptions.ConnectToPrefab);
    to this:
    var prefab = PrefabUtility.SaveAsPrefabAssetAndConnect(umaData.gameObject, assetFolder + "/" + name + ".prefab",InteractionMode.AutomatedAction);

    You have either InteractionMode.AutomatedAction or InteractionMode.UserAction - Not sure which to use. It did not make any difference.
     
    Last edited: Apr 22, 2019
  16. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    Thanks for the update, so far I've only imported the project into Unity 2018.3, did these changes make it work or is there still more to be done?

    Edit: More work needed to be done, as usual the unity documentation leaves things to be desired. The scripting reference is decent, but the feature overview in particular was super vague.
     
    Last edited: Apr 22, 2019
  17. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    UMA Power Tools v. 2.8.1.1 Released!
    Asset store link: UMA Power Tools
    • Prefab - Added support for the new prefab api
      Also known as Unity 2018.3+ support, thanks to @Korsigon for the heads up
    • Prefab - Improved component cleanup
      Improved cleanup, now also cleans root uma game object
    Enjoy!
     
    Last edited: Apr 22, 2019
    Ne0mega, hopeful and Jaimi like this.
  18. Korsigon

    Korsigon

    Joined:
    Oct 6, 2014
    Posts:
    13
    Thanks for the quick update.
    • So far so good except that this line needs to change for 2018.3 - PowerToolsRuntime.cs line 117 (it 's underlined with a noodle) - Another Unity API surprise.
    // ti.linearTexture = true; (obsolete)
    ti.sRGBTexture = true;

    • When saving in T-Pose, the prefab's animator is not enabled.
    • Immediately after saving a prefab, this non stopping error appears .
    MissingReferenceException: The object of type 'UMALODAvatar' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    UMA.PowerTools.UMALODController.NearestRangeSquared (UMA.PowerTools.UMALODAvatar autoLoader) (at Assets/UMA/Extensions/UMAPowerTools/Scripts/UMALODController.cs:377)
    UMA.PowerTools.UMALODController+LODEntry.UpdateList (System.Collections.Generic.LinkedList`1[T] list) (at Assets/UMA/Extensions/UMAPowerTools/Scripts/UMALODController.cs:104)
    UMA.PowerTools.UMALODController+LODEntry.Update () (at Assets/UMA/Extensions/UMAPowerTools/Scripts/UMALODController.cs:94)
    UMA.PowerTools.UMALODController.Update () (at Assets/UMA/Extensions/UMAPowerTools/Scripts/UMALODController.cs:424)

    I am looking forward to play with the other features.
     
  19. Tarball

    Tarball

    Joined:
    Oct 16, 2016
    Posts:
    149
    Where is a recent guide on how to create a prefab using this asset? Where is the documentation?

    Edit: Nevermind, I see it's very simple. Still, a readme file at least would be appreciated.
     
    Last edited: Apr 29, 2019
  20. DerekYC

    DerekYC

    Joined:
    Jan 7, 2018
    Posts:
    3
    Hi there, does this tool let me generate the character in the editor to the point where I can animate him in a unity timeline with an animator clip track, like any other humanoid model?
     
  21. Siege777

    Siege777

    Joined:
    Jul 4, 2014
    Posts:
    1
    Is this able to save blendshapes (Expression Player) to a prefab? I'm able to save a prefab out, but it doesn't seem to include the Expression Player or any blendshapes.
     
  22. Tarball

    Tarball

    Joined:
    Oct 16, 2016
    Posts:
    149
    I'm wondering the same thing / have the same problem.
     
  23. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    I haven't tested this but fully expected it to work, I will investigate and add support for this "soon(tm)".
     
    SickaGamer likes this.
  24. MarkTheDecrepit

    MarkTheDecrepit

    Joined:
    May 6, 2018
    Posts:
    9
    I've made some UMA prefabs to use with some third-person weapon animations, which require me to tweak the avatar's T-pose. (Without tweaking the T-pose, the character's hands don't align with its line of sight.) I can't see any way to do this. Am I missing something?

    Also, not sure if this is relevant, but I don't have the updated UMA scenes you show in your demo videos. I'm trying to do this from a new scene with nothing but my UMA in it. Scene bone baking doesn't seem to do anything.
     
    Last edited: May 19, 2019
  25. growling_egg

    growling_egg

    Joined:
    Sep 2, 2012
    Posts:
    60
    I've been digging around for a few minutes now and can't seem to make traction creating prefab characters with this tool. Would someone mind giving me a quick 1-2-3 for using PT to create prefab UMA characters using the latest version of PT? Thanks!
     
  26. MarkTheDecrepit

    MarkTheDecrepit

    Joined:
    May 6, 2018
    Posts:
    9
    Assuming you're comfortable creating a basic UMA character (and if you're not, watch Secret Anorak's videos), there's nothing to it. Create your UMA, and with it selected in the scene, find "Power Tools" in the UMA drop-down menu. One of your choices is then "Save Character Prefabs." It's that simple.
     
    UnLogick and growling_egg like this.
  27. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    Glad to see that Mark helped you out.

    As soon as I find time I promise I'll add proper guides[sic].

    WTB: Time Turner, serious offers only.
     
  28. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    The only recommended way to make hands align with line of sight is IK. You could get away with tweaking the T-pose for a single character, but then you would have to do it custom for each character and without proper tooling that would be a nightmare.

    Not sure I follow. Are you trying to achieve LOD or bone baking? They're two completely different features. Getting bone baking to work should be as simple as triggering the menu item in any regular uma scene.

    About LOD that is a different beast that requires some setup and tweaking. The system is quite simple and could benefit from some love. Since I don't have time for a full write up, I'll just advise you to look at the lod scene and strip away the demo stuff and look at what's left. It is important to note that the LOD system works on the special LODAvatar (essentially a construct on top of the regular uma that changes the recipe prior to building it)
     
  29. MarkTheDecrepit

    MarkTheDecrepit

    Joined:
    May 6, 2018
    Posts:
    9

    Thanks for the reply. A few of the third-person weapon animation packs advise tweaking T-poses, which until I tried it sounded simpler than using IK. I've got the IK working now.

    I haven't tried bone baking since my first attempt, so I'm not sure that I didn't make a simple mistake when I first tried it.

    I've found that all my UMA prefabs have their mouths wide open when I play animations on them, and I can't seem to get the expression player or any blendshapes into my prefabs.
     
    Last edited: May 30, 2019
  30. DeadSeraph

    DeadSeraph

    Joined:
    Sep 8, 2017
    Posts:
    88
    Hi there. This appears to do exactly what I need to speed up UMA integration with a project I'm working on. Have a question about the save as prefab function:

    What if I wanted to take an UMA character, save it as a prefab using powertools, but *also* save out the clothes so that they can be swapped in and out? Does your system support this functionality?

    Also, does it take into account the expression editor script that UMA uses so things like blinking or other expressions will be transferred as well?

    Also, just to clarify:

    Our project is likely to move to full UMA integration down the road, but for right now we need to iterate quickly on existing code / assets. So what we want to do is use UMA characters for our user avatars, and just slot them in to replace an older model, and then use the clothes for the UMA characters and swap those in / out on the character while we are integrating UMA fully behind the scenes.
     
    Last edited: Jun 21, 2019
  31. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,732
    Is there any chance in the future of getting blendshapes included when baking to a prefab? I would love to use prefab characters with SALSA, but that's not possible at the moment.
     
  32. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,732
  33. Bantichai

    Bantichai

    Joined:
    Nov 6, 2016
    Posts:
    108
    @UnLogick I tested the latest power tools with the latest Uma in the latest Unity engine build. For some reason I can't seem to enable "scene bone baking" like I could in the older versions. Normally I would just enable it then hit play to generate the UMA but every time it doesn't seem to be saving or baking away the bones.
     
  34. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    @Bantichai I will investigate.

    @magique as I've stated earlier I never tested it but had expected it to work, turns out my expectations didn't meet reality. I'll investigate how to achieve this.

    @DeadSeraph the whole idea behind the prefab baking is cutting the ties to UMA. UMA does not support updating a prefab once baked so if I left behind any UMA stuff it would break horribly.

    I haven't tested blendshapes but I'll take a look.

    @MarkTheDecrepit I will investigate the open mouth while I'm at it.
     
    SickaGamer likes this.
  35. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    878
    @UnLogick yes please fix what magique is asking for!
     
  36. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,732
    Fantastic. I look forward to this. It is a game changer.
     
  37. Bantichai

    Bantichai

    Joined:
    Nov 6, 2016
    Posts:
    108
    @UnLogick Thanks I appreciate it, again it just won't seem to let me toggle it. Enable it before a scene starts, press play, check the prefab, bones are not baked away and when I exit the scene, scene bone baking is off again.

    Also I second what @MarkTheDecrepit mentioned, I get open mouths on my prefabs too, including the ones with baked away bones on the older power tools version.
     
  38. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    @Bantichai I'm assuming this is unity version related, which version of unity are we talking about?
     
  39. Bantichai

    Bantichai

    Joined:
    Nov 6, 2016
    Posts:
    108
  40. Timspurgeon

    Timspurgeon

    Joined:
    Jul 28, 2016
    Posts:
    22
    Is there no documentation on how to use this? just bought it. I see no readme file. Only see some videos and only scene in package is LOD scene. So i went to the uma simple scene made my uma and went to uma powertools save prefab but get errors so im lost
     
  41. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,732
    @UnLogick Have you had a chance to investigate SALSA usage yet?
     
  42. summitsteven

    summitsteven

    Joined:
    Nov 21, 2018
    Posts:
    1
    I am attempting to use this extension with the latest UMA RC 2.8.5. I recognize since it's in RC, it may not be fully supported by the power tools yet. My main use case is the ability Save Character Prefab. This mostly works - it will export the prefab and texture, but it leaves the Dynamic Character Avatar behavior on the prefab. It also fails to connect the Avatar to the animator and both the mesh and material to the Skinned Mesh Renderer. Once those are manually connected, everything works as expected.

    Would appreciate any tips on how to fix this issue. If it is something that needs to be handled by the developer, then I am fine waiting for UMA 2.8.5 to officially release if necessary. Thanks!
     
  43. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    185
    Same boat as you. Just bought it. Having a hard time finding documentation.
    "Saving Prefabs" is saving an UMA prefab, (requires a recipe, is not standalone) that breaks all umas, so no UMAs render prefab or otherwise.

    Unty 2019.1, Uma 2.8.1

    It works if I use the scene "UMA power tools LOD" generated UMA, but not my own umas.
     
    Last edited: Sep 9, 2019
  44. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    185
    I am guessing the reason why it is not saving a prefab is because I am using the UMASimpleLOD on my UMA, and I should be using the Power Tools LOD system?
    Or PowerTools can't save UMAs with LOD's?

    I am not sure. I *really* hope it can.

    I am surprised this has no actual "content" per say, in that it is reliant entirely on UMA, and is using default and sample UMA resources to generate the UMA. I spent quite a while trying to find the "sample meshes". Makes sense though.

    Yeah, just using these support forums as my rubber ducky on this.....

    The cluster generation system is not optimal. If you parent a bunch of objects to other objects, when you dirty one object transform, you dirty all the object transforms in the object hierarchy in the scene, and they all must recalculate.
     
    Last edited: Sep 9, 2019
  45. MastersOfUs

    MastersOfUs

    Joined:
    Aug 29, 2015
    Posts:
    11
    Hey! I was wondering if when you use the Power Tools to build/generate the actual models at edit time, do the models get saved for runtime? Meaning I save some time on startup?
     
  46. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    I finally had time to investigate, it seems my menu item doesn't persist the changes to the generator correctly. So you'll have to set the UMA Generator's MeshCombiner by hand. I tested this with UMA 2.9 in 2019.2 and it worked like a charm. Fixing this should be trivial.

    Just tested this in UMA 2.9 and Unity 2019.2 and it worked right off the bat with Power Tools 2.8.1.1. (Dynamic Character Avatar gone, avatar set up correctly and character animating.)

    Power Tools should work with any correctly configured uma, the power tools lod was merely an old example on how to achieve lod, it has some more features than the simple lod, but shouldn't be considered production ready code.
     
  47. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    No, they're merely a preview to help you set up your scene. UMA resource management would have to be cleaned up substantially to support embedding generated umas that can then be dynamically altered. Also considering the speed of uma I'm not sure it really makes sense.
     
  48. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    302
    Hey @UnLogick
    I tried installing power tools from a fresh project and I get this error:

    Assets\UMA\Extensions\UMAPowerTools\Scripts\UMAEditorAvatar.cs(82,65): error CS1061: 'UMAGeneratorBuiltin' does not contain a definition for 'textureMergePrefab' and no accessible extension method 'textureMergePrefab' accepting a first argument of type 'UMAGeneratorBuiltin' could be found (are you missing a using directive or an assembly reference?)

    and

    Assets\UMA\Extensions\UMAPowerTools\Scripts\UMAEditorAvatar.cs(86,49): error CS1061: 'TextureMerge' does not contain a definition for 'gameObject' and no accessible extension method 'gameObject' accepting a first argument of type 'TextureMerge' could be found (are you missing a using directive or an assembly reference?)

    Thoughts?
     
  49. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,621
    I need to make a new release. :)
     
    fgardler and Drowning-Monkeys like this.
  50. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,732
    @UnLogick Have you had a chance to investigate SALSA usage yet?
     
unityunity