Search Unity

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

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

  1. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    That shader is deprecated and will be removed in the next release. Anything that is using it can safely be switched to the Morph Standard Double sided version instead.

    I haven't seen or heard of an all green issue though. Can you send me a screenshot, and let me know what OS, gpu, and what version of MCS you're using?

    What happens if you re-import an asset's .mon file? What happens if you use a new clean project and install the base package?
     
  2. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    1) It is a clean project.

    2) Windows 10, GTX 1070, 1.6.4 (Freshly downloaded/installed from the Asset Store).

    3) Not sure about the .mon because when MCS is installed the .unitypackage gets deleted automagically.



    PS: Even stranger, the shader (color) works great in the Invector scene. Just not a new blank scene?

    Edit: Yeah I delete the Direcitonal Light and then the material looks fine.
     
  3. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    What happens if you switch the material's shader from our skin shader to Standard? What happens if you then switch it back.

    If you create a primitive like a sphere does it look normal?

    What graphics API are you using? (Under Player settings)
    What color space are you using?
    Are you using forward or deferred rendering?

    Would it be possible to send me the entire project exported (including settings)?
     
  4. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    I was in Linear Space (which I need for other assets, Enviro - Sky and Weather specifically). Setting it to Gamma fixed it, but I am switching back to Linear because... well.. Linear.
     
  5. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    Our stuff should work in linear or gamma mode. I'd guess the issue is more of a red herring in that respect. I'm having trouble replicating this problem. I'll be happy to fix it but I think I'll need you to export your entire project and upload it so I can take a look at it. Assuming that it will replicate on my machine with your project settings.

    Any other clues? Have you made any changes from the default of unity? Are you using anything interesting like experimental drivers, vulkan, etc?
     
  6. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    303
    I am making a *new* new project and going to import just MCSMale, if it works then I am going to import Invector, etc until it turns green. If the error comes again I'll zip up the project. I'll let you know regardless.

    Edit: Also I am updating my Geforce Drivers, I wasn't using an old one but not the latest.

    Edit 2: Same issue happened, fully blank. I created a new project, imported (it was fine), changed lighting to Linear and then Whammy. Size is 615mb and I have bad internet so it's going to take a while to upload.

    Edit 3: PM'd you.
     
    Last edited: Aug 2, 2017
  7. BitGamey

    BitGamey

    Joined:
    Jun 11, 2016
    Posts:
    52
    Hey look, a tutorial!
     
  8. XCO

    XCO

    Joined:
    Nov 17, 2012
    Posts:
    380
    Hello Morph I noticed that there REFERRED Shaders in my Morph folder, does this mean I can go back to using Deferred lighting ?
     
  9. Landcaster

    Landcaster

    Joined:
    Nov 11, 2015
    Posts:
    12
    Hello, Morph3D team, I want to know how to animate character's face at runtime. For exampale for open mouth I can write: manager.setBlendshapeValue("eCTRLmouthOpen", 100), but it didnt open mouth smoothly, not realistic. So what I gonna do? Thank you very much for your answer!
     
  10. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    Yeah, you can use deferred rendering, for the figure use the deferred version, it's a lot simpler, we still need to build an UBER style shader that works for both, we're just slammed right now.
     
    XCO likes this.
  11. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    Generally you'd want to use a tweening system, like LeanTween or similar to achieve an animation like that.

    Here's some pseudo code that would generally be what you'd need to do:

    Code (CSharp):
    1.  
    2. LeanTween.value(gameObject, 0f, 200f, BlinkDurationTime).setOnUpdate((float amount) => {
    3.     for(int i = 0; i < morphs.Length; i++) {
    4.          if(amount > 100f){
    5.              //reverse the blink
    6.              amount = (200 - amount);
    7.          }
    8.          morphs[i].value = amount;
    9.      }
    10.      m3dCharacterManager.SetBlendshapeValue(morphs[i].key,morphs[i].value);
    11. });
    12.  
     
  12. FredrikSwe

    FredrikSwe

    Joined:
    Jan 11, 2013
    Posts:
    47
    Nothing happens if I morph after added clothing. It did solve other problems I had.
    In the image the female character have bigger body than default female
     
  13. Yacshadow

    Yacshadow

    Joined:
    May 17, 2015
    Posts:
    7
    Sorry for the late answere, we were really busy these times...
    Thanks for your answere. The stuff you're doing in LateUpdate may break the material I try to access before the end of the frame.

    About the tint texture I saw your workaround, but I don"t understand which shader to replace in the character gameobject.
    About the material system you speak about, I will wait for it :
    We have another issue with brithair : if I disable brithair gameObject, change youth, and then enable brithair again, it will keep old position ( before disabling it )

    Finally do you know when next version ( 1.6.4 ) will be available?
     
  14. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    What version of Unity?
    What version of MCS?
    What OS?
    What GPU?
    Are you using forward or deferred rendering?
    Do you have any output in your console when you reimport the clothing .mon file (it's next to the prefab).
    Do you get any output when you add the content pack?
    What happens if you add the clothing via the editor instead of via scripting, does it work?
    Look at the CIClothing component of the clothing (it should be the first child of the clothing iirc), look at the alpha injection slots at the bottom, is there a mask provided?
    Are you using our skin/character shader on the figure or your own?
    When you say "nothing happens" do you mean, you drive the morph but the figure does not get altered (ie: you drive 5 year old and the figure does not shrink to a 5 year old)
    What happens in a clean project?
    If all else fails, would it be possible for you to share a small portion of the project so I can take a look at it?
     
  15. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    Let me know if you need any extra calls added that would hook in after the figure is fully initialized, generally you could do something like this though:

    Code (CSharp):
    1. protected int _frame_check;
    2. void Awake(){
    3. _frame_check = 0;
    4. }
    5. void Update(){
    6. if(_frame_check==1){
    7. _frame_check++;
    8.  
    9. DoSomethingOnSecondFrame();
    10.  
    11. }
    12. if(_frame_check == 0){
    13. _frame_check++;
    14. }
    15. }
    It replaces the current shader, so you'll see two options if you choose the body materials, one for tint color and one for tint texture (both are optional)

    Thanks, looks like when an object is enabled it needs to resync itself, we can get that fixed

    1.6.4 is already out, I assume you mean 1.6.5. I'm planning to ship this out next week. It currently has a fix for macs on 2017 and bounds checking, along with the new shaders being included, and the deprecated shaders being removed.
     
  16. Landcaster

    Landcaster

    Joined:
    Nov 11, 2015
    Posts:
    12
    Hello, M3D team, can you tell me how to setup ragdoll? Which bones I must add to Ragdoll Wizard? Thank you
     
  17. Yacshadow

    Yacshadow

    Joined:
    May 17, 2015
    Posts:
    7
    We've done something like that. We start coroutine that wait for next frame.
    It may be great to have a callback. It will help !

    Does it contains tint of eyes, new hair shader ...

    Actually we had this problem and we make a workaround : we always check compatibility between each clothes and hair to have hair compatible with hat.
    Are you planning to combine hair and clothes soon ?
     
  18. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    I'm not familiar with that plugin, if I had to guess you'll want to map as many bones as they allow, then when you're ready to "ragdoll" the figure you'll want to disable our JCTTransition component (located on the hip gameobject). Otherwise our JCT system will fight with their bone system.
     
  19. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    Yes to the tint for eyes, possibly for the hair shader. I haven't had time to finish cleaning it up but it's still on the radar.


    Not anytime soon, this is something that you'd have to solve through Artist Tools.
     
  20. Nyxeka

    Nyxeka

    Joined:
    Aug 24, 2015
    Posts:
    20
  21. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    151
    Hello,

    I loop through all materials inside all renderers character have and changing shader to outlined (so character looks like selected). However, I am not able to change Body shader of active LOD. Hair, clothes and body, head, eye shaders of other LODs are changed fine. Through Debug I see that Body material of active LOD has been found, just “renderer.material.shader = shader; “ do nothing in this case.

    Any advice would be greatly appreciated.
     
  22. dansta2k

    dansta2k

    Joined:
    Apr 24, 2015
    Posts:
    12
    Hi Morph

    I am having trouble building my project with mcs male on hololens (universal 10)

    When I build I get many errors for example Reference rewriter: Error: type `System.Security.Cryptography.SymmetricAlgorithm. Please see image attached.

    Problem goes away when I remove mcs from the project.

    Is MCS suppose to work with universal 10 with hololens?

    regards
     

    Attached Files:

  23. dwaldrum

    dwaldrum

    Joined:
    Jun 20, 2015
    Posts:
    48
    Trying to use the artist tools with blender, and I'm running into a few issues.

    1) In the blender workflow document, slide 4 it says: Set As Bind Pose (Ctrl+A), CTRL-A gives me two options, Apply Pose as Rest Pose and Apply Visual Transform to Pose. Which of these two is the proper one?

    2) When importing the same FBX (after making updates), Artist Tools says importing in the status at the bottom, but never imports and the only way to reimport an FBX is to shut down the tool and restart.

    3) Slide 7 of the blender workflow says: Apply the transformations to the figure. (Ctrl+A) Choose Rotation. Yet in the screenshot it looks like both the skeleton and the clothing are selected while doing this. Do we apply the rotation to both?

    4) I've created a test hat to place on the character, tried importing into artist tools, and nothing appears. I follow every step of the guide, but nothing appears after importing.

    5) If I change the export settings to turn on "!EXPERIMENTAL! Apply Transform" the object appears in the artist tools, but is rotated 90 degrees and is at the feet of the character.

    I'll continue experimenting but out of the box following all the instructions given I can't get anything to import into the tools properly. I'd appreciate some guidance with the proper workflow for blender.

    Thanks!
     
  24. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    That looks like the alpha injection is not running.

    Are you using forward or deferred rendering?
    Have you replaced our skin shader with a custom shader?
    For the pants you're using, find the CIClothing component under the gameobject (should be something like M3DFemale->Pants->Pants), check and verify the "Alpha Mask: BODY" slot has a propper black/white texture mask. If it doesn't you can try reimporting that asset, or find the alpha injection png in the asset folder and drag it into that slot. Then retrigger alpha injection by going to the avatar and toggling the clothing under the Clothing section.
     
  25. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    We store base materials in the alpha injection system to work around issues with serialization of instanced materials, I'd guess that's your issue. You can try setting your materials then call

    Code (CSharp):
    1. m3dCharacterManager.alphaInjection.ForceCurrentMaterialsIntoOriginals();
    Let me know if that works.

    Just FYI, using a custom shader means that you'll lose our alpha injection system unless you add an _AlphaTex channel and clip similar to ours.
     
  26. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    Our plugin doesn't work properly with windows universal, we've made a few custom builds in the past but they are a bit challenging to keep and maintain. We do plan to eventually support it but it will take some time as it's not a priority.

    If you want you send me an email or PM me directly and we can work something out.
     
  27. Morph_JN

    Morph_JN

    Joined:
    Nov 15, 2016
    Posts:
    123
    I'll try to address the blender specific questions you have.

    1 - Choose Apply Pose as Rest Pose
    3 - Yes, select both the skeleton and the mesh
    4 - Can you send the fbx to us? Either attach it here or submit a support ticket.
    5 - This should be handled if you apply the rotations discussed on slide 7 though I have no experience with the Experimental Apply Transforms
     
  28. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    151
    Thanks for answer. Unfortunately it didn't help.
    However, after more testing, it looks like shader only change for the last one from 3 materials in every LOD. And as LOD 0 has different order of materials then LOD 1-3, EyeAndLash instead of Body is changed to my outline shader in this case. I loop through all materials, so I am confused why it works only for the last one.

    This is how my code looks like:

    Code (CSharp):
    1.  
    2.             Shader shaderBodyBorder = Resources.Load("Shaders/CharacterOutline") as Shader; // Placed in Awake          
    3.             Renderer[] renderers = characterInfo.gameObject.GetComponentsInChildren<Renderer>();
    4.             foreach (Renderer renderer in renderers)
    5.             {
    6.                 Material[] materials = renderer.materials;
    7.                 foreach (Material material in materials)
    8.                 {
    9.                     Debug.Log("Material NAME: " + material.name);
    10.                     renderer.material.shader = shaderBodyBorder;
    11.                 }
    12.             }
    13.  
     
  29. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    I'll try to test this out and get back to you later this week, in the mean time what happens if you do this replacement on say frame 2 instead of the Awake call (or just for testing, run that code after you press a key in the Update loop)?
     
  30. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    151
    I run the code during game, only outline shader loading is in Awake.
    Sorry for confusion :)
     
  31. Nyxeka

    Nyxeka

    Joined:
    Aug 24, 2015
    Posts:
    20
    I'm using Forward rendering. I have no replaced any of the materials. The alpha mask was missing, so I added them, but then as soon as I run the scene, the alpha mask slots reset and become empty.
     
  32. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    There will be a file that ends with ".mon" (eg: pants.mon) it will sit next to the prefab and fbx and is responsible for building the prefab. Would it be possible for you to send me that file? I'd like to compare it with the file I have locally and see if they differ.
     
  33. Yacshadow

    Yacshadow

    Joined:
    May 17, 2015
    Posts:
    7
    Do you have any idea, if that's possible to move Morph3D folder to another location ?

    We want to organize our project folder but unfortunatly, since we move Morph3D's folder, it randomly create Morph3D and Morph3D1 folders in Assets folder.
     
  34. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    Hi im using the skin deferred shader, but transparent stuff like hx volumetric and water / fog, overlap over the top of the skin, and the skin is kinda see thru.

    If I use another skin shader the skin leaks thru the clothes.

    Thanx for your help!



    EDIT! I changed some of the code in the shader to render like the double-sided shader and all works ok now :D

    Skin Deferred
    SubShader{
    Tags{

    //OLD
    //"Queue" = "Transparent"
    //NEW
    "RenderType"="Opaque" }

    //OLD
    //LOD 200
    //NEW
    LOD 300

    Cull Back
    ........
     
    Last edited: Aug 16, 2017
    BackwoodsGaming likes this.
  35. helloaifi

    helloaifi

    Joined:
    Jul 31, 2017
    Posts:
    1
    Hi Morph3d,

    Is it possible to bake a LOD3 mesh collider out of LOD3 skinned mesh renderer when the character is using a LOD0 skin and the LOD3 is not active?

    I have tried the following code in Update:
    Code (CSharp):
    1. foreach (var m in Characters) {
    2.             var skrs = m.transform.GetComponentsInChildren<SkinnedMeshRenderer> ();
    3.             var mc = m.gameObject.GetComponentInChildren<MeshCollider> ();
    4.             foreach (var skr in skrs) {
    5.                 if (skr.name.Contains ("M3D")&&skr.name.Contains("LOD3")) {
    6.                     Mesh mesh = new Mesh ();
    7.                     skr.BakeMesh (mesh);
    8.                     mc.sharedMesh = null;
    9.                     mc.sharedMesh = mesh;
    10.                 }
    11.             }
    12.         }
    It did work with Mixamo animation without morphs. However, when the morphs are applied to the character. The mesh collider is not correct. Screen Shot 2017-08-16 at 11.56.58 AM.png Screen Shot 2017-08-16 at 11.58.01 AM.png

    Is there a way that we use high quality skin with low quality mesh colliders baked?

    Thanks.
     
  36. Nyxeka

    Nyxeka

    Joined:
    Aug 24, 2015
    Posts:
    20
    Clipping seems to be happening in other clothes packs as well, but this is for the ranger female top.

    So, all of the "structure and physics" blocks have empty fields on the alpha masks.
    If you give me what they are supposed to have, I'm guessing that would help ^^

    For example:

    Code (CSharp):
    1. "structure_and_physics": {
    2.         "item_structure": {
    3.           "lods": null,
    4.           "persistent": null,
    5.           "cap": null,
    6.           "assigned_materials": null,
    7.           "alpha_masks": [],
    8.           "alpha_masks_key": [],
    9.           "morph_resouces": null
    10.         },
    11.         "material_structure": {
    12.           "shader": null,
    13.           "albedo": null,
    14.           "albedo_tint": null,
    15.           "metal": null,
    16.           "specular": null,
    17.           "smoothness_channel": null,
    18.           "smoothness_value": 0.0,
    19.           "normal": null,
    20.           "height": null,
    21.           "transparency": null,
    22.           "transparency_mode": null,
    23.           "transparency_value": 0.0,
    24.           "emission": null,
    25.           "emission_value": null,
    26.           "emission_color": null,
    27.           "global_illumination": null,
    28.           "detail": null,
    29.           "tile_x": 0.0,
    30.           "tile_y": 0.0,
    31.           "offset_x": 0.0,
    32.           "offset_y": 0.0,
    33.           "tint": null,
    34.           "textures": null
    35.         },
    36.         "morph_structure": {
    37.           "lodMorphObjectNames": null,
    38.           "lodMorphLocations": null
    39.         }
    40.       },
    Also, the CiaoBella outfit has them listed as such:

    Code (CSharp):
    1. "structure_and_physics": {
    2.         "item_structure": {
    3.           "lods": null,
    4.           "persistent": null,
    5.           "cap": null,
    6.           "assigned_materials": null,
    7.           "alpha_masks": [
    8.             "./AlphaInjection/M3DFemale_LOD0-CiaoBellaJacket_29439_LOD0-Body_LOD0-occlusion.png"
    9.           ],
    10.           "alpha_masks_key": [
    11.             "BODY"
    12.           ],
    13.           "morph_resouces": null
    14.         },
     
  37. Nyxeka

    Nyxeka

    Joined:
    Aug 24, 2015
    Posts:
    20
    Also, how easy would it be to add blend weights to things like the wrist, so that it doesn't look absolutely silly when the wrist twists? http://i.imgur.com/50KDib7.png
     
  38. Saiga308

    Saiga308

    Joined:
    Jun 14, 2015
    Posts:
    46
    FYI: The Ragdoll Wizard is built-in to Unity. It's not a plugin or add-on.
     
  39. Artaani

    Artaani

    Joined:
    Aug 5, 2012
    Posts:
    423
    Hello.
    When the next version will be available? This is quite important issue. It makes characters useless with differed lighting.
     
  40. zeb33

    zeb33

    Joined:
    Nov 17, 2014
    Posts:
    95
    I get this error with multiple characters, am I doing something wrong with the import process?
    NullReferenceException: Object reference not set to an instance of an object
    MORPH3D.COSTUMING.CostumeItem.setLODLevel (Single lodlevel, Boolean broadcast_change)
    MORPH3D.COSTUMING.CIhair.setLODLevel (Single lodlevel, Boolean broadcast_change)
    MORPH3D.SERVICES.CostumeModel.SetItemLODLevel (Single level)
    MORPH3D.M3DCharacterManager.SyncCurrentLODLevel (Single level)
    MORPH3D.M3DCharacterManager.initCharacterManager (Boolean refresh)
    MORPH3D.M3DCharacterManager.Start ()
     
  41. Rarceth

    Rarceth

    Joined:
    Oct 15, 2015
    Posts:
    41
    Hi, just making a note. Linear colour space causes the skin to become invisible, but armour/clothes remain visible. I solved by changing to standard double sided, but thought it was something you should know. Win 10, 2x GTX880M, i7-4900MQ. Im gonna be experimenting with the post processing stack and deferred rendering in conjunction with linear colour space, so ill update if anything goes spectacularly wrong
     
  42. Rarceth

    Rarceth

    Joined:
    Oct 15, 2015
    Posts:
    41
    Right, so im getting a bit of skin poke through (Titan suit), but its not too bad, and im trying various tactics to fix. From what i can tell, its because the skin isnt using the default? I cant use Skin - Deferred with Linear colour so hmmm....
     
  43. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    Not currently, we do require and analyze files only in specific paths.
     
  44. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    Glad you got it to work, I'll take a look at the shader and get it fixed in core.
     
    llJIMBOBll likes this.
  45. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    We only update the lods that are active. You can probably work around this by triggering updates to both lods that you want by setting the lod, allow it to activate, then doing your bake, and then setting it back to the lod you want.
     
  46. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    You have the right idea, to fix it manually you can modify the mon file, that section should look like:

    Code (JavaScript):
    1.           "alpha_masks": [
    2.             "./AlphaInjection/M3DFemale_LOD0-RangerTop_LOD0-M3DFemale_LOD0-occlusion.png"
    3.           ],
    4.           "alpha_masks_key": [
    5.             "BODY"
    6.           ],
    You would repeat this for each lod replacing the LOD0 with the appropriate texture, they are in .../Ranger_Top/AlphaInjection.

    If you report the issue through the ticketing system customer service can fix the asset for you and get it updated in the store as well. I'll let them know the asset is missing it's masks though.
     
  47. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477

    I agree that looks bad, I'll talk to the content team to see if we can re-weight the skin so it doesn't look so bad. However, for that kind of pose you would rotate several of the bones to achieve that look. This might be easy if you can make your own animations, or difficult if you're relying on others though.
     
  48. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    I'll take a look at how they achieve the effect when I have some time. That said I would guess pausing the jct portion when you activate the ragdoll will likely work, let me know if it doesn't and I can help you figure out another approach.
     
  49. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    We're going through final QA, so it should be out very soon. In the meantime try the updated shaders at: https://drive.google.com/open?id=0Byi5u41H4gStTXFmcXp5QWdfTUE

    Let me know if that fixes your problem as well.
     
    Artaani likes this.
  50. jjanzer_tafi

    jjanzer_tafi

    Joined:
    Mar 4, 2017
    Posts:
    477
    It's probably on our end. First thing to try is close unity and reopen it and see if the problem goes away. If it doesn't...

    1. Did you make prefabs from the characters or do you just have the characters in the scene not from custom prefabs.
    2. If this occurs only on specific characters what assets do those characters have on?
    3. What happens if you recreate the character from scratch (drag a new figure into the scene, and re-add the clothing), does the problem still occur on the new character?