Search Unity

[Released] Morph Character System (MCS) - Male and Female

Discussion in 'Assets and Asset Store' started by berk-maketafi, Sep 17, 2015.

  1. MaskedGibbon

    MaskedGibbon

    Joined:
    Mar 26, 2016
    Posts:
    10
    I seem to be getting skin-poke through on the Ranger outfit. Is there something I need to be doing to prevent this?
     
    Last edited: May 27, 2017
  2. THplusplusx

    THplusplusx

    Joined:
    Mar 30, 2014
    Posts:
    33
    Im trying to import an experimental mesh I created in Blender into Artist Tools. It is supposed to end up somewhere on the characters waist, but it is on ground level, about 1 meter behind the characters feet. If I was to rotate the model 90° around the left-right axis through the origin it would end up where it should.
    I tried changing the export settings in Blender to have a different coordinate system, but it does not seem to have any effect whatsoever. Importing the same FBX file into Unity yields a perfectly fine 3D model, correctly rotated and positioned.
    The mesh was created and skinned using the M3DMale.fbx figure template for 1.6.4. Any ideas what I might be doing wrong?

    Edit: when initially opening the raw M3DMale.fbx Figure Template as it came from MORPH3D, all the bones seemed to be rotated 90°. I cleared all bone rotations, now I think of it that may be the source of my problems. But why were they off in the first place? Is there a tutorial for Blender and Artist Tools?
     
    Last edited: May 28, 2017
  3. XCO

    XCO

    Joined:
    Nov 17, 2012
    Posts:
    380
    Hello Morph,

    I just downloaded Western outlaw (cowboy) and its fine when there is no morphs but if you apply a morph its all wired. What should I do ?
     
  4. THplusplusx

    THplusplusx

    Joined:
    Mar 30, 2014
    Posts:
    33
    I also have the same issue as @magique , but with BritHair. I do Deferred Rendering in Unity 5.5.0f3 on Windows 10, GTX 1070.
    Setting Alpha Is Transparency to true on the Albedo texture fixes the issue for me, hair now looks just as it should
     
    ryschawy likes this.
  5. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    Hi how can I show and hide clothes at runtime? thanx


    edit... This always seems to happen, everything I ask how to do something 5 mins later I get it to work :D... I been trying for a few days now.

    I'm using it with Inventory Pro, this is what i did;;

    Code (CSharp):
    1. using MORPH3D;
    2. using MORPH3D.COSTUMING;
    3.  
    4. public string ID = "";
    5. MORPH3D.M3DCharacterManager chddar;
    6.  
    7.  
    8. ////Then in attach equip////
    9. chddar.SetClothingVisibility (ID, true);
    10.  
    11. ////Then in attach un-equip////
    12. chddar.SetClothingVisibility (ID, false);
    13.  
    14.  
     
    Last edited: May 28, 2017
  6. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Thanks. That worked for me as well.
     
  7. MSG-Europe

    MSG-Europe

    Joined:
    Nov 2, 2013
    Posts:
    11
    wth.png

    I am frustrated with this problem occurring all the time, the cloth is clearly not conforming to the figure as it is advertised to do. I know that it is probably something that i am doing wrong as nothing is usually as simple as drag and drop but i have tried changing numerous settings and even made sure i force the editor into deferred mode but still i am getting this problem. please can someone explain to me how i attach clothing correctly so that i don't keep getting this problem - or is it a problem with the plugin in general.....

    I have all the latest binaries and the most up to date versions of the clothing and characters. I have also got the latest version of unity plus.

    I love this character system and it works great for the most part, but the clothing not conforming is a recurring issue i have been getting since i started using this plugin back in 2015 and has been a major reason for me stopping work on projects

    so how do i stop the skin poking through clothing and especially how do i fix this problem with midnight Rogue, please help until then i will keep working on my project in anticipation a solution will arise, also if this problem has already been fixed by a previous comment (not just set deferred to on) I would like a link to it if possible please....
     
  8. THplusplusx

    THplusplusx

    Joined:
    Mar 30, 2014
    Posts:
    33
    @InvisionaryUK Does the problem occur at runtime, too? Afaik alpha injection masks (which prevent poke-through) are only applied in playmode.
     
  9. MSG-Europe

    MSG-Europe

    Joined:
    Nov 2, 2013
    Posts:
    11
    yes even in playmode i get this issue
    upload_2017-6-1_1-34-14.png
     
  10. THplusplusx

    THplusplusx

    Joined:
    Mar 30, 2014
    Posts:
    33
    When in runmode, select the item and uncheck IsVisible, then check it again. Does this solve the issue?
     
  11. MSG-Europe

    MSG-Europe

    Joined:
    Nov 2, 2013
    Posts:
    11
    Nope still happens...
     
  12. THplusplusx

    THplusplusx

    Joined:
    Mar 30, 2014
    Posts:
    33
    Does the item actually have an Alpha Mask assigned, specifically for "Alpha Mask: HEAD". If so, does it actually have black areas (those would be masked out), or is it plain white?
     
  13. MSG-Europe

    MSG-Europe

    Joined:
    Nov 2, 2013
    Posts:
    11
    Yes it has an alpha map assigned
    upload_2017-6-1_1-47-56.png
     
  14. THplusplusx

    THplusplusx

    Joined:
    Mar 30, 2014
    Posts:
    33
    Well in that case I can only give a few more guesses:
    * in case you are creating and equipping your character at runtime, try a finished and equipped prefab instead. Or just instantiate an empty character at runtime and equip it manually through M3D Character Manager inspector.
    * check if other items do alpha injection correctly by equipping them and then manually disabling their Skinned Mesh Renderer. If you can now see through the character where the item was before, Alpha Injection for that item is working as expected
    * if it is only this item that's not working, try reimporting it
     
  15. THplusplusx

    THplusplusx

    Joined:
    Mar 30, 2014
    Posts:
    33
    Also make sure your character actually uses the "MORPH3D/Volund Variants/Standard Character" shader. Unity's "Standard" won't do masking and will have poke-through.
     
  16. MSG-Europe

    MSG-Europe

    Joined:
    Nov 2, 2013
    Posts:
    11
    Ok i looked at your second suggestion and that made me realise... I was using a SSSkin shader and perhaps that was causing the problem... A Whole new other recurring problem has happened
    upload_2017-6-1_2-41-48.png

    Now if you guys can help me fix this then perhaps we will be getting somewhere
     
  17. MSG-Europe

    MSG-Europe

    Joined:
    Nov 2, 2013
    Posts:
    11
    ahhaaa as i thought i switched to standard skin in MORPH3d and hey presto

    upload_2017-6-1_2-45-17.png

    Its working!!!!

    Thought it might be something I was doing.... Sorry to waste your time
     
    THplusplusx likes this.
  18. ghostbuster96

    ghostbuster96

    Joined:
    Feb 28, 2015
    Posts:
    17
    I tried deleting the lower jaw bone in Unity to solve the open jaw problem, but it ended up completely destroying her face, pls help
     
  19. ImFromTheFuture

    ImFromTheFuture

    Joined:
    May 21, 2015
    Posts:
    30
    Hi,

    I'm trying to implement collisions for the model. I used Mesh Colliders to achieve this since I want accurate collisions (I only use them for a single frame so it's not going to be a performance issue)

    Unity_2017-06-01_11-52-36.png MCS Female with Mesh Collider (in LOD 0)

    But anyway, since the blendshape changes dynamically at run time, the mesh doesn't reflect that change.
    SO, I used a script that updates the Mesh Collider at run time.

    It works well with "Height_NEGATIVE" and a few other blendshapes like this: [See pics]

    Unity_2017-06-01_11-53-29.png <--- Blendshape changed here
    Unity_2017-06-01_11-53-46.png <--- Mesh Collider adjusted with script


    It doesn't however work with "FBMHeavy", "FBMBodySize" and many other blendshapes: [See pics]

    Unity_2017-06-01_11-54-42.png <--- Blendshape changed here
    Unity_2017-06-01_11-55-05.png <--- Mesh Collider doesn't adjust to THIS blendshape


    I'm stuck at this for quite a while now and I don't understand why the mesh doesn't update when I'm directly accessing and modifying it! The script works perfectly for other meshes (and for a few other blendshapes in MCS model).
    I need to solve this issue for a project that I've been working on. Please look into this Morph team. Thanks! :)
     
  20. ImFromTheFuture

    ImFromTheFuture

    Joined:
    May 21, 2015
    Posts:
    30
    This is the script that I'm using to update Mesh Collider at run time.
    Thanks for any help.

    The main objective that I want to achieve with this is:
    -To find out the point in world space where the model was clicked.
    -Instantiate a black sprite (like a dot) on the body where the click occurred.
    -The model must always have dynamic blendshapes at run time, which changes according to the users input.

    Thanks for any help! :)
     

    Attached Files:

  21. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    You don't want to remove the jaw from the model itself. You want to generate a new humanoid avatar for mecanim where the jaw is removed from the list of bones to animate. It's associated with the model import settings.

    If that doesn't ring any bells with you, check out this link from the manual. Or, if you prefer video, try this one.

    MCS may supply a link to those in the documentation, if they address the open jaw issue. It's not really a bug or anything on their side, it's just how mecanim works.
     
  22. THplusplusx

    THplusplusx

    Joined:
    Mar 30, 2014
    Posts:
    33
    The open jaw issue is already adressed, isn't it? Doesn't "Force Jaw Shut" under "Advanced" on the M3D Character Manager work for you?
     
    elvirais likes this.
  23. THplusplusx

    THplusplusx

    Joined:
    Mar 30, 2014
    Posts:
    33
    @ImFromTheFuture FBMHeavy works for me. Be sure to bake the mesh of an LOD that's been updated by the morph logic. This is usually the LOD that's currently rendered. LOD0 should work in most cases. If you want to bake LOD3, make sure to force it to update beforehand. I didn't look into a way to do this, yet.

    Actually be sure to use SkinnedMeshRenderer.BakeMesh() at all! I don't think the script you posted does even consider blendshapes. BakeMesh() creates a copy of the Mesh with all its blendshapes and current animation. The resulting mesh can directly be used with a MeshCollider, but will be outdated as soon as the animation or blendshapes change.
     
    Last edited: Jun 1, 2017
  24. ghostbuster96

    ghostbuster96

    Joined:
    Feb 28, 2015
    Posts:
    17
    I went and did exactly that after I posted here, and then rotated the bone shut. Thanks for the help any way :)
     
  25. ghostbuster96

    ghostbuster96

    Joined:
    Feb 28, 2015
    Posts:
    17
    I didn't know about this, thanks this helped
     
  26. ghostbuster96

    ghostbuster96

    Joined:
    Feb 28, 2015
    Posts:
    17
    Say, if I am using a skinned cloth that I put through the Morph Artist tools on the MSC model and want to change the blendshapes at runtime would baking the blendshapes help, because currently when I modify the the morphs from script the cloth disappears but if I used the editor tweak for the character and the cloth separately they work fine, cloth sim and everything.

    PS. forgot to mention, the skinned cloth has the unity cloth component attatched to it, where some points are constrained to the skin and the rest are left to the cloth simulation
     
  27. THplusplusx

    THplusplusx

    Joined:
    Mar 30, 2014
    Posts:
    33
    I'm afraid BakeMesh() won't help you there, not even close. You say "the cloth disappears". Where does it go? You'll have to be much more specific about the problem.
     
  28. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    I made a Blink script and thought would share :D, wanna try also to add random eye movement, will update once I've added it.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. using MORPH3D;
    6.  
    7. public class Jims_MCSBlink : MonoBehaviour
    8. {
    9.     public M3DCharacterManager[] m_Male = null;
    10.  
    11.     public float minBlinkTime = 4f;
    12.     public float maxBlinkTime = 10f;
    13.     float blinkEyeRate;
    14.     float previousBlinkEyeRate;
    15.     float blinkEyeTime;
    16.  
    17.     public bool UseBlink = true;
    18.  
    19.     void Start ()
    20.     {
    21.         if (m_Male == null)
    22.             m_Male = FindObjectsOfType<M3DCharacterManager> ();
    23.     }
    24.  
    25.  
    26.     void Update ()
    27.     {
    28.         if (UseBlink) {
    29.             if (Time.time > blinkEyeTime) {
    30.                 previousBlinkEyeRate = blinkEyeRate;
    31.                 blinkEyeTime = Time.time + blinkEyeRate;
    32.             }
    33.  
    34.             if (m_Male != null) {
    35.                 foreach (M3DCharacterManager CharMan in m_Male) {          
    36.                     CharMan.SetBlendshapeValue ("eCTRLEyelidsUpperDownUp", 100f);
    37.                     StartCoroutine (UnBlink ());
    38.                 }
    39.             }
    40.  
    41.             while (previousBlinkEyeRate == blinkEyeRate) {
    42.                 blinkEyeRate = Random.Range (minBlinkTime, maxBlinkTime);
    43.             }
    44.         }
    45.  
    46.     }
    47.  
    48.  
    49.     IEnumerator UnBlink ()
    50.     {
    51.         yield return new WaitForSeconds (0.1f);
    52.  
    53.         if (m_Male != null) {
    54.             foreach (M3DCharacterManager CharMan in m_Male) {
    55.                 CharMan.SetBlendshapeValue ("eCTRLEyelidsUpperDownUp", 0f);
    56.             }
    57.         }
    58.     }
    59.  
    60. }
    61.  
     
  29. ImFromTheFuture

    ImFromTheFuture

    Joined:
    May 21, 2015
    Posts:
    30
    That seems to be required solution to my problem. I've added this:
    Code (CSharp):
    1. skinnedMeshRenderer.BakeMesh (mesh);
    in the "UpdateCollisionMesh" method after initializing a new mesh, but I can't get it to work and the Unity documentation isn't helping. How did you get the FBMHeavy blendshape to work for you?
    I'm using 5.3.1f, can it be because of that?
    Thanks for your response!
     
  30. ghostbuster96

    ghostbuster96

    Joined:
    Feb 28, 2015
    Posts:
    17
    Well it flies of like it has been super expanded, the transform remains there, the content pack attachment is also there, it's like the mesh flips out in such a way that it disappears and leaves my model's cut off legs exposed
     
  31. THplusplusx

    THplusplusx

    Joined:
    Mar 30, 2014
    Posts:
    33
    @ImFromTheFuture You are thinking too complicated. You don't need your current script at all. Just pick the SkinnedMeshRenderer of the mesh you want to test collision with, call its BakeMesh(mesh), and assign the result to a MeshCollider. The resulting mesh will be an exact copy of the original mesh as it was when you baked it, in the exact same pose (sitting, running, whatever) and with ALL morphs (=blendshapes) applied.
     
    ImFromTheFuture likes this.
  32. THplusplusx

    THplusplusx

    Joined:
    Mar 30, 2014
    Posts:
    33
    @ghostbuster96 Try removing all vertex constraints before changing the morph, then reattach them once the morph has been applied (maybe wait a frame or two for test purposes. Once that works, try to improve from there).
     
  33. ghostbuster96

    ghostbuster96

    Joined:
    Feb 28, 2015
    Posts:
    17
    I don't know how to remove and re-assign constraints to the cloth vertices at runtime, I tried switching the cloth component off and modifying the blendshapes and then turning the cloth component back on, but when it does turn on none of the vertices have the old constraints and the cloth ends up falling off the character
     
  34. THplusplusx

    THplusplusx

    Joined:
    Mar 30, 2014
    Posts:
    33
    Then this seems to be what you need to find out. I'm afraid I never used Unity Cloth Component.
     
  35. ImFromTheFuture

    ImFromTheFuture

    Joined:
    May 21, 2015
    Posts:
    30
    THANKS A TON! I love you man! I was over thinking the logic when it was SO SIMPLE! Cheers!
     
    THplusplusx likes this.
  36. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    I'll try to get our content team to get the scalp textures out to fix those issues asap.

    I can modify our current shader to support a tint and get that out with the general release for 1.6.5.

    Makeup is a bit trickier but I've been able to get it to work by modifying our existing makeup sets that were not uv compatible, I'll see how much work it is to modify this on scale and try to let everyone know in the future about what they might expect from this.

    The way I handled makeup in demos was by creating a "makeup" slot that you could drop the makeup look into for the head material.
     
  37. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    If you're using deferred rendering you'll need to swap to our deferred skin shader until we release an "uber" shader. If not, please submit a ticket to customer service so we can track/fix the issue for you.
     
  38. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    Can you send us the blender project and .fbx you're generating so we can take a look at it?
     
  39. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    It probably means that the morph data is not accurate to the geometry data (as in the vertex indexes of the blendshapes do not match the vertex indexes of the mesh). Do you get any errors you can send me? Can you send me a screenshot? I just pulled the asset down and it's working locally, do you have an old asset maybe?
     
  40. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    Glad you got it working, just FYI a good resource to look at is our M3DCharacterManagerEditor.cs script which does a lot of what you would typically need to do in a game/plugin/tool/etc.
     
  41. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    It's been a little while since I used the cloth physics in Unity, but I'm pretty sure you can do the bindings at runtime with: https://docs.unity3d.com/ScriptReference/Cloth-coefficients.html

    You may need to pause physics during morph so that the morph doesn't make it think it's moving. I've actually never played around with the physics while morphing but it's something we should support directly if it doesn't work. Let me know what you find out, I'll take a look at this as well sometime next week.
     
  42. elvirais

    elvirais

    Joined:
    Nov 13, 2013
    Posts:
    29
    I just wanted to check, is MCS fully compatible with the latest unity 5.6? I'd like to update for some other improvements but I can't break the characters :)
     
    THplusplusx likes this.
  43. MSG-Europe

    MSG-Europe

    Joined:
    Nov 2, 2013
    Posts:
    11
    There is a setting that i discovered that allows you to force the jaw closed
    upload_2017-6-3_0-4-48.png
    Hope that helps
     
    elvirais and hopeful like this.
  44. NlaakStudios

    NlaakStudios

    Joined:
    May 19, 2016
    Posts:
    12
    I am having the same or similar problem
    mcs.PNG

    What am I doing wrong? Imported MCS Female. Added packages, enabled clothing. The slin will not render correctly. But as you can see the UFPS model does. So im missing something with MCS System.
     
  45. THplusplusx

    THplusplusx

    Joined:
    Mar 30, 2014
    Posts:
    33
    Well, as @InvisionaryUK wrote, make sure you are using the "MORPH3D/Volund Variants/Standard Character" shader. That should do it.
     
  46. Kaen_SG

    Kaen_SG

    Joined:
    Apr 7, 2017
    Posts:
    206
    I've been struggling a bit to find a good character system. Gave up on M3D a while ago when faced with tons of issues and bugs using u5.6 and then the restrictive EULA dropped.

    Today I just played around with v1.6.4 and it seems to have fixed quite a lot of issues. So my question is... in order for M3D characters to be viable again... has the EULA issue been resolved? IE. When I buy (or make my own) M3D compatible assets/accessories/clothing... will I be able to use them with microtransactions in my game?
     
    THplusplusx likes this.
  47. MSG-Europe

    MSG-Europe

    Joined:
    Nov 2, 2013
    Posts:
    11
    Great starting point thanks I have made some changes to this code as I found it quite erratic sometimes it was blinking like 5-10 times in a row, I have credited you in my version as i have kept allot of it but made changes across the board now i find that it looks allot more natural now so why not give it a go
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. using MORPH3D;
    6.  
    7. // based off of Jims Blinkcode for M3D which can be found on the M3D Unity Forums
    8. //
    9. // - Modified By Molten steel Europe (http://www.moltensteelstudio.com) -
    10. //
    11. // Made changes to the time calculation between blinks to make it a more natural timing the original version seemed to at times be erratic
    12. // also added some variation to the blink time between 0.05 - 0.2 sec to allow aless uniform blink.
    13. // The min and max blink time is based off of seconds by default 2-8 seconds.
    14. //
    15. // The code has also been modifed to work on a single character instead of the array that jim used orignally. the code will automatically
    16. // detect the M3D Model if it is not found it will null and bring up a warning saying that it is not connected to an M3D Model.
    17. //
    18. // Thanks to Jim from the official forum for giving us a starting point for this code, and respect goes to Morph3D for there awesom Characters for unity
    19.  
    20. public class MCSBlink : MonoBehaviour
    21. {
    22.     public M3DCharacterManager m_Char = null;
    23.  
    24.     public float minBlinkTime = 2.0f;
    25.     public float maxBlinkTime = 8.0f;
    26.     float blinkEyeRate;
    27.     float previousBlinkEyeRate;
    28.     float blinkEyeTime;
    29.  
    30.     public bool UseBlink = true;
    31.  
    32.     void Start()
    33.     {
    34.         if (m_Char == null)
    35.         {
    36.             m_Char = gameObject.GetComponent<M3DCharacterManager>();
    37.             blinkEyeRate = Random.Range(minBlinkTime, maxBlinkTime);
    38.         }
    39.         else
    40.         {
    41.             m_Char = null;
    42.             Debug.LogWarning("NOT ATTACHED TO AN M3DCHARACTER RESET TO NULL");
    43.         }
    44.  
    45.     }
    46.  
    47.     private void Update()
    48.     {
    49.         if(UseBlink)
    50.         {
    51.             blinkEyeTime += 1 * Time.deltaTime;
    52.             if (blinkEyeTime >= blinkEyeRate)
    53.             {
    54.                 m_Char.SetBlendshapeValue("eCTRLEyelidsUpperDownUp", 100f);
    55.                 StartCoroutine(UnBlink());
    56.  
    57.                 blinkEyeRate = Random.Range(minBlinkTime, maxBlinkTime);
    58.                 blinkEyeTime = 0;
    59.             }
    60.  
    61.         }
    62.     }
    63.  
    64.     IEnumerator UnBlink()
    65.     {
    66.         yield return new WaitForSeconds(Random.Range(0.05f,0.1f));
    67.  
    68.         if (m_Char != null)
    69.         {
    70.                 m_Char.SetBlendshapeValue("eCTRLEyelidsUpperDownUp", 0f);
    71.         }
    72.     }
    73.  
    74. }
    75.  
    please use it as you will and if you make changes be a sport and please credit and share them on here
     
    llJIMBOBll and ImFromTheFuture like this.
  48. Alex-3D

    Alex-3D

    Joined:
    May 21, 2013
    Posts:
    79
    Hi,
    What is the best way to apply alternate (ethnic - Monique or Darius) matherial to character's head and body?
     
    D-Mike-B likes this.
  49. elvirais

    elvirais

    Joined:
    Nov 13, 2013
    Posts:
    29
    1.6.4 has made it working again. It's finally usable, mostly, which is great. There's a lot of bugs that are being fixed. The only big thing that is a problem now, tech wise, is the hair. There's weird stuff going on with the hair, but they are working in it right now. Right now, maybe 50% of the hair styles / colours are usable.

    Can't comment as to the EULA though, don't know the current status.
     
    magique likes this.
  50. Kaen_SG

    Kaen_SG

    Joined:
    Apr 7, 2017
    Posts:
    206
    Yeah I've played around and I know its much more usable in u5.6+ now.

    It's really dodgy though.. when an asset pack makes me have to question if *I* can use *MY* own assets in *MY* own game because of some dodgy EULA. They should just be open and clear with this policy... I am just a solo indie and I have no interest in negotiating royalties just to use a bunch of assets that I still have to pay for.
     
    elvirais likes this.