Search Unity

Skinned Mesh Combiner - Support topic and announcements

Discussion in 'Assets and Asset Store' started by marcos4503, Jan 18, 2019.

  1. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    The Skinned Mesh Combiner MT does the work of combining your knits to reduce draw calls through two methods:

    One mesh per material - Merges all knits and submails that use the same material in 1 mesh only! In the end, all properties, textures, materials and animations remain intact. It is the best method to use at runtime and the most efficient, in addition to being compatible with any type of model!

    All in one - Merge all meshes, textures and patterns into 1 only. This method takes longer and is not compatible with all meshes, but it is the method that reduces draw calls more drastically. (Please keep in mind that this method only works with simple meshes, meshes that have only animations, bones, main textures. Meshes with normal maps, for example, may have compatibility problems.)

    That simple! See the Skinned Mesh Combiner at the Asset Store now! I will always be working to improve and add new features!


    Enjoy great asset documentation and optimize your 3D games!

    This asset was created by me, Marcos Tomaz. If you need help just contact me via email (mtassets@windsoft.xyz).
     
    Last edited: Apr 1, 2020
  2. TonismoGames

    TonismoGames

    Joined:
    Jun 12, 2018
    Posts:
    111
    Hi,I have just bought this asset. It is very cool. I keep getting this error trying to combine meshes during runtime. upload_2019-4-23_22-34-24.png upload_2019-4-23_22-35-18.png
     
  3. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Hello TonismoGames!

    Many thanks for buying the Skinned Mesh Combiner MT!
    Can you send an image that displays all the logs that appeared in the logs tab after trying the merge?
     
  4. TonismoGames

    TonismoGames

    Joined:
    Jun 12, 2018
    Posts:
    111
    Sure,in the demo it works fine.This issue is coming from runtime. I added the SkinnedMeshCombiner component at runtime too.
    upload_2019-4-24_18-55-46.png upload_2019-4-24_18-56-27.png upload_2019-4-24_18-58-47.png
     
  5. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Before the Skinned Mesh Combiner merge, it creates a list of meshes that will be merged. Whenever a mesh does not meet the minimum requirements, this mesh is removed from the merge list.

    If at the end of the check, only 1 or 0 meshes remain, the merge is canceled.

    It looks like you're trying to merge meshes that do not have textures ... The "All In One" method depends on materials that use main textures to work. If your materials do not use textures, consider using the "One Mesh Per Material" or "Just Material Colors" method!
     
    Last edited: Apr 27, 2019
  6. TonismoGames

    TonismoGames

    Joined:
    Jun 12, 2018
    Posts:
    111
    Thank You so much for the reply and help!
     
  7. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    No problems! I am available!
    Have a great day and good productivity!
     
  8. Cyrill9

    Cyrill9

    Joined:
    Oct 7, 2016
    Posts:
    8
    Greetings!

    Does the asset combine individual characters only, or can it also combine multiple characters?
     
  9. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Hi!

    The tool combines only individual characters!
     
  10. Crisos90

    Crisos90

    Joined:
    Jan 18, 2016
    Posts:
    4
    Hello this asset can combine in runtime?
     
  11. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Hello! For sure! The Skinned Mesh Combiner has been developed to combine meshes in the editor, or at runtime. You can combine meshes at runtime, easily, either through the Inspector or through C # code to merge or undo the merge.

    Merge works on all platforms, at runtime! :)
     
  12. creativelefty

    creativelefty

    Joined:
    Jan 28, 2017
    Posts:
    10
    does your asset give clear descriptions on how to combine meshes at runtime using script? If for example I have a parent GO with many child GOs (heads,bodies.legs, etc) but only want to combine the active child GOs, is it easy to do using script with your asset?
     
  13. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    For sure! The documentation provides clear information on how to use the asset, both at the publisher and at runtime. It is extremely simple to use it also at runtime. By default the asset only combines the active gameobjects, and there is no problem in combining a 3d model that has multiple child game objects. :)
     
  14. creativelefty

    creativelefty

    Joined:
    Jan 28, 2017
    Posts:
    10
    Hi Just bought your skinned mesh combiner, after adding it into a script I get 9 of these types of warning messages,

    Assets\MT Assets\Skinned Mesh Combiner\Scripts\SkinnedMeshCombiner.cs(1639,61): warning CS0618: 'PrefabUtility.CreatePrefab(string, GameObject)' is obsolete: 'Use SaveAsPrefabAsset instead.'

    Do I have to change all of these in your SkinnedMeshCombiner.cs script?

    P.S. I'm running unity 2019.2.0f1
     
  15. creativelefty

    creativelefty

    Joined:
    Jan 28, 2017
    Posts:
    10
    Just want to add, tested and your asset works great, reduced from 71 to 38 draw calls in my scene (which is a heck of a draw call reduction for mobile). Was initially worried it cancelled the combine since several of my character's meshes had different root bones. But switching off the 'only equals root bones" solved it, luckily without any deformed meshes. (not sure if in future update you can expand in this area so there is more options for us to decide how/when/which meshes are combined). Cheers for your hard work on this asset.
     
  16. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Hi! Thank you so much for buying the asset, and I'm glad you enjoyed it :)

    About obsolete API messages: In newer versions of Unity, the prefab system is different from version 2018.1 (Version where support for Skinned Mesh Combiner begins). Therefore, these messages appear on the console. To solve this problem, just replace the "PrefabUtility. CreatePrefab" methods with "SaveAsPrefabAsset". This is only a temporary solution, in the next Skinned Mesh Combiner update, I will be ending these messages! :)

    I'm glad the asset helped you! Usually turning off the "Only Equal Root Bones" option already solves most problems of different root bones.

    I am always planning to bring improvements and additions to my assets, and really appreciate any suggestions! If you have any free time, and are willing to send me an email describing your suggestions better, I would be delighted to receive them!

    My support, contact and suggestions email is (mtassets@windsoft.xyz)

    Thank you!
     
  17. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    45
    Hi Marcos4503

    Thanks for this plugin. this is working quite well but I have some questions.
    I have multiple skinned meshes for LOD0 (head, arm, leg), and other skinned meshes for LOD1 (head, arm, leg).
    All the meshes are assigned with the same materials, same skeleton.
    I would like to merge only skins that belongs to LOD0, and rename it as "body_LOD0".
    Then I would like to merge the LOD1 meshes, and rename it as "body_LOD1".
    Then, I would like to assign these combined LOD0 and LOD1 to the LODGroup component.

    Is there any good way to do this runtime?
    Thanks in advance.
     
  18. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Hello! I'm glad you liked the asset and that it has helped you!

    Currently, in the current version of SMC in the Asset Store, there is no 100% effective way to do this at runtime ... However, I am already working on a major update to the Skinned Mesh Combiner, which should be released within a few days!

    This update will bring major changes to the Skinned Mesh Combiner, maintaining the usual features and bringing several improvements. After seeing your question, I just added a feature to make it possible at run time!

    In the new version 3.x.x that will be released soon, you only need to add more than 1 Skinned Mesh Combiner components to your character (this will be possible in version 3.x.x onwards). Then, in the first Skinned Mesh Combiner, add the list of meshes to be ignored the LOD 1 meshes. In the second Skinned Mesh Combiner add the meshes to be ignored, the LOD 0 meshes.

    After configuring this correctly, just click to combine the two Skinned Mesh Combiners, and each component will generate 1 GameObject containing the meshes that were not ignored by the merger, generating your combined LODs!

    And the best thing is that all of this will be possible to do, even at run time with just a few lines of code.

    If you have any questions about anything on the Skinned Mesh Combiner, feel free to respond! :)
     
  19. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    45
    Wow that would be great! thanks for the quick reply & quick support.
    Does the new update give us a way to name the combined mesh from the configuration? that way I can distinguish which of combined meshes is LOD0, or LOD1.
    Or if there is API that returns the combined mesh from the SkinnedMeshCombiner, then I can name after, and directly assign them to the LODGroup runtime.

    Just a thought.
    Thanks
     
  20. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Certainly! :)

    In the new version, it will also be possible to define the name of the merge in the Inspector itself, so it will be easier to distinguish the LODs! It will also be possible to define the merge name, also at run time, before combining the meshes.

    There will also be a new method that will return the GameObject resulting from the merge, to make everything even easier! :)
     
  21. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    45
    Awesome!
    I will be waiting for the new release. Thanks!
     
  22. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    45
    Hi Marcos,
    I am having 1 issue.
    When I combine meshes from the inspector, it works.
    but when I combine them run time, the result mesh disappears.
    The OnlyEqualsRootBones option is off.
    Is there any reason why this is happening?
    Thanks!
     
  23. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Hello! Can you tell me if ALL the textures of your model you are trying to combine at run time are marked as "Read / Write" enabled?

    Edit: Didn't the Skinned Mesh Combiner release any log after the merge?
     
  24. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    45
    OMG I have done the same mistake again!
    yes, I had the model FBX's read/write enabled turned off! that was it!
    Thank you so much!.
    It does not look like it shows the log on the inspector though.
     
    marcos4503 likes this.
  25. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Haha no problem! :)

    It is worth mentioning that for Skinned Mesh Combiner to launch debug logs at run time, you must check the option "Launch Debug Logs" in the Skinned Mesh Combiner component. This option can be disabled by default, to prevent unnecessary logs from being sent, to avoid memory problems!

    If you need, just post a message!
    Cheers!
     
  26. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    45
    Hi Marcos,

    Thanks for your super quick help for my stupid mistake. The option to launch debug log at run time is good to know! I will use that so I don't do the same mistake again.
    By the way, is the new release coming soon?
    Could you give me ETA if possible?
    Thanks!
     
    marcos4503 likes this.
  27. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Of course yes! Right now I am in the final phase of the update.

    I added several tools to the Skinned Mesh Combiner, including a tool that allows you to see which vertices each bone of your character can control. In addition, you can use this same tool called "Skinned Meshes Bones Manager" to determine that a Skinned Mesh Renderer should be animated using a bone hierarchy from another Skinned Mesh Renderer. This is very useful for those who are developing a customizable character, where each outfit is saved in a different FBX file, allowing you to add a T-shirt to the character and determine that such a T-shirt should be animated using the character's bone hierarchy of bones. All of this is possible as long as the hierarchy of clothes and body bones are the same.

    It also brought critical improvements to the "All In One" blending method, making it better, cleaner, MUCH faster, smarter, etc.

    I am currently working on the final features, polishing the tool, running tests and soon I will work on the new documentation.

    I believe it will be available for download in the Asset Store, next week! :)
     
    nekoneko777 likes this.
  28. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Hello!

    Unfortunately, I need to postpone the release of the new version. :(

    The documentation for the new version has required more time for polishing and adding more content, while I am reviewing all the information.

    In addition, I need more time to perform more tests on the asset, and ensure its quality!

    But luckily, everything is going well! The new plan is to launch the new version this weekend and I believe that the new version will be available for download on Monday next week (03/30). ;)

    I am also working on new arts for the asset, in addition to new description and etc.

    I apologize and thank you for your understanding!
     
  29. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    45
    Thanks for the update. I will be waiting for the new release!
     
    marcos4503 likes this.
  30. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76

    Attached Files:

  31. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    45
  32. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    45
    Hi, marcos

    I appreciate the new version 3.0.1! it's a lot more useful functions and interface is intuitive.
    I found 2 glitches I can't seem to work out of the box, though I found work around.

    1. when I add the SkinnedMeshCombiner runtime, it returns errors on meshCombiner.oneMeshPerMaterialParam because it's null. same for the meshCombiner.allInOneParams which is also null. So I added these lines in my code,
    Code (CSharp):
    1.                     if (meshCombiner.oneMeshPerMaterialParams == null)
    2.                         meshCombiner.oneMeshPerMaterialParams = new SkinnedMeshCombiner.OneMeshPerMaterialParams();
    3.                     if (meshCombiner.allInOneParams == null)
    4.                         meshCombiner.allInOneParams = new SkinnedMeshCombiner.AllInOneParams();
    5.  
    This seems to suppress the errors but would be nice if I don't have to add these lines. Or is there anything I should do that I don't know when I add the component runtime?

    2. This function returns error. I tried this within the ExampleAPI, and result was the same.
    Code (CSharp):
    1.                     SkinnedMeshRenderer result = meshCombiner.GetCombinedMeshSkinnedMeshRenderer();
    2.  
    The error says..
    NullReferenceException: Object reference not set to an instance of an object
    MTAssets.SkinnedMeshCombiner.SkinnedMeshCombiner.GetCombinedMeshSkinnedMeshRenderer () (at Assets/ThirdPartyPlugins/MT Assets/Skinned Mesh Combiner/Scripts/SkinnedMeshCombiner.cs:1827)

    Thanks.
     
  33. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Hello! I'm glad you liked the new version :)

    This is just a small bug caused by instantiating the Skinned Mesh Combiner component at run time, you did nothing wrong!

    I will fix this in the next patch that should be out in 3 or 4 days, so no additional code is needed to instantiate the parameters! :)

    This is expected behavior. It turns out that this method returns null if there is no merging done. In order for it to return a Skinned Mesh Renderer component, it is necessary to merge it beforehand! I will include this detail in the documentation. I think I forgot to include that!

    Thank you!
     
  34. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    45
    I see. thanks for your replies.
    so I guess I should call "CombineMesh" beforehand when calling GetCombinedMeshSkinnedMeshRenderer. got it. for some reasons I thought this function itself does combine AND return the mesh.
    i will be waiting for the bug fixes for adding component runtime. Thanks!

    Also, few more questions..
    3. I have 40 meshes in one character, 20 are for LOD0, 20 are for LOD1. Not all the body parts are needed so I hide some of them first. To make 2 combined mesh, I added 2 SkinnedMeshCombiners to the character, and adding LOD1 meshes to the meshesToIgnore to generate LOD0 combined mesh, and vice versa. 2 combined meshes are generated and I was able to assign the to the LODGroup. it seems working pretty well but just wanted to make sure if it's a right way of doing this.

    4. Since I have so many pieces, I do make mistakes like forget to add a particular mesh to the ignore list, which end up merging bad meshes in the combined mesh. But i can't catch it easily because some meshes are overlapping shape. Is there any way I can identify which meshes are used to generate this combined mesh? Also, is there a good way to know the verts/tri count for the combined mesh? that will help me to identify the unwanted mistakes.

    Thanks!
     
  35. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Yes, this is the correct way to do this! :)

    In the next patch, you will be able to access an array that contains all the Skinned Mesh Renderers used to merge the generated mesh. And that matrix will be stored in the "CombinedMeshesManager" component that is always included in the mesh resulting from the merge!

    To get the vertex count of a combined mesh, you can use something like the code below...

    Code (CSharp):
    1. //To get triangles count
    2. meshCombiner.GetCombinedMeshSkinnedMeshRenderer().sharedMesh.triangles.Length;
    3.  
    4. //To get vertex count
    5. meshCombiner.GetCombinedMeshSkinnedMeshRenderer().sharedMesh.vertexCount;
     
  36. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    45
    I see! That’s right, I can get the combined mesh with that function so i can get the tri/vers count. Nice!

    And thanks for the source meshes list in the next patch!
     
  37. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    45
    Hi Marcos,

    I don't know if this is something I am doing wrong or what.
    When I combine multiple meshes with OnePerMaterial option, for some reasons I get all the materials instanced and resulting not combining them. Please take a look at the attached image.
    What I expect here is only 2 SubMeshes with 2 Materials.
    upload_2020-4-16_16-4-33.png
    What I do prior to this is to copy the body part's skinnedMeshRenderer to this character skeleton, because the body parts were exported in different FBX. I do copy the boneOrder as well. then assign the SharedMaterial from the Head to all the body parts (SharedMaterial) , then combineMesh.

    The result is as you see, all the materials instanced.
    Is there anything you can think of why this is happening? I tried many things but I can't stop materials being instanced.

    Or if any other options, tricks I can do to stop this from happening?
    I would appreciate any help.
    Thanks!
     
  38. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Hello!

    After doing an analysis, I was unable to reproduce this problem ... Even combining through the Editor or at run time, everything worked as expected ...

    Your materials before combining them, are they instant?

    Have you tried to combine the meshes without generating LODs, or use a simpler model for testing?

    Does this problem happen even if you agree through the Editor?

    Would it be possible to send a sample unitypackage of the problem?
     
  39. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    45
    Hi Marcos, thanks for taking your time!
    I did many experiments, like yielding the each body parts loading, and found out the material instance is created when CPU is busy... looks like. if I call the function when CPU is not busy, the material instance is not created. I really don't understand why and does not make sense actually, but I more now convinced this might be a Unity bug because my code is exactly same except just calling in different timing.
    I might just live with this work around, because I don't think I can make simple repro package easily to send this to Unity.
    Sorry to bother you and I appreciate your time. I was just hoping if you have seen similar cases before.
    Thanks!
     
  40. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    Hi! I was wondering if you could confirm whether this asset would fit our use case. We have a skinned base mesh (character body) and we attach non-skinned traditional geometry to various bone transforms belonging to it. We do not use any additional skinned meshes like flexible clothing - every single attachment is a simple rigid hardsurface object.

    The result we're looking for is a merge into a single skinned mesh. We manage every material ourselves and don't need any kind of atlasing functionality - simply collapsing all materials into a single array with eliminated duplicates is all that's needed. Crucially, we also don't need any additional bones generated during the merge - this is an issue we've found in many skinned mesh merging solutions before. A piece of armor attached to a head doesn't need a new bone to move independently from the head. I'd love to know if we can achieve that result!
     
  41. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    I see... I haven't seen this before. I'll check this out and if I find a fix that I can include in the tool, I'll release an update! :)

    If I understand your proposal well... You need all the meshes to be combined in just one, however, this single mesh must keep its original materials (without duplicates), correct?

    If I'm correct, the Skinned Mesh Combiner can help you! The Skinned Mesh Combiner has a merging method called "One Mesh Per Material" that does the job of combining all meshes in just 1 mesh. This single mesh uses 1 sub-mesh for each material, and after merging there are no duplicates of materials.

    One Mesh Per Material is just 1 of the merging methods that Skinned Mesh Combiner offers! And "One Mesh Per Material" doesn't make any changes to your atlas or UV.

    Thank you very much, cheers!
     
  42. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    That's correct and it sounds great, thank you very much for elaborating!

    To provide some context on my second question, an issue we hit with another mesh merging solution was that we parented hardsurface objects (helmets, shoulder pads etc.) to bones of a skinned object and ended up with hundreds of new per-mesh bones in the merged results. Those were unnecessary as we don't need to move merged objects independently from original skeleton hierarchy. If a base body originally had 40 bones, then a merged object would ideally contain exact same bones, no added movement support necessary. If we'll need to move a helmet independently from a head, we'd rather manually add a helmet bone to the base body and parent a helmet object to that before merging.

    If it's not too much trouble, could you go a bit into what happens to bones when non-skinned child objects under existing bones are merged into a skinned object? Do you give geometry from non-skinned objects their own bone, or do you assign them to an existing bone they were parented to?
     
  43. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Skinned Mesh Combiner generally does not alter your bones or create new bones. It just associates the vertices of the combined mesh with the existing bones, so as a result, no new bones are created in the scene's bone hierarchy.

    The Skinned Mesh Combiner even has a script that manages and debbug bones, called "Skinned Mesh Bones Manager". It displays all the existing bones for a Skinned Mesh, and has other tools as well.
     
  44. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    Music to my ears! Thank you so much for detailing it all!
     
    marcos4503 likes this.
  45. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    45
    Hi Marcos,

    I encountered one problem and wonder if you could suggest me some solutions.
    I have several skinned accessory meshes, so I combined to 1 mesh. But depending on what mesh I am combining, the bounds of the combined mesh is created in different position, shape, resulting the mesh disappears from the camera.
    Please take a look at these attached 2 images. depending which pieces are included to the combined mesh, the bounds position/shape created is different.
    Could you share if you have seen the same issue? and how to solve this?

    Thanks in advance.
     

    Attached Files:

  46. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Hello!

    I think I understand your problem... Are the meshes you are trying to combine in different FBX files?
     
  47. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    45
    Hi Marcos,

    The 40 pieces of accessories are exported in the same FBX, and each mesh is skinned to the skeleton, and when I import the FBX to Unity, each mesh has different SkinnedMeshRenderer.rootBone assigned by default.
    E.g.
    Wristband : rootbone is Forearm
    Kneepad : rootbone is Thigh

    I think this is the issue.
    If I assign the same bone (e.g. the skeleton's root) to the SkinnedMeshRenderer.rootBone for all the meshes runtime before the combine, the combined mesh's bounds stays in center, and the camera clipping issue does not happen.

    I guess I don't quite understand how the "rootBone" works but since it's assigned automatically by Unity, I had to choose the
    meshCombiner.oneMeshPerMaterialParams.mergeOnlyEqualRootBones
    option to be false always and this has been my workflow since the beginning.
    However, if allowing to combine meshes that have different rootBone will end up creating random bounds for the combined mesh like the previous attached images, that's not what I want.
    What's the best practice would you suggest for this use case? I believe I am not the only one who is encountering this issue.

    Thanks
     
  48. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    Got it...

    The root bone is widely used for IK animations, and is also the root of the bones in your character's body, that is, if you move the root bone, all the bones in the character's body will accompany that as well.

    The problem with meshes with different root bones is precisely this ... As much as the merging and animations are not negatively affected, when combining their meshes, it may be better to define all the root bones as being the same, to avoid that the combined mesh has this kind of problem ...

    Even if you allow SMC to combine meshes with different root bones, it will not modify anything in the bones, the "mergeOnlyEqualRootBones" option only works as a protection mechanism, so that the user knows that he is combining meshes with different root bones. In 95% of cases everything works well and the mesh limits are not affected ...

    I believe that this is happening more particularly to you, because of the architecture of different root bones that you adopted for your models ... Of course you must follow the best architecture that you prefer, but I believe that the right way is to define the root bones as the same before merging! :)
     
  49. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    45
    Hi Marcos,

    Question about CurrentSRP.cs.
    VerifyIfHaveAnotherRenderPipelinePackage looks like it's called whenever the game runs in editor.
    This seems to modify the parameter of the CS file, which requires recompile (if any change).
    Could you explain why it's done this way? I think CS file should never be updated runtime. I am not using any SRP but still it attempts to overwrite the CS file every time, and returns I/O error every time (our version control sets read only for CS files)
    I would appreciate if you could improve the detection logic and stop overwriting CS runtime?

    Thanks for the improvements always, and I really appreciate your effort.
    This is awesome plugin and I want to update whenever you have new release, so I would like to understand when I encounter questions.

    Thanks
     
  50. marcos4503

    marcos4503

    Joined:
    Nov 1, 2015
    Posts:
    76
    CurrentSRP.cs is a script that acts as a detection for the SRP that is currently in use! So the Skinned Mesh Combiner will know what material properties to get the correct textures, depending on the SRP that the user is using ... I believe that the issue of compilation is something that I really missed, I will bring a correction for this in the next version, a new logic to prevent this from being changed forever, okay?

    I really appreciate the great feedback and thank you very much for reporting this! :D