Search Unity

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

UMA - Unity Multipurpose Avatar on the Asset Store!

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

  1. Waka-Takaki

    Waka-Takaki

    Joined:
    Jan 19, 2014
    Posts:
    27
    Hi there, brand new user of UMA and by the looks of it so far, it's an amazing piece of kit that you guys have spent an incredible amount of time and effort on, so thanks so much! I can't seem to find a central forum or community website for UMA specifically. Is this the only location to discuss UMA and share assets and advice?
     
  2. dudedude123

    dudedude123

    Joined:
    Aug 24, 2013
    Posts:
    128
    I'm making a create a fighter scene and is there videos that shows me how to initialize the changes on the UMA on the game scene?
     
  3. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    100% I will, but I am still struggling to fathom out the differences myself, what matters and what doesn't.

    @ecurtz mentioned previously that Blender 2.75 version of fbx exporting (7.4 Binary) didn'y make any difference between minusY-Up and Y-Up, and I think this is because the only options in 7.4 are Y-Up or Z-Up. Certainly according to the FBX Export from Max itself those are the only two choices.

    But as I say I dont know if any of that matters as thus far I have only been working on getting my Max stuff into Blender and matching it up in there with the UMA originals- there wasn't a workable option for me to work in MAX.

    So I dont know the consequences of all these orientation differences etc

    But who knows, maybe Blender has progressed enough now that I can use what I have done to re-export something that might make something usable in MAX...

    I'll certainly give it a go.
     
    FernandoRibeiro likes this.
  4. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    FBX converter will display them differently/correctly based on the axis settings with the Blender binary FBX export, so I suspect Max or Maya will as well, however Unity won't. It seems like it's a Unity import bug rather than (or maybe in combination with) a Blender export issue.
     
    FernandoRibeiro likes this.
  5. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Yeah I am currently in 'orientation'hell' right now and I dont know whats wrong...

    Unity doesn't seem to interpret files from MAX with Y-Up or Z-Up differently, from Max at least things always come in horizontal rather than vertical which ever option you choose. And when you drag the object into a scene its the right way up but x is -90 regardless of whether you exported Y-Up or Z-Up. And I have tried this with MAX 2014 and 2016.

    Again I am assuming that MAX is exporting correctly (since Autodesk make the SDK and since the results are the same from 2014 as 2016 and surely it cant have been broken that long if it was broken)- but maybe its not.

    The problem is that if you are trying to export generic animation (the kind of thing that move something up from 0 or rotates it from 0) it doesn't work as 0 in the animation is interpreted as 90 - so as soon as you apply the animation to an object that doesnt have an x value of -90 that object gets a starting 90 and ends up horizontal too!!!

    I know this is not anything to do with UMA but just thought I'd share my findings since it maye have an impact on future developments... I have also posted a thread on the Unity forums here...

    http://forum.unity3d.com/threads/orientation-hell-y-up-z-up-makes-no-difference.357196/

    Lets see what they say... anyone posted a bug report?
     
  6. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    If this is a bug with Unity, that is frankly outrageous. How else can you get animation into Unity apart from fbx? And Unity is not free software like UMA. Its supposed to be reliable, enterprise grade stuff that if you are doing something professionally, you can rely on and pay for.

    I can forgive UMA, even Blender, but not Unity.
     
  7. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    I didn't because Blender isn't exactly the world's most reliable source for FBX files, but if it's the same behavior from Max then you absolutely should file a bug with a couple files that are exported with different axis settings but import the same. Posting on the forum won't get any response from Unity (bug reporting is no longer a guarantee either in my experience, but it's infinitely more likely to be looked at.)
     
    FernandoRibeiro and hopeful like this.
  8. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Ok I have submitted a bug report now. I'll post the link here when they e-mail it to me... Lets see what they say...
     
    FernandoRibeiro and hopeful like this.
  9. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Looking around the forums more it looks like Unity not respecting Y-Up axis conversion this has been an issue since 2013!! So I expect that we will get a 'Wont Fix' response in the first instance.

    And I can sort of understand why because the depth of the issues this causes are not immediately obvious- and moreover, people are likely to blame themselves, give up and just do things differently.

    But actually it IS important because it does have serious ramifications for reusable animation in particular and reusable objects in general, and since Apple still think its fine for their entry level phones to have 16GB of space, re-usability continues to be really important.

    So I really think we should collectively try to pressure Unity into solving this issue once and for all and not let it drag on for *another* two years...

    Particularly because the 'fix' I and others have discovered of making your objects have X=90 in Max (or whatever)- doesn't actually work if you have nested objects that rotate on the X axis (like a horizontal hinge for example) Unity will get the first nested object right but if you have a second nested inside that then that one gets screwed up.

    So basically there is NO solution that actually works properly (apart from apparently exporting from Maya i.e. buying + learning Maya ASWELL- but I don't know because I haven't done it and cant afford too).

    So you can get objects to import as X=0 if you make them with X=90, but you still have an issue where animations on nested objects inside that x=90 object dont work right (this applies to secondary ones i.e. objectthatworks -> objectthatworks2->objectthatdoesntwork).

    So that 'solution' is seriously shonky at best and moreover its not one we should even have to undertake with a product we pay £1.5k pa+ for!

    All that should happen is that fbx files exported with the correct Y-Up axis conversion, should come into Unity with Y-Up conversion- that simple. That way we can all make things in any software how they should be made, without all this pissing around (which as I say doesn't work anyway!)

    So please file bug reports yourselves people, it only takes a minute, maybe together we can finally get this sorted.
     
    Licarell likes this.
  10. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,300
    Hello,

    I am sure this has beeen asked before, but I am a bit tired of searching now, maybe somebody with some UMA experience can give me a hint for my use-case, that would be very nice :)

    We are writing a sandbox / rpg game were you can mine / dig / build stuff but with strong rpg elements.
    https://www.youtube.com/playlist?list=PLvBf9rb_dZ6Nt-AtxAuwh-bThLLGUSn6z

    So the Player can be male or female, human or elve or orc maybe, warrior or miner or mage etc.
    When beginning a new game also choose hair, Skin Color etc.

    We started using "MakeHuman" meshes and created a few prefabs for male Player, female Player, male NPC, female NPC etc. We also have some Basic animations working with them.

    I now found UMA 2. I saw that RPG Starter kit which Features around 30 different pieces of armor and clothes etc.

    What do I really Need to start with UMA 2? There is so much stuff out there...

    Free base package UMA 2 of course Yes (thanks a lot for it!)
    DK?
    Powertools?
    Lipsync or at least expressions? We do not Need 100% lipsync, but at leat some lip moving etc would be nice...
    What else?
    A female and male base corpus mesh?

    Is there a sample to start somewhere with a smaple game Scene?

    We want to have a config Scene in the game to choose your race, type, Skin Color and hair and gender.
    In the game we want the Player to run around 1st and 3rd Person view (this already works very well), and have different clothes or armor on it, using different Tools or weapons.

    We want NPC to walk around with different Skin and race, different clothes or armor etc.

    Any advice, which Tools or assets make sense to start with and maybe a good sample?

    Thanks a lot, I totally lost the overview with the UMA stuff :)

    Firlefanz
     
  11. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    @Firlefanz73 - My short answer for your questions is this:

    Get UMA 2 and play with all of the different example scenes, so you can see what comes with the base kit. I think you also need to download UMA 2 PBR, as you'll probably want to use this rendering method if you are deploying to desktop.

    Maybe also download some free assets, like the Challenger armor, bandana, and grunge so you can have more things to experiment with.

    Watch the recently made UMA video tutorial series. This will go over some of the basics on how to use different aspects of UMA, including scripting.

    If you are able to get this working in your game as placeholder art, get a character controller working and be able to change simple things like clothing items, weapons, and maybe some simple stuff like skin color (green, orange, blue) and special ears and noses and sizing DNA for races, then you're probably good to go. All you would need to do then is figure out if you want to buy art or make your own.

    You shouldn't need special software for use with UMA, but if you were thinking of buying an inventory system, Inventory by Joris has a built-in equipment system for UMA you might find handy. You can review its forum thread here.

    If you are planning on using networking, when you get to that juncture you might find UMA Recipe Tools handy, as it contains a method of converting UMA recipes to an economical binary format. Text recipes are already an economical way of sending a character across a network, but converting to binary makes it even faster.

    If your game manages large crowds, you might find UMA Power Tools to be helpful. But this is something you can add down the road when you are ready for it.

    Mainly, you just need UMA 2 and UMA 2 PBR to start with. And you'll probably find the video series a helpful guide.
     
    FernandoRibeiro and Firlefanz73 like this.
  12. Augis1980

    Augis1980

    Joined:
    Sep 23, 2014
    Posts:
    48
    Hi,
    After updating to the last Unity version I have a new problems (what a surprise).
    It seems that after project conversion expression > Jaw values mess up, and UMA has open mouth even if jaw open value is -1. Mouth is closed if I turn expressions off.
    error.png
    Another issue is that when i change umaDNA values UMA is glitchy (looks like centre of mass is changing)

    I reinstalled new version from scratch and tried to import project 2 times, both with the same results.
     
  13. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,300
    Hi hopeful,

    thanks a lot for your hints! I will start with Uma 2 and Uma PBR like you suggested :)
     
  14. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Is the Expression Stuff correctly initialized? Do the other adjustments besides the jaw work normally?
     
  15. Augis1980

    Augis1980

    Joined:
    Sep 23, 2014
    Posts:
    48
    I just downgraded to version 5.1.3 and everything works fine... I can't imagine what'
    s wrong, but looks like compilation is different.
     
  16. Jason-RT-Bond

    Jason-RT-Bond

    Joined:
    Mar 26, 2012
    Posts:
    89
    I'm having the same issue as Augis with Unity 5.2.0p1 and 5.2.1p1. Other expression values seem to behave normally, but the mouth hangs open with the default jaw open/closed value of 0.5 where it used to be neutral, and can be made neutral by changing this value to 0. (0—0.5 previously seemed to make the mouth tight-lipped which was actually sometimes desirable.)

    Additionally, with Unity 5.2 I'm finding that the avatar is culled whenever the camera gets near where it did not in Unity 5.1. (Obviously a problem, and makes identifying what's happening with the face extra difficult.) Something changed in how the bounds are interpreted or set?
     
    Last edited: Sep 27, 2015
  17. Jason-RT-Bond

    Jason-RT-Bond

    Joined:
    Mar 26, 2012
    Posts:
    89
    I'm getting a crash trying to use UMA on iOS. It occurs right after the app is initialised and before any frame runs from the looks of it. Without debugging enabled, XCode simply says the device disconnected and the app closes. With debugging enabled, the app still closes at the same time and I get the rather unspecific "Message from debugger: Terminated due to memory issue" in the XCode output. No stack trace.

    I'm using UMA 2 in a new project and making a build which just includes the supplied crowd scene. (Also tried a scene of my own with a single UMA.)
    Unity 5.1 and 5.2
    iOS 8.4 and 9.0 on iPhone 5
    XCode 7
     
  18. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    You could try setting your race to use the No Mecanim Jaw version of the TPose asset. I wouldn't be surprised if they made the Mecanim jaw bug even worse somehow in 5.2. Otherwise I'll take a look at it early in the week.
     
  19. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Sounds like you're reaching the memory limit of your hardware. The overlay library without simple optimization steps uses a large part of the memory of mobile devices, so it don't depends only on the amount of avatars created.
    This is a very old video, but it explains how to optimize memore usage:
     
    Last edited: Sep 27, 2015
  20. Jason-RT-Bond

    Jason-RT-Bond

    Joined:
    Mar 26, 2012
    Posts:
    89
    You're right! Got things working after compressing all the textures. Thanks!
     
    FernandoRibeiro likes this.
  21. Jason-RT-Bond

    Jason-RT-Bond

    Joined:
    Mar 26, 2012
    Posts:
    89
    Bingo! Fixed.

    I'm not sure I really understand the issue, though, to be honest...
     
  22. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    When Mecanim imports an animation that doesn't have any animation for the jaw it creates a default curve for it and sets the value to 0. Unfortunately Mecanim animates based on JawCLOSED rather than JawOPEN so when you play that animation on a character that actually has a jaw to animate it gives them the slack-jawed yokel look. Not sure what new thing they broke on top of that this time around, but that bug's been there since Mecanim was introduced.
     
  23. Jason-RT-Bond

    Jason-RT-Bond

    Joined:
    Mar 26, 2012
    Posts:
    89
    Weird. Thanks, ecurtz.


    On this point, it looks like the bounds for the mesh are being centred around the feet as of Unity 5.2 (failing to encompass the top half of the model). In 5.1 and prior they were centred roughly around the mesh's centre and extended to the foot and head as expected.

    A work-around for close-ups is to tick the "Update When Offscreen" box after the mesh is made or set it to true in code after generation. But this has performance consequences and shouldn't be necessary. Anyone know why this would be happening? Did Unity Tech fix something that was wrong and now it needs to be corrected in UMA or did they just break something that was fine?
     
  24. Crazy-Minnow-Studio

    Crazy-Minnow-Studio

    Joined:
    Mar 22, 2014
    Posts:
    1,384
  25. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Nice! Very good price as well : )
     
  26. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,300
    If you get this working well with UMA I will buy it :)
     
  27. Crazy-Minnow-Studio

    Crazy-Minnow-Studio

    Joined:
    Mar 22, 2014
    Posts:
    1,384
    Thanks for your interest. We'll update as we progress.
     
  28. EyeOnYou

    EyeOnYou

    Joined:
    Jun 11, 2015
    Posts:
    21
    Do you plan on doing proper (=realistic) hair? This is a big flaw in UMA for me.
     
  29. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    I've started working together with Thiago de Sul (@thiagodesul) on many different assets. Hair is actually something that I've been considering and I've been testing both the Unity Labs scientist and Blacksmith hair shaders to decide what's the best solution to follow as a standard. Unity Labs scientist hair shader is more flexible and will probably be the right choice.
    You can check here what we already have on AssetStore.
    Helmets.jpg ArmorSet.jpg

    Edit: Btw, @justb provides a hair pack for UMA: https://www.assetstore.unity3d.com/en/#!/content/26521
     
    Last edited: Sep 29, 2015
    hopeful likes this.
  30. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    357
    Shader is fine for stubble, helmet hair (Mrs. Gingrich), or short fur. I'm looking for something more like these:


     
  31. flytrap_RSantiago

    flytrap_RSantiago

    Joined:
    Sep 23, 2015
    Posts:
    3
    I feel so ridiculous for having to ask this and have spent more time than I'd be willing to admit on trying to figure this out.... but please for the love of everything holy, can someone provide an example of how to load a saved character.txt file? I can generate avatars all day, but for the life of me cannot figure out how to load a previously created avatar (in c# preferably).

    Thanks so much in advance!
     
  32. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    The little scripts that do the saving and loading of text recipes from the UMA Menu are in Assets/UMA/Example/Scripts/Editor/UMAAvatarLoadSaveMenuItems.cs that's a good place to look.
     
  33. SecretAnorak

    SecretAnorak

    Joined:
    Mar 19, 2014
    Posts:
    177
    You can also find an example here:

     
    hopeful likes this.
  34. arteria

    arteria

    Joined:
    May 31, 2007
    Posts:
    2,190
  35. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,300
    I got my UMA stuff working now and have my animated Player Male or Female with underwear and also animated NPC now. I downloaded the (free) challenger armor to have some armor to test with.

    I plan to buy some Basic armor / clothes later and that salsa talking stuff.

    But I do not get my test armor working.

    I added it to the UMA/SlotLibrary and OverlayLibrary in my gaming Scene. Looks okay for me.

    But I always get the error message in the console, that it cannot be found. I am not sure: Do I Need to instantiate a new Slot or just add an overlay for a new Piece of armor or a weapon later? I tried both (see comments at the end).

    The Name of the armor Piece is: ChallengerTorsoArmor in to Slot library it says now ChallengerTorsoArmor_Slot
    Here my code for dynamically create a random male:

    void CreateMale()
    {
    // Grab a reference to our receipe
    var umaReceipe = umaDynamicAvatar.umaData.umaRecipe;

    umaReceipe.SetRace (raceLibrary.GetRace ("HumanMale"));

    umaData.umaRecipe.slotDataList [0] = slotLibrary.InstantiateSlot ("MaleEyes");
    umaData.umaRecipe.slotDataList [0].AddOverlay (overlayLibrary.InstantiateOverlay ("EyeOverlay"));

    umaData.umaRecipe.slotDataList [1] = slotLibrary.InstantiateSlot ("MaleInnerMouth");
    umaData.umaRecipe.slotDataList [1].AddOverlay (overlayLibrary.InstantiateOverlay ("InnerMouth"));

    umaData.umaRecipe.slotDataList [2] = slotLibrary.InstantiateSlot ("MaleFace");
    umaData.umaRecipe.slotDataList [2].AddOverlay (overlayLibrary.InstantiateOverlay ("MaleHead02"));

    umaData.umaRecipe.slotDataList [3] = slotLibrary.InstantiateSlot ("MaleTorso");
    umaData.umaRecipe.slotDataList [3].AddOverlay (overlayLibrary.InstantiateOverlay ("MaleBody02")); //, Color.red));

    umaData.umaRecipe.slotDataList [4] = slotLibrary.InstantiateSlot ("MaleHands");
    umaData.umaRecipe.slotDataList [4].AddOverlay (overlayLibrary.InstantiateOverlay ("MaleBody02"));

    umaData.umaRecipe.slotDataList [5] = slotLibrary.InstantiateSlot ("MaleLegs");
    umaData.umaRecipe.slotDataList [5].AddOverlay (overlayLibrary.InstantiateOverlay ("MaleBody02"));

    umaData.umaRecipe.slotDataList [6] = slotLibrary.InstantiateSlot ("MaleFeet");
    umaData.umaRecipe.slotDataList [6].AddOverlay (overlayLibrary.InstantiateOverlay ("MaleBody02"));

    //Zusatz
    if (!IsPlayer)
    {
    int rand = Random.Range (0, 4);
    if (rand > 0)
    umaData.umaRecipe.slotDataList [2].AddOverlay (overlayLibrary.InstantiateOverlay ("MaleBeard0" + rand.ToString (), Color.black));
    int rand2 = Random.Range (1, 3);
    umaData.umaRecipe.slotDataList [2].AddOverlay (overlayLibrary.InstantiateOverlay ("MaleEyebrow0" + rand2.ToString (), Color.black));
    int rand3 = Random.Range (1, 3);
    umaData.umaRecipe.slotDataList [2].AddOverlay (overlayLibrary.InstantiateOverlay ("MaleHair0" + rand3.ToString (), Color.black));
    } else
    {
    umaData.umaRecipe.slotDataList [2].AddOverlay (overlayLibrary.InstantiateOverlay ("MaleEyebrow01", Color.black));
    umaData.umaRecipe.slotDataList [2].AddOverlay (overlayLibrary.InstantiateOverlay ("MaleHair02", Color.black));
    }

    //Kleidung
    //umaData.umaRecipe.slotDataList [3].AddOverlay (overlayLibrary.InstantiateOverlay ("MaleUnderwear01"));
    umaData.umaRecipe.slotDataList [5].AddOverlay (overlayLibrary.InstantiateOverlay ("MaleUnderwear01"));

    //umaData.umaRecipe.slotDataList[7] = slotLibrary.InstantiateSlot("ChallengerTorsoArmor"); //MaleChallengerTorsoArmor_Slot
    //umaData.umaRecipe.slotDataList[7].AddOverlay(overlayLibrary.InstantiateOverlay("ChallengerTorsoArmor"));

    umaData.umaRecipe.slotDataList[3].AddOverlay(overlayLibrary.InstantiateOverlay("ChallengerTorsoArmor_Slot")); // ChallengerTorsoArmor
    }

    Can anybody give me a clue please why I do not get the armor working?

    Thanks a lot!

    Firlefanz
     
  36. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    357
  37. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,300
    That Looks great :)
     
  38. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Is the experimental support in the version that is on the asset store?
     
  39. Crazy-Minnow-Studio

    Crazy-Minnow-Studio

    Joined:
    Mar 22, 2014
    Posts:
    1,384
    Hello Jaimi,

    Thanks for your interest! All of our released add-on's are available for download to existing SALSA customers through our website. This allows us to be more nimble with bug fixes and updates since Unity can take a long time to approve updates. The UMA add-on will hopefully be in closed beta by next week, and open beta shortly after that if all goes well in the closed beta. Once in open beta, it will be available for download from our site to all SALSA customers.

    Michael
     
  40. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
    Hi everyone, I am really new to UMA, I managedto get a character created but how do I scale the character to be bigger? Any advice would be much appreciated.
     
  41. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    I have noticed an interesting side-effect of the way UMA uses bones for deforming characters *THAT COULD HAVE A DETRIMENTAL EFFECT ON SHINY ARMOR*

    In UMA if you make a character fat for example (increase the Belly using DNA), while the geometry changes, the reflections and lighting *dont* get changed correctly. I think this is because Unity may use a different method to calculate how light reflects off an object when it is deformed via bone animation to when it is originally imported and most interestingly, when it is deformed via a blendshape.

    For example if you look at the following few images you can see the difference, imagine that my character is wearing some amazing shiny armor and you can see why its important. (excuse the boobs again!)

    Picture 1 is a refrence of the mesh unmodified.
    UMA-Shiny-Armour-issue-1.png

    Picture 2 is a shot of how the character looks when modified using UMA DNA- you can see here that the reflections are the same as in Picture 1, just stretched so that they lie over the top of the defomed geometry.
    UMA-Shiny-Armour-issue-2.png

    Picture 3 is what the character looks like if it is imported as a mesh that already has the geometry of Picture 2. You can see the light is reflecting *very differently*- now the top of the belly is reflecting the sky as it should since it is pointing upwards.
    UMA-Shiny-Armour-issue-3.png

    Picture 4 is a picture of the same mesh from Picture 1 but deformed using a blendshape. You can see here that Unity has made it reflect light the same way as the model in Picture 3...
    UMA-Shiny-Armour-issue-4.png

    That makes me think that Unity uses different methods to work out the lighting in these there two situations (animated bones vs actual geometry/blendshape deformation) and I am just wondering if this means there is some alternative method that could be used when UMA deformes its meshes (or maybe when those DNA changes are applied as a recipe) that could lead to better and more accurate reflections on shiny armour?

    Did you guys already know about this? If not, hope its useful, but if you did is there an option I can enable/or a workaround?
     
  42. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Just an additional note to my post above... I think you will find that if you try to apply a deformation from a blendshape exported from blender you will find it looks like picture 2 as blender doesn't export export blendshape normal data the same way MAX does...This maybe different in the latest version, I am not sure...
     
  43. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    @davidosullivan - So what your saying is as it stands right now we can use UMA for the scaling of the different body parts, Tall/Short, Long/Short arms, legs, finders, neck. But when it comes to mesh deformation, muscles, fat, etc. It's better to use morphs....

    I know the Unity was going to at morphs to their API, did that happen yet or is that 5.3?
     
  44. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    blend shapes were added in version 4. Anyway, while that would work, you would lose the ability to swap out meshes on your characters - for example, putting a hat on the head would not longer work if you used a blend shape for the head because it would no longer scale with the head.

    Have you tried simply recalculating the normals on the mesh?
     
  45. Crazy-Minnow-Studio

    Crazy-Minnow-Studio

    Joined:
    Mar 22, 2014
    Posts:
    1,384
    This experiment demonstrates SALSA lipsync using our live microphone workflow, and our runtime text-to-speech workflow (using RT-Voice), with our upcoming support for UMA 2 characters.

     
    Last edited: Oct 4, 2015
    UnLogick and Sliceandkill like this.
  46. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    I cant remember where but I saw a thread between someone and a Unity dev where they were talking about an API to enable Blendshapes to be retained when you combine meshes, but they said this wasn't going to make it into 5.2...

    Anyway, I'm not really talking about using blendshapes instead- for the reasons you specify- just saying that the reflections are correct when a mesh is deformed using blendshapes but not when it is deformed using bones- in case that shed any light on the situation, like maybe there are two different methods for calculating things, one that blendshapes use and one that deforming bones use, and that maybe it could be possible to use the other one...

    I have tried doing adding a RecalculateNormals command to UMAData.cs to see if this helps, but its difficult to tell because the smoothing you get after running RecalculateNormals is so dire. I found an interesting thread about this here
    but I haven't been able to get the script on that page to override the standard Unity function, just lack of knowledge on my part I'm sure...
     
  47. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Ok I got that script I mentioned to work (I think it had to go in the 'Standard Assets' folder maybe) and the results of RecalculateNormals is much better but its still not actually doing anything to fix the reflected light... I think perhaps what has to happen is that the mesh needs to be baked with that deform applied. But this a bit more complicated I think as so far if I bake the mesh, all my characters stop moving and end up on their sides, face into the ground!
     
  48. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    Ok sorted out the baking/falling into the floor issue...
    the following addition to UMAData.cs around line 639 in the ApplyDNA function- almost solves the issue - in the sense that the deformed mesh gets new normals that reflect light differently, but for some reason the light it reflects is coming from a different angle to the lights in the scene- its as if the UMA's are reflecting light as if they were face down in the floor, even though they aren't...
    Code (CSharp):
    1. Mesh baked = new Mesh();
    2.                         umaData.myRenderer.BakeMesh(baked);
    3.                         baked.RecalculateNormals(60);
    4.                         umaData.myRenderer.sharedMesh.normals = baked.normals;
    The RecalculateNormals(60) bit relies on having the modified 'NormalSolver' script from http://schemingdeveloper.com/2014/10/17/better-method-recalculate-normals-unity in your Standardassets folder- it just does a much nicer job of recalculating normals...

    Anyway hopefully someone on the UMA team will see the value in what I am trying to do here. Being able to make a character 'fatter' for example, while they are wearing some shiny reflective armour, will look waaay cooler if what they are wearing actually reflects light and shadows properly as it should after the deformation...
     
  49. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,628
    It sounds as if this consideration is something that's more important in the U5 / PBR world than it might have been in the old U4 / diffuse world.
     
  50. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Recalculating normals is probably the best way to handle this. I imagine Unity don´t take bone scale into account for calculating the resulting mesh normal because most users are now using mecanim and retargeted animations.
    If we are having this problem with reflections, I can imagine that body volume variation is not properly handling light calculation as well, I´ll have time to check it this week. Thanks for sharing this information and working on a possible solution.

    Using blendshapes instead of bone driven deformation would not only require a complex pipeline for content creation (it´s worth checking morph3d concerning this http://forum.unity3d.com/threads/released-morph-character-system-mcs-male-and-female.355675/ ) and restrict new DNA values, it´s probably going to require more processing power, especially if you can´t merge all separated body and cloth pieces. Recalculating normals is a simple but efficient way to handle this limitation.
     
    Teila and hopeful like this.